Encoder
- 1. Select the "EP7041-0000" device under "I/O" in the Solution Explorer and open the "Process Data" tab.
- 2. Select the Predefined PDO Assignment "1 Ch. Compact" if the encoder used has a maximum resolution of 32 bit single-turn+multi-turn.
- The calculation in TwinCAT NC is performed internally with 32-bit position values.
- 3. Select MOTION > NC-Task 1 SAF > Axis n > Enc in the Solution Explorer
- 4. Open the tab "NC-Encoder" and click on "Link To (all Types)"
- 5. Select the device EP7041-0000.
(If you want to operate the box without an encoder, select the entry "(None)") - 6. Open the "Parameter" tab and set the following parameters:
Invert Encoder Counting Direction
If the positive direction of rotation of the motor is opposite to the positive counting direction of the encoder, set this parameter to "TRUE".
"Scaling Factor Numerator" and "Scaling Factor Denominator"
The "Scaling Factor" is a measure of the distance or angle corresponding to a certain number of encoder steps. It is specified in the TwinCAT NC as a fraction with numerator (Numerator) and denominator (Denominator).
For rotary axes with absolute encoders (BiSS®, SSI):
- Scaling Factor Numerator = 360°
- Scaling Factor Denominator = 2N, with N = single-turn resolution [bit]
Example with 13 bit single-turn resolution:213 = 8192dec.
Encoder Mask (maximum encoder value)
Calculate the Encoder Mask using the following formula and enter the result as a hexadecimal number:
Example for 13 bit single-turn resolution and 12 bit multi-turn resolution:
Encoder Sub Mask (absolute range maximum value)
Calculate the Encoder Sub Mask using the following formula and enter the result as a hexadecimal number:
Enter the value (hexadecimal):
Example for 13 bit single-turn:
Dead time compensation
The dead time compensation can be adjusted on the Time Compensation tab of Axis1_ENC.
It should theoretically be 3 cycles of the NC cycle time, although in practice 4 cycles are preferable.
Therefore, the settings of the parameters Time Compensation Mode Encoder should be ‚ON (with velocity)‘ and Encoder Delay in Cycles ‘4’.
Fig.8: Dead time compensation parameter