User's Manual

PMAC User Manual
Writing Programs for PMAC 199
If the LEARN command specifies which axes are to be learned (e.g. LEARN(A,B,C) ), only those axis
commands will be added to the program. If the LEARN command does not specify any axes, commands
for all nine axis names are added to the motion program.
The LEARN function can only add axis move commands to the program. Any other parts of the motion
program, including math, logic, move modes, and move times, must be sent to the open motion program
buffer directly.
Motion Program Structure
Typically, PMAC motion programs are combinations of movement specification statements, calculation
statements, and logic statements. The movement specification statements are used to generate
commanded trajectories for the axes, according to the rules explained in the Program Trajectory section of
this manual. The calculation statements can be used to determine the parameters for the movement
specifications, and the logic statements can be used to determine which movement statements get
executed, and when.
Basic Move Specifications
The simplest motion programs just contain movement specifications. For example:
F5000
X10000
DWELL1000
X0
(Remember that in entering this program, surround these statements with the buffer control commands as
explained previously.)
The F (feedrate) statement specifies a speed, the X statements command actual moves for the X-axis, and
the DWELL statement commands a halt for the specified time. This program simply specifies a basic
move and return.
Defaults
A program this simple relies on quite a few default settings and modes. This one uses the following
defaults: LINEAR move mode, ABS (absolute) axis specification, with Ix87 and Ix88 specifying the TA
and TS acceleration times, respectively.
Controlling Parameters
What the values in the program mean can depend on external parameters as well. The X positions are in
user units, as defined in the axis definition statement for the X-axis. The F speed specification is in terms
of user position units divided by feedrate time units, as set by variable Ix90 for the coordinate system.
Simultaneous Moves on Multiple Axes
To perform simultaneous coordinate moves of several axes in a coordinate system, simply put their move
specifications on the same line. For instance, if we changed the above program to:
F5000
X10000 Y10000 Z10000
DWELL1000
X0 Y0 Z0
the X, Y, and Z axes will command a simultaneous move to 10000, stay there for one second, then
command a simultaneous move to 0.
If an axis in the coordinate system is not commanded in a given move line, a zero-distance move for that
axis is assumed (note that it is technically performing a move, so it cannot be in-position).