Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC Program Command Specification 447
Examples:
X10
M1==1 ; Set Output 1 at start of actual blending to next move.
X20
M60==P1+P2
M(Q5000)==0
See Also:
How Turbo PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing and
Executing Motion Programs)
Program Commands I{data}=, P{data}=, Q{data}=, M{data}=, M{data}&=, M{data}|=,
M{data}^=.
M{data}&={expression}
Function: M-Variable Synchronous And-Equals Assignment
Type: Motion program (PROG and ROT)
Syntax: M{data}&={expression}
where:
{data} is a constant, or an expression in parentheses, for an integer value from 0 to 8191
representing the M-variable number;
{expression} is a mathematical expression representing the value to be ANDed with this M-
variable.
This command is equivalent to M{data}=M{data}&{expression}, except that the bit-by-bit AND
and the assignment of the resulting value to the M-variable do not happen until the start of the actual
execution of the following motion command. The expression itself is evaluated when the program line is
encountered, as in a non-synchronous statement.
Note:
This command may not be used with any of the thumbwheel-multiplexer forms of
M-variables (TWB, TWD, TWR, or TWS), or with any of the double-word forms
(L, D, or F).
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.
Examples:
M20&=$FE ; Mask out LSB of byte M20
M346&=2 ; Clear all bits except bit 1
M(P3+2)&=$55
See Also:
How Turbo PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing and
Executing Motion Programs)
Program Commands M{data}=, M{data}==, M{data}|=, M{data}^=
M{data}|={expression}
Function: M Variable Synchronous “Or-Equals” Assignment
Type: Motion program (PROG and ROT)
Syntax: M{data}|={expression}
where:
{data} is a constant, or an expression in parentheses, for an integer value from 0 to 8191
representing the M-variable number;