Initial Position Detection of Modulo Axis
The actual position of a drive or encoder is transmitted as DWORD to the controller.
For a modulo axis, the period P is defined in increments by the modulo value and the scaling. The period P specifies the exact number of increments in a rotation. This means that the positional values X, X+1*P, X+2*P, etc. describe the same physical position. The position X+n*P exceeds the limit of DWORD when n is large enough. This happens at position 0x1 00 00 00 00. Then the leading place is cut and the value begins at 0. If P is not a factor of 0x1 00 00 00 00, then position X no longer describes the same physical position before and after the interruption.
If the gear ratios are set so that the period is not a factor of 0x1 0000 0000, then the position of a axis of rotation can be moved after activation.
Example
The axis starts at position 0x0. It is at 0°. One period is 360°. The scaling is selected so that this corresponds to 3600000 = 0x36 EE80 increments. After 1193 rotations, the axis stops at 0xFFFD 7280=1193*3600000. After another complete rotation, the axis reaches the position 0x10034 6100. At the interruption, the leading 1 is cut and the position 0x34 6100 is formed. If you move the axis back to position 0x0, then the axis stops at position 16.7296°. Therefore, the position 0x0 corresponds to the position 0°, 16.7296°, etc., depending on the actual interruption.
Note
If you have selected the scaling so that the above effect can occur, and if homing is not possible or required at the start of the program, then you can recover the position before the last deactivation by means of the SMC3_PersistPosition function block. You use an absolute value encoder here.
See also