Reference Manual
  PMAC 2 Software Reference 
344  PMAC Program Command Specification 
V Q122 21  2,097,15 $200000 
W Q123  22  4,194,304 $400000 
X Q124 23 8,388,608 $800000 
Y Q125 24 16,777,216 $1000000 
Z Q126 25 33,554,432 $2000000 
*Cannot be used 
Any letter may be READ except N or O, which are reserved for line labels (and should 
only be at the beginning of a line). If a letter value is read from the calling line, the 
normal function of the letter (e.g., an axis move) is overridden, so that letter serves 
merely to pass a parameter to the subroutine. 
If there are remaining letter values on the calling line that are not read, those will be 
executed according to their normal function after the return from the subroutine. 
If the READ function encounters a letter in the calling line that is not in the list of letters 
to be read, the reading action stops, even if there are other letters from the list still to be 
read on the calling line. For example, if the calling line were CALL100 X10 Y20 
Z30, and PROG 100 started with a READ(X,Z), the X-value would be read 
successfully, but not the Z-value. 
Example 
In standard machine tool code, a two-second DWELL would be commanded in the program as a 
G04 X2000, for instance. In PMAC, a G04 is interpreted as a CALL to label N04000 of PROG 
1000, so to implement this function properly, PROG 1000 would contain the following code: 
N04000 READ(X) 
DWELL (Q124) 
RETURN 
Also, in standard machine tool code, the value assigned to the current position of the axis may be 
changed with the G92 code, followed by the letters and the new assigned values of any axes (e.g. 
G92 X20 Y30). It is important only to assign new values to axes specified in this particular 
G92 command, so the PMAC subroutine implementing G92 with the PSET command must check 
to see if that particular axis is specified: 
 N92000 READ(X,Y,Z) 
    IF (Q100 & $800000 > 0) PSET X(Q124) 
    IF (Q100 & $1000000 > 0) PSET Y(Q125) 
    IF (Q100 & $2000000 > 0) PSET Z(Q126) 
 RETURN 
See Also 
Subroutines and Subprograms (Writing a Motion Program) 
Program commands CALL, GOSUB, G, M, T, D 
RESUME PLC 
Function 
Resume execution of PLC programs(s) 
Type 
Motion program (PROG and ROT), PLC program 
Syntax 
RESUME PLC {constant}[,{constant}...] 
RES PLC {constant}[,{constant}...] 
RESUME PLC{constant}[..{constant}] 
RES PLC {constant}[..{constant}] 
where: 
•  {constant} is an integer from 0 to 31, representing the program number. 
Remarks 
This command causes PMAC to resume execution of the specified uncompiled PLC 
program or programs at the point where execution was suspended with the PAUSE PLC 
command, which is not necessarily at the top of the program. 










