User's Manual

Table Of Contents
16-Axis MACRO CPU User Manual
54 How to use the 16-Axis MACRO CPU
Setting the Trigger Condition
The position capture register can be used both automatically, as in homing routines where the firmware
handles the register directly, and manually, where the user programs must handle the register information.
Regardless of the mode, the event that causes the position capture is determined by Encoder I-Variables 2
and 3 on the Macro Station (ms0,mi912 and ms0,mi913 for encoder 1 at node 0). Encoder I-Variable 2
defines what combination of encoder third-channel transition and encoder flag transition triggers the
capture (it also allows software trigger). If it says to use a flag, Encoder I-Variable 3 determines which
flag (usually set to zero to specify the home flag).
Using for Homing
When using this feature for homing a motor, the motor flag address I-Variable (Ix25 for motor x) must
point to the proper set of flags (this has to be done anyway to address the limit flags properly). For
instance, the default value of I125 for a Turbo Ultralite is $3440, pointing to the first set of flags (with
I70/I72/I74/I76 set up to automatically copy the flags to the Macro Station). Then Encoder/Flag I-
Variable 2 (e.g. ms0, mi912) and Encoder/Flag I-Variable 3 (e.g. ms0, mi913) define the transition within
this encoder and flags to cause the position capture. Once these have been set up properly, the homing
function will use the position-capture feature automatically.
Using in User Program
If using the position-capture function in the program, these two I-Variables still control the capture event.
Access the captured position through a full word Macro Station MI-Variable (for node0/channel 1 use
ms0,mi921). To enable the manual function of position capture two bits in the PMAC MACRO flag
command word must be set. Bit 0 and then
MACRO Station Position Compare Output Setup
The position compare outputs for the Servo IC card in a MACRO system are setup in a similar fashion to the
traditional PMAC2 Style compare outputs. The functionality of the compare outputs is identical for a MACRO
and non-MACRO system. The position compare output feature will allow the user to fire an output as soon as
the position in the Servo IC up/down counter is Equal to the value placed into the position compare register.
To monitor the status of the actual position compare output, point a M-Variable definition to bit 9 of the flag
copy register (Ixx25). Using this method, the IO copy register does not need to be set up to verify the operation
of the compare outputs. These data bits are updated every ring cycle.
Non-Turbo Turbo
M152->X:$0F70,9 M152->X:$003440,9
M252->X:$0F71,9 M252->X:$003441,9
M352->X:$0F74,9 M352->X:$003444,9
M452->X:$0F75,9 M452->X:$003445,9
M552->X:$0F78,9 M552->X:$003448,9
M652->X:$0F79,9 M652->X:$003449,9
M752->X:$0F7C,9 M752->X:$00344C,9
M852->X:$0F7D,9 M852->X:$00344D,9
The Position Compare Outputs (EQU Outputs) are set up using the following MACRO Node registers:
MS{node},MI912 Encoder n Capture Control
MS{node},MI923 Compare Auto-Increment Value
MS{node},MI925 Compare A Position Value
MS{node},MI926 Compare B Position Value
MS{node},MI928 Compare-State Write Enable
MS{node},MI929 Compare-Output Initial State