Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC On-line Command Specification 351
The status of locking bits 0 7 is reported as bits 4 11, respectively, of I4904.
If a motion program buffer or a PLC program buffer is open when this command is issued, this command
will be entered into that buffer as a program command for future execution; it will not be treated as an on-
line command.
Example:
LOCK4,P10 ; Check status of locking bit 4
P10 ; Ask for result
1 ; Turbo PMAC reports that process 4 is locked
LOCK4,P10 ; Try again
P10 ; Ask for result
0 ; Turbo PMAC reports that process 4 is available
M1=M1^1 ; Invert Machine Output 1
UNLOCK4 ; Release process 4 for other tasks
M{constant}
Function: Report the current M-variable values.
Scope: Global
Syntax: M{constant}[..{constant}]
where:
{constant} is an integer from 0 to 8191 representing the number of the M-variable;
the optional second {constant} must be at least as great as the first {constant} -- it represents
the number of the end of the range;
M{constant},{constant},{constant}
where:
the first {constant} is an integer from 0 to 8190 representing the number of the first M-variable;
the second {constant} is an integer from 1 to 8191 representing the number M-variables whose
value is to be reported;
the third {constant} is an integer from 1 to 8191 representing the numerical spacing between each
M-variable whose value is to be reported;
This command causes Turbo PMAC to report the current value of the specified M-variable, or range or
set of M-Variables. It does not cause Turbo PMAC to report the definition (address) of the M-Variables;
that is done with the M{constant}-> command.
Note:
If a motion program buffer (including a rotary buffer) is open when this command
is sent to Turbo PMAC it will be entered into the buffer for later execution, to be
interpreted as an M-code subroutine call.
Example:
M0 ; Host asks for value
3548976 ; Turbo PMAC's response
M165
5.75
M1..3
1
0
1
M103,4,100 ; Request for values of M103, M203, M303, M403
34221 ; Turbo PMAC responds with 4 lines
29726
-38657