User's Manual

PMAC User Manual
30 Talking to PMAC
Coordinate System Commands
There are a variety of types of coordinate-system-specific commands. Axis definition statements act on
the addressed coordinate system, because motors are matched to an axis in a particular coordinate system.
Since it is a coordinate system that runs a motion control program, all program control commands act on
the addressed coordinate system. Q-variable assignment and query commands are also coordinate system
commands, because the Q-variables themselves belong to a coordinate system.
Note:
A command to a coordinate system can affect several motors if more than one
motor is assigned to that coordinate system. For instance, if motor 4 is assigned to
coordinate system 1, a command to coordinate system 1 to run a motion program
can start motor 4 moving.
Global Commands
Some on-line commands do not depend on which motor or coordinate system is addressed. For instance,
the command P1=1 sets the value of P1 to 1 regardless of what is addressed. Among these global on-line
commands are the buffer management commands. PMAC has multiple buffers, one of which can be open
at a time. When a buffer is open, commands can be entered into the buffer for later execution.
Control character commands (those with ASCII values 0 - 31D) are always global commands. Those that
do not require a data response act on all cards on a serial daisychain. These characters include carriage
return <CR>, backspace <BS>, and several special-purpose characters. This allows, for instance,
commands to be given to several locations on the card in a single line, and have them take effect
simultaneously at the <CR> at the end of the line (&1R&2R<CR> causes both Coordinate Systems 1 and 2
to run).
Buffered (Program) Commands
As their name implies, buffered commands are not acted on immediately, but held for later execution.
PMAC has many program buffers — 256 regular motion program buffers, 8 rotary motion program
buffers (1 for each coordinate system), and 32 PLC program buffers. Before commands can be entered
into a buffer, that buffer must be opened (e.g., OPEN PROG 3, OPEN PLC 7).
Each program command is added onto the end of the list of commands in the open buffer; to replace the
existing buffer, use the CLEAR command immediately after opening to erase the existing contents before
entering the new ones. After finishing entering the program statements, use the CLOSE command to
close the opened buffer.
Rotary Motion Program Buffer
The rotary motion program buffer is a special program buffer that can execute motion programs at the
same time it is open for entry of program commands from the host computer. If an open rotary program
buffer is executing, but has already executed every command sent to it, it will execute the next buffered
program command sent to it almost immediately.