User's Manual

PMAC User Manual
176 Writing Programs for PMAC
If input flags are to create the trigger, Ix25 specifies the flag register.
If input flags are to create the trigger, Encoder/Flag I-variables 2 and 3 for this set of flags specify
which edges of which signals will cause the trigger.
Ix03 bit 16 specifies whether the hardware-captured counter value is used as the trigger position
(suitable for incremental encoder signals, real or simulated) or the software-read position is used
instead (suitable for other types of feedback 0=hardware, 1=software). The software-read position
must be used if the following error status is used for the trigger.
Notice that each motor has an independent triggering function and move relative to the trigger, even if the
motors are assigned to the same axis. If a common trigger signal is desired for multiple motors, the same
trigger signal must be wired into the flag inputs for all of those motors.
PMAC will blend each motor smoothly from the pre-trigger move to the post-trigger move according to
the jog/home acceleration parameters Ix19, Ix20, and Ix21.
All motors must come to a stop, either at the originally specified position, or at the post-trigger position,
before PMAC will calculate any further in the motion program. This means that there is no blending of
the post-trigger move into any subsequent moves.
The captured value of the sensor position at the trigger is stored in a dedicated register if later access is
needed. The units are in counts; for incremental encoders, they are relative to the power-up/reset
position.
PMAC sets the motor home-search-in-progress status bit (bit 10 of the first motor status word returned on
a ? command) true (1) at the beginning of a programmed move-until-trigger move. The bit is set false (0)
either when the trigger is found, or at the end of the move.
PMAC also sets the motor trigger move status bit (bit 7 of the second motor status word returned on a ?
command) true at the beginning of a programmed move-until-trigger move, and keeps it true at least until
the end of the move. If a trigger is found during the move, this bit is set false at the end of the post-trigger
move; however, if the pre-trigger move finishes without finding a trigger, the bit is left true at the end of
the move. Therefore, this bit can be used at the end of the move to tell whether the trigger was found
successfully or not.
Circular Blended Moves
PMAC allows circular interpolation on the X, Y, and Z axes in a coordinate system. As with linear
blended moves, TA and TS control acceleration to and from a stop, and between moves. Circular blended
moves can be feedrate-specified (F) or time-specified (TM), just as with linear moves. It is possible to
change back and forth between linear and circular moves without stopping.
Note:
In order for PMAC to do circular moves, parameter I13 must be greater than zero.
Specifying the Interpolation Plane
The first thing that should be done in preparing for a circular move is to specify the orientation of the
plane that will contain the circle. This is done by specifying the normal vector to that plane with the
NORMAL command. The arguments of this command are the component magnitudes of the vector: I (X-
axis direction), J (Y-axis direction), and K (Z-axis direction). A typical command might be NORMAL
I0.866 J0.5 K0.0. The length of the normal vector specified here is not important; only the ratio
between the component magnitudes is (which determines the direction).