Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC Program Command Specification 424
Also, commands that generate a response to the host (including errors if I6 is not equal to 2) potentially
can fill up the response queue if there is no host or the host is not prepared to read the responses. This
will temporarily halt program execution until the response queue is emptied. In standalone applications,
it is a good idea to set I1 to 1, disabling the serial handshake, so any responses can be sent out the serial
port (the default response port) at any time, even if there is no host to receive it.
In a PLC program, it is a good idea to have at least one of the conditions that caused the command
issuance to occur set false immediately. This will prevent the same command from being issued again on
succeeding scans of the PLC, overflowing the command and/or response queues. Typically in a motion
program, the time between moves prevents this overflow unless there are a lot of commands and the
moves take a very short time.
Turbo PMAC will not issue an acknowledging character (<ACK> or <LF>) to a valid command issued
from a program. It will issue a <BELL> character for an invalid command issued from a program unless
I6 is set to 2. It is a good idea to have I6 not set to 2 in early development so it is known when Turbo
PMAC has rejected such a command. Setting I6 to 2 in the actual application can prevent program hang-
up from a full response queue, or from disturbing the normal host communications protocol.
Examples:
CMD^D would disable all PLC programs (equivalent to issuing a <CONTROL-D> from the host).
CMD^K would kill (disable) all motors on Turbo PMAC
CMD^A would stop all programs and moves on Turbo PMAC, also closing any loops that were open.
CMDS^P would cause Turbo PMAC to report the positions for 8 motors to the main serial port
See Also:
I-variables I1, I6
On-line commands <CONTROL-A> to <CONTROL-Z>
Program command COMMANDx"{command}"
CREAD
Function: Read latest computed axis destination coordinates
Type: Motion program (PROG and ROT)
Syntax: CREAD [({axis}[,{axis}…])]
where:
{axis} is a character (X, Y, Z, A, B, C, U, V, W) specifying which axis’ destination coordinate
is to be read
The CREAD (Coordinate READ) command causes Turbo PMAC to read the most recently computed
move-destination coordinates for all axes or the specified axes in the coordinate system running the
program, and place these values in particular Q-variables for the coordinate system. From these Q-
variables, these values can then be synchronously assigned to floating-point M-variables, so these M-
variables will hold the axis destination values when the move is actually executing. This facilitates the
calculation of features such as “distance-to-go” reporting.
If no axis list follows CREAD, all nine axis destination values are placed in Q-variables. If there is an axis
list in the command, only the values for the specified axes are placed in Q-variables