An individual axis can be configured to roll over the position reading when the axis crosses either the positive or negative modulo limit. Rolling over the position reading constrains the position reading to stay within the range of values between the negative and positive modulo limits.
For example, when controlling a rotary table and you want the axis to report position readings constrained between 0 and 360 degrees. If the modulos are activated when the axis reaches the positive modulo limit of 360 degrees, the position reading is rolled over to read the negative limit value of 0 degrees.
Position readings are constrained to be greater than or equal to the negative modulo limit, or less than the positive modulo limit. The position reading never equals the positive modulo limit. In this rotary table example, with modulo limits between 0 and 360 degrees, the axis never returns a position reading of 360 degrees. Instead, it returns 0 degrees.
The difference between the positive modulo limit and the negative modulo limit is known as the modulo range. This rotary table example has a modulo range of 360 degrees, or 1 revolution.
The positive and negative modulo limits can be any value, as long as the negative limit is less than and not equal to the positive limit. The negative limit does not have to be a negative number, only less than the positive limit. For the rotary table example, common negative and positive limit settings might be 0 and 360 degrees, or -180 and +180 degrees. Less common settings might be 360 and 720 degrees. All these settings have a modulo range of 360 degrees.
Modulo may be activated or deactivated for an axis.
In this case, the position readings are not rolled over, and the distance the axis has traveled is reported based on the 0 position. That is, distance is specified as a result of the home command and the SetPosition function. This position measurement is referred to as the position without modulo.
Modulo Limits and Position Limits
The positive and negative modulo limits are independent of the positive and negative position limits. The position limits are compared with the position without modulo of an axis to determine if the End Of Travel for an axis has been reached. The limits should be deactivated
If the position limits are set to values that are inside the modulo range of an axis that has activated modulos, the multi-axis motion controller prevents the axes from moving beyond the position limits. The axis does not have unlimited movement in this configuration.
In certain projects, you may want to set the position limits to values greater than the modulo limits. For example, suppose your project controls a rotary table that may have some attached cabling. The table may only be able to rotate a few turns before the cabling twists too much and becomes damaged. In such a project, you will certainly want to set position limits in order to limit the movement to prevent cabling damage. But you may also wish to set the modulo limits to one revolution of the table. For example, if the cable becomes tangled after five turns of the table, the project would set the positive position limit to the value (5 turns) and the negative position limit to the value(-5 turns). The modulo limits might be set at 0 degrees and 360 degrees. The axis is then prevented from moving more than 5 revolutions away from its source.