User's Manual

Turbo PMAC User Manual
Synchronizing Turbo PMAC to External Events 359
For PMAC2-style Servo ICs, the M-variable definitions for the position-capture flags are shown in the
following table. With the standard assignment of channels to motors, the suggested M-variable for the
flag for Motor xx is Mxx17.
Servo IC # Channel 1 Channel 2 Channel 3 Channel 4
0 X:$078000,11 X:$078008,11 X:$078010,11 X:$078018,11
1 X:$078100,11 X:$078108,11 X:$078110,11 X:$078118,11
2 X:$078200,11 X:$078208,11 X:$078210,11 X:$078218,11
3 X:$078300,11 X:$078308,11 X:$078310,11 X:$078318,11
4 X:$079000,11 X:$079008,11 X:$079010,11 X:$079018,11
5 X:$079100,11 X:$079108,11 X:$079110,11 X:$079118,11
6 X:$07A200,11 X:$07A208,11 X:$07A210,11 X:$07A218,11
7 X:$07A300,11 X:$07A308,11 X:$07A310,11 X:$07A318,11
8 X:$07B200,11 X:$07B208,11 X:$07B210,11 X:$07B218,11
9 X:$07B300,11 X:$07B308,11 X:$07B310,11 X:$07B318,11
Bit 10 of the same status word on PMAC2-style Servo ICs also is set to 1 if the most recent position
capture used the encoder’s index (Bit 0 of I7mn2 = 1) gated to a single quadrature state wide (I7mn4 = 1).
This indicates that the captured position is suitable for use to see if the proper number of counts have
elapsed since the previous gated-index capture, a good safety check for encoder count loss.
Whole-Count Position-Capture Register
The position-capture register for an encoder channel contains the value of the encoder counter at the time
when the last trigger condition occurred. It is a 24-bit register, in units of counts, usually treated as a
signed quantity. The suggested M-variable for this register is Mxx03 for Motor xx (with encoders
assigned to motors in the standard order).
A count here is a hardware count that is, one increment of the hardware encoder counter. This is often,
but not necessarily, the same as a software count, what the motor software considers a count. In the case
of digital quadrature feedback where the motor gets feedback position with 5 bits of estimated or
measured fraction – 1/32 of a count – hardware and software counts will be the same.
However, in some cases, as with high-resolution interpolation of a sinusoidal encoder through an Acc-51,
where 10 bits of fraction are calculated per hardware count, the resolution of hardware counts and
software counts will be different. In the case of Acc-51 position, a hardware count will be equivalent to
32 software counts.
For PMAC-style Servo ICs, the M-variable definitions for the position-capture registers are shown in the
following table. Note that the capture register is read-only; a write operation to the same address is a
write to the position-compare register for the channel.
Servo IC # Channel 1 Channel 2 Channel 3 Channel 4
0 X:$078003,0,24,S X:$078007,0,24,S X:$07800B,0,24,S X:$07800F,0,24,S
1 X:$078103,0,24,S X:$078107,0,24,S X:$07810B,0,24,S X:$07810F,0,24,S
2 X:$078203,0,24,S X:$078207,0,24,S X:$07820B,0,24,S X:$07820F,0,24,S
3 X:$078303,0,24,S X:$078307,0,24,S X:$07830B,0,24,S X:$07830F,0,24,S
4 X:$079003,0,24,S X:$079007,0,24,S X:$07900B,0,24,S X:$07900F,0,24,S
5 X:$079103,0,24,S X:$079107,0,24,S X:$07910B,0,24,S X:$07910F,0,24,S
6 X:$07A203,0,24,S X:$07A207,0,24,S X:$07A20B,0,24,S X:$07A20F,0,24,S
7 X:$07A303,0,24,S X:$07A307,0,24,S X:$07A30B,0,24,S X:$07A30F,0,24,S
8 X:$07B203,0,24,S X:$07B207,0,24,S X:$07B20B,0,24,S X:$07B20F,0,24,S
9 X:$07B303,0,24,S X:$07B307,0,24,S X:$07B30B,0,24,S X:$07B30F,0,24,S