User's Manual

PMAC User Manual
Writing Programs for PMAC 195
Unlike many controllers, PMAC can execute non-motion program blocks with single-step commands with
cutter compensation active. However, be aware that the execution of these blocks may appear out of
sequence, because the motion from the previous programmed move block will not yet have been executed.
Synchronous M-variable assignments in this mode are still buffered and not executed until the actual start
of motion execution of the next programmed move.
Lookahead
A move exactly perpendicular to the plane of compensation will temporarily turn off compensation
because PMAC does not know on which side of the point to compensate. A tiny component of the move
in the plane of compensation is enough to keep compensation turned on.
Two DWELL commands in between moves will temporarily turn of compensation at the point of the
DWELL. Also a looping structure such as the HILE (condition)WAIT or a WHILE loop with no
motion commands will temporarily turn off compensation.
Axis Transformation Matrices
PMAC provides the capability to perform matrix transformation operations on the X, Y, and Z axes of a
coordinate system. These operations have the same mathematical functionality as the matrix forms of the
axis definition statements, but these can be changed on the fly in the middle of programs; the axis
definition statements are meant to be fixed for a particular application.
The matrix transformations permit translation, rotation, scaling, mirroring, and skewing of the X, Y, and
Z axes. They can be useful for English/metric conversion, floating origins, making duplicate mirror
images, repeating operations with angle offsets, and more.
The basic mathematical operation that the matrix operation performs is as follows:
+=
3D
2D
1D
Z
Y
X
33R32R31R
23R22R21R
13R12R11R
'Z
'Y
'X
The base X, Y, and Z coordinates are those defined by the axis definition statements. Those statements
may or may not incorporate a matrix relationship between the axes and motors. If there is a matrix
relationship in the definition statements, these matrix operators will act "on top" of that relationship.
Setting Up the Matrices
The first thing that must be done is to define a buffer space for the transformation matrices. Use the on-
line command DEFINE TBUF{constant}, where {constant} represents the number of matrices
to be defined. Each matrix is set automatically to the identity matrix at this command. This needs to be
done only once; as the space and the values for the matrices will be kept in battery-backed RAM until a
DELETE TBUF or $$$*** command is given.
Using the Matrices
Inside the motion program, the TSEL{constant} (transform select) command picks one of the
matrices that has been defined for use as the active transformation matrix for the coordinate system. This
matrix will be in force for the next calculated moves in the program.
Once selected, the matrix may be processed with several program commands. The processing serves to
put new values in the selected matrix. The matrix is used, with whatever values it contains at the time,
during the calculation of any move involving the X, Y, or Z axes.
Initializing the Matrix
The TINIT (transform initialize) command makes the selected matrix the identity matrix, so that
transformed positions would equal untransformed positions.