Modulo - general description
MODULO
The modulo position of the axis is a piece of additional information about the absolute axis position. Modulo positioning represents the required target position in a different way. Contrary to the standard types of positioning, the modulo positioning has several pitfalls, since the desired target position can be interpreted differently.
The modulo positioning refers in principle to the Modulo factor (Index 0x8020:0E), which can be set in the CoE. In the following examples, a rotary axis with a "Modulo factor" equivalent to 360 degrees is assumed.
The Modulo tolerance window (Index 0x8020:0F) defines a position window around the current modulo target position of the axis. The window width is twice the specified value (set position ± tolerance value). A detailed description of the tolerance window is provided below.
The positioning of an axis is always referenced to its current actual position. The actual position of an axis is normally the position moved to with the last travel command. Under certain circumstances (incorrect positioning due to the axis stalling, or a very coarse resolution of the connected encoder), however, a position not expected by the user may arise. If this possibility is not considered, subsequent positioning may lead to unexpected behavior.
Example
An axis is positioned to 0°, with the result that subsequently the actual position of the axis is exactly 0°. A further modulo travel command to 360° in positive direction results in a full turn, with the subsequent modulo position of the axis of once again being exactly 0°. If the axis comes to a stop somewhat in front of or behind the target position for mechanical reasons, the next travel command does not behave as one would expect. If the actual position lies slightly below 0° (see fig. Calibration with cam, below left), a new travel command to 0° in the positive direction leads only to a minimal movement. The deviation that arose beforehand is compensated and the position is subsequently exactly 0° once more. If the position lies slightly above 0°, however, the same travel command leads to a full revolution in order to reach the exact position of 0° again. This problem occurs if complete turns by 360° or multiples of 360° were initiated. For positioning to an angle that is significantly different from the current modulo position, the travel command is unambiguous.
In order to solve the problem, a "Modulo tolerance window" (Index 0x8020:0F) can be parameterized. This ensures that small deviations from the position that are within the window do not lead to different axis behavior. If, for example, a window of 1° is parameterized, in the case described above the axis will behave identically, as long the actual position is between 359° and 1°. If the position exceeds 0° by less than 1°, the axis is re-positioned in positive direction at a modulo start. In both cases, a target position of 0° therefore leads to minimum movement to exactly 0°. A target position of 360° leads to a full turn in both cases.
For values that are within the window range, the modulo tolerance window can therefore lead to movements against the specified direction. For small windows this is usually not a problem, because system deviations between set and actual position are compensated in both directions. This means that the tolerance window may also be used for axes that may only be moved in one direction due to their construction.
Modulo positioning by less than one turn
Modulo positioning from a starting position to a non-identical target position is unambiguous and requires no special consideration. A modulo target position in the range [0 ≤; position < 360] reaches the required target in less than one whole turn. No motion occurs if target position and starting position are identical. Target positions of more than 360° lead to one or more full turns before the axis travels to the required target position.
For a movement from 270° to 0°, a modulo target position of 0° (not 360°) should therefore be specified, because 360° is outside the basic range and would lead to an additional turn.
The modulo positioning distinguishes between three direction specifications: positive direction, negative direction and along the shortest path (MODULO_PLUS, MODULO_MINUS, MODULO_SHORT). For positioning along the shortest path, target positions of more than 360° are not sensible, because the movement towards the target is always direct. In contrast to positive or negative direction, it is therefore not possible to carry out several turns before the axis moves to the target.
Notice | |
Only basic periods of less than 360° are permitted For modulo positioning with start type "MODULO_SHORT", only modulo target positions within the basic period (e.g. less than 360°) are permitted, otherwise an error is returned. |
Positioning without the modulo tolerance window The "Modulo tolerance window" (Index 0x8020:0F) is always taken into account in the "normal" types of modulo positioning. However, this is less desirable in some situations. In order to eliminate this "disadvantage", the comparable start types "MODULO_SHORT_EXT", "MODULO_PLUS_EXT", "MODULO_MINUS_EXT" and "MODULO_CURRENT_EXT" can be used, which ignore the modulo tolerance window. |
The following table shows examples of modulo positioning with less than one revolution.
Modulo start type | Absolute start position | Modulo target position | Relative travel path | Absolute end position | Modulo end position |
---|---|---|---|---|---|
MODULO_PLUS | 90° | 0° | 270° | 360° | 0° |
MODULO_PLUS | 90° | 360° | 630° | 720° | 0° |
MODULO_PLUS | 90° | 720° | 990° | 1080° | 0° |
MODULO_MINUS | 90° | 0° | -90° | 0° | 0° |
MODULO_MINUS | 90° | 360° | -450° | -360° | 0° |
MODULO_MINUS | 90° | 720° | -810° | -720° | 0° |
MODULO_SHORT | 90° | 0° | -90° | 0° | 0° |
Modulo positioning with full turns
In principle, modulo positioning by one or full turns are no different than positioning to an angle that differs from the starting position. No motion occurs if target position and starting position are identical. For a full turn, 360° has to be added to the starting position. The behavior described in the example shows that special attention must be paid to positionings with whole revolutions. The following table shows positioning examples for a starting position of approximately 90°. The modulo tolerance window (TF) is set to 1° here. Special cases for which the starting position is outside this window are identified.
The following table shows examples of modulo positioning with whole revolutions
Modulo start type | Absolute start position | Modulo target position | Relative travel path | Absolute end position | Modulo end position | Note |
---|---|---|---|---|---|---|
MODULO_PLUS | 90.00° | 90.00° | 0.00° | 90.00° | 90.00° |
|
MODULO_PLUS | 90.90° | 90.00° | -0.90° | 90.00° | 90.00° |
|
MODULO_PLUS | 91.10° | 90.00° | 358.90° | 450.00° | 90.00° | outside TF |
MODULO_PLUS | 89.10° | 90.00° | 0.90° | 90.00° | 90.00° |
|
MODULO_PLUS | 88.90° | 90.00° | 1.10° | 90.00° | 90.00° | outside TF |
MODULO_PLUS | 90.00° | 450.00 | 360.00° | 450.00° | 90.00° |
|
MODULO_PLUS | 90.90° | 450.00° | 359.10° | 450.00° | 90.00° |
|
MODULO_PLUS | 91.10° | 450.00° | 718.90° | 810.00° | 90.00° | outside TF |
MODULO_PLUS | 89.10° | 450.00° | 360.90° | 450.00° | 90.00° |
|
MODULO_PLUS | 88.90° | 450.00° | 361.10° | 450.00° | 90.00° | outside TF |
MODULO_PLUS | 90.00° | 810.00 | 720.00° | 810.00° | 90.00° |
|
MODULO_PLUS | 90.90° | 810.00 | 719.10° | 810.00° | 90.00° |
|
MODULO_PLUS | 91.10° | 810.00 | 1078.90° | 1170.00° | 90.00° | outside TF |
MODULO_PLUS | 89.10° | 810.00 | 720.90° | 810.00° | 90.00° |
|
MODULO_PLUS | 88.90° | 810.00 | 721.10° | 810.00° | 90.00° | outside TF |
MODULO_MINUS | 90.00° | 90.00° | 0.00° | 90.00° | 90.00° |
|
MODULO_MINUS | 90.90° | 90.00° | -0.90° | 90.00° | 90.00° |
|
MODULO_MINUS | 91.10° | 90.00° | -1.10° | 90.00° | 90.00° | outside TF |
MODULO_MINUS | 89.10° | 90.00° | 0.90° | 90.00° | 90.00° |
|
MODULO_MINUS | 88.90° | 90.00° | -358.90° | -270.00° | 90.00° | outside TF |
MODULO_MINUS | 90.00° | 450.00° | -360.00° | -270.00° | 90.00° |
|
MODULO_MINUS | 90.90° | 450.00° | -360.90° | -270.00° | 90.00° |
|
MODULO_MINUS | 91.10° | 450.00° | -361.10° | -270.00° | 90.00° | outside TF |
MODULO_MINUS | 89.10° | 450.00° | -359.10° | -270.00° | 90.00° |
|
MODULO_MINUS | 88.90° | 450.00° | -718.90° | -630.00° | 90.00° | outside TF |
MODULO_MINUS | 90.00° | 810.00° | -720.00° | -630.00° | 90.00° |
|
MODULO_MINUS | 90.90° | 810.00° | -720.90° | -630.00° | 90.00° |
|
MODULO_MINUS | 91.10° | 810.00° | -721.10° | -630.00° | 90.00° | outside TF |
MODULO_MINUS | 89.10° | 810.00° | -719.10° | -630.00° | 90.00° |
|
MODULO_MINUS | 88.90° | 810.00° | -1078.90° | -990.00° | 90.00° | outside TF |