Reference Manual
PMAC 2 Software Reference
330 PMAC Program Command Specification
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 you use this M-variable in further expressions before
the next move in the program is started, you will not get the value
assigned in this statement.
Example
M20|=$01 ; Set low bit of byte M20, leave other bits
M875|=$FF00 ; Set high byte, leaving low byte as is
See Also
How PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing a
Motion Program)
Program Commands M{constant}=, M{constant}==, M{constant}&=,
M{constant}^=
M{constant}^={expression}
Function
M-Variable ‘XOR-Equals’ Assignment
Type
Motion program (PROG and ROT)
Syntax
M{data}^={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 ‘XORed’
with this M-variable.
Remarks
This form is equivalent to M{constant}=M{constant}^{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 you use this M-variable in further expressions before
the next move in the program is started, you will not get the value
assigned in this statement.
Example
M20^=$FF ; Toggle all bits of byte M20
M99^=$80 ; Toggle bit 7 of M99, leaving other bits as is
See Also
How PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing a
Motion Program)
Program Commands M{constant}=, M{constant}==, M{constant}&=,
M{constant}|=