Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC Program Command Specification 448
{expression} is a mathematical expression representing the value to be ORed with this M-
variable.
This form is equivalent to M{data}=M{data}|{expression}, except that the bit-by-bit OR and
the assignment of the resulting value to the M-variable do not happen until the start of the following servo
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|=$01 ; Set low bit of byte M20, leave other bits
M875|=$FF00 ; Set high byte, leaving low byte as is
M(Q5)|=Q8 & $F
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 XOR-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 XORed with this M-
variable.
This form is equivalent to M{data}=M{data}^{expression}, except that the bit-by-bit XOR and
the assignment of the resulting value to the M-variable do not happen until the start of the following servo
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^=$FF ; Toggle all bits of byte M20
M99^=$80 ; Toggle bit 7 of M99, leaving other bits as is
M(P1)^=P2