Reference Manual
PMAC 2 Software Reference
PMAC Program Command Specification 345
The RESUME PLC command cannot be used to restart execution of a PLC program that
has been stopped with a DISABLE PLC command. However, after a PLC has been
stopped with a DISABLE PLC command, if a PAUSE PLC command is then given for
that PLC, then a RESUME PLC command can be given to start operation at the point at
which it has been stopped.
PLC programs are specified by number, and may be used singularly in this command, in
a list (separated by commas), or in a range of consecutively numbered programs.
If no buffer is open when this command is sent to PMAC, it will be executed
immediately as an on-line command.
Example
RESUME PLC 0
RESUME PLC 1,2,5
RESUME PLC 1..16
RES PLC 7
See Also
I-variable I5
On-line commands ENABLE PLC, DISABLE PLC, <CONTROL-D>, PAUSE PLC,
RESUME PLC
Program commands ENABLE PLC, DISABLE PLC, PAUSE PLC
RETURN
Function
Return From Subroutine Jump/End Main Program
Type
Motion program (PROG only)
Syntax
RETURN
RET
Remarks
The RETURN command tells the motion program to jump back to the routine that called
the execution of this routine. If this routine was started from an on-line command (Run),
program execution stops and the program pointer is reset to the top of this motion
program. Control is returned to the PMAC “operating system”.
If this routine was started from a GOSUB, CALL, G, M, T, or D command in a motion
program, program execution jumps back to the command immediately following the
calling command.
When the CLOSE command is sent to end the entry into a motion program buffer, PMAC
automatically appends a RETURN command to the end of that program. When the OPEN
command is sent to an existing motion program buffer, the final RETURN command is
automatically removed.
Example
OPEN PROG 1 CLEAR
X20 F10
X0
CLOSE ; PMAC places a RETURN here
OPEN PROG 1000 CLEAR
N0 RAPID RETURN ; Execution jumps back after one-line routine
N1000 LINEAR RETURN ; Ditto
N2000 CIRCLE1 RETURN ; Ditto
...
CLOSE ; PMAC places a RETURN here
See Also
Subroutines and Subprograms (Writing a Motion Program)
On-line commands OPEN, CLOSE
Program commands CALL, GOSUB, G, M, T, D