Reference Manual

PMAC 2 Software Reference
328 PMAC Program Command Specification
Note:
In a motion program, the assignment is done as the line is processed, not
necessarily in order with the actual execution of the move commands on
either side of it. If it is in the middle of a continuous move sequence, the
assignment occurs one or two moves ahead of its apparent place in the
program (because of the need to calculate ahead in the program).
If the actual assignment of the value to the variable should be synchronous with the
beginning of the next move, use the synchronous M-variable assignment command
M{constant}=={expression instead.
Example
M1=1
M102=$00FF
M161=P161*I108*32
M20=M20 & $0F
See Also
How PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing a
Motion Program)
Program Commands I{constant}=, P{constant}=, Q{constant}=,
M{constant}==.
M{constant}=={expression}
Function
Synchronous M-Variable Value Assignment
Type
Motion program (PROG and ROT)
Syntax
M{constant}=={expression}
where:
{constant} is an integer constant from 0 to 1023 representing the number of the
M-variable.
{expression} is a mathematical expression representing the value to be assigned
to this M-variable.
Remarks
This command allows the value of an M-variable to be set synchronously with the start of
the next move or dwell. This is especially useful with M-variables assigned to outputs,
so the output changes synchronously with beginning or end of the move. Non-
synchronous calculations (with the single =) are fully executed ahead of time during
previous moves.
Note:
This command may not be used with any of the thumbwheel-multiplexer
forms of M-variables (TWB, TWD, TWR, TWS).
In this form, the expression on the right side is evaluated just as for a non-synchronous
assignment, but the resulting value is not assigned to the specified M-variable until the
start of the actual execution of the following motion command.
Note:
Remember that if this M-variable is used in further expressions before
the next move in the program is started, the value assigned in this
statement will not be received.
Example
X10
M1==1 ; Set Output 1 at start of actual blending to next move.
X20
M60==P1+P2