Reference Manual
PMAC 2 Software Reference
PMAC Program Command Specification 337
P{constant}={expression}
Function
Set P-Variable Value
Type
Motion program (PROG and ROT)
Syntax
P{constant}={expression}
where:
• {constant} is an integer constant from 0 to 1023 representing the P-variable
number.
• {expression} represents the value to be assigned to this P-variable.
Remarks
This command sets the value of the specified P-variable to that of the expression on the
right side of the equals sign. The assignment is done as the line is processed, which in a
motion program is usually one or two moves ahead of the move actually executing at the
time (because of the need to calculate ahead in the program).
Example
P1=0
P746=P20+P40
P893=SIN(Q100)-0.5
See Also
How PMAC Executes a Motion Program (Writing a Motion Program)
On-line command P{constant}={expression}
Program commands I{constant}={expression},
M{constant}={expression}, Q{constant}={expression}.
PAUSE PLC
Function
Pause execution of PLC program(s)
Type
Motion program (PROG or ROT), PLC program
Syntax
PAUSE PLC {constant}[,{constant}...]
PAU PLC {constant}[,{constant}...]
PAUSE PLC {constant}[..{constant}]
PAU PLC {constant}[..{constant}]
Remarks
This command causes PMAC to stop execution of the specified uncompiled PLC
program or programs, with the capability to restart execution at this point (not necessarily
at the top) with a RESUME PLC command. Execution can also be restarted at the top of
the program with the ENABLE PLC command.
If the PLC program is paused from within that PLC, execution is stopped immediately
after the PAUSE PLC command.
If the PLC program is paused while it is not in the middle of a scan, which is always the
case if it is paused from another background PLC, it will obviously be paused at the end
of a scan – after an ENDWHILE or after the last line.
If the PLC program is paused while it has been interrupted in the middle of a scan (for
example, from a motion program), its execution will resume after the interrupt and
continue until after it executes any of the following:
• Any ENABLE PLC, DISABLE PLC, PAUSE PLC, or RESUME PLC command
• An ENDWHILE command
• The last line of the program
Execution will be paused at this point.