User's Manual

PMAC User Manual
Synchronizing PMAC to External Events 231
Fortunately, this is simply the position captured during the homing move, which PMAC stores for future
use in registers Y:$0815 (#1), Y:$08D5 (#2), etc.
Note:
The position-capture feature gets encoder position, rather than motor or axis
position.
Position-Compare Functions
The position-compare feature is essentially the opposite of the position-capture function. Instead of
storing the position of the counter when an external signal changes, it changes an external signal when the
counter reaches a certain position. In this way, events can be triggered to happen on the actual position of
your system. Because the triggering is a pure hardware function (although setup is software), it is very
fast and accurate. Use the signal to trigger an action in the host, in the plant, or in PMAC itself.
TIMER REGISTERS (2)
1/T, ENCODER PERIOD MEASUREMENT
24 BIT UP/DOWN POSITION REGISTER
(10 MHz MAX.)
SERVO POSITION CAPTURE REGISTER
PHASE CAPTURE REGISTER
POSITION COMPARE REGISTER
CONTROL REGISTER
1) ENC. ERR.
2)CAPTURE
3) EQL.
3 STATUS5 INPUTS 16 CONTRO LS
H.F. & C
EQL.
OUTPUT
A/B QUAD
DECODING
W/MODE CONTROL
X1,X2,X4,P/D,CLK
DIGITAL
FILTER
PHASE CLOCK
"C" CHANNEL
4 FLAGS
A
B
SERVO CLOCK
24 BIT DATA
4 BIT ADDRESS
CLOCK, 10 MHz
COUNT
DIRECTION
4 CIRCUITS PER
GATE ARRAY
FIVE INPUTS
ENCODER INPUT
10MHz MAX.
POSITION
CAPTURE
TRIGGER
CONTROL
BUS
AND
DATA
CONTROL
"HOME" CAPTURE REGISTER
Figure 53 PMAC PC/VME Custom Gate Array (DSPGATE) Encoder Functions
Required M-Variables
To utilize this feature, access the position-compare register itself, and several status and control bits. For
Encoder 1, declare:
M103->X:$C003,0,24,S ; 24-bit position compare register
M111->X:$C000,11,1 ; Compare flag latch control bit
M112->X:$C000,12,1 ; Compare output-enable bit
M113->X:$C000,13,1 ; Compare output invert control bit
M116->X:$C000,16,1 ; Compare-equals flag
Preloading the Compare Position
To preload a compare position, simply assign a value to M103, such as M103=1250. This value can be
between -8,388,608 and +8,388,607. To obtain the position-capture register, read from the same address.
The command can be given from a PMAC motion program, a PMAC PLC program, or from the host.
This is the encoder position; to reference it to motor zero position, the homing offset must be know.