4.5 Motion Language Instructions
4-195
4
Motion Control Program Commands and Instructions
Logic
Opera-
tions
OR (Inclusive
OR)
MB = MB | MB;
MB = MB | 1;
MW = MW | MW;
MW = MW | 00FFH;
ML = ML | ML;
ML = ML | 00FF00FFH;
MQ = MQ | MQ;
MQ = MQ | 00FF00FF 00FF00FFH;
Performs a bit or integer inclu-
sive OR operation.
& AND (AND)
MB = MB & MB;
MB = MB & 1;
MW = MW & MW;
MW = MW & 00FFH;
ML = ML & ML;
ML = ML & 00F
F00FFH;
MQ = MQ & MQ;
MQ =
MQ & 00FF00FF 00FF00FFH;
Performs a bit or integer AND
operation.
^
XOR (Exclu-
sive OR)
MW = MW ^ MW;
MW = MW ^ 00FFH;
ML = ML ^ ML;
ML = ML ^ 00FF00FFH;
MQ = MQ ^ MQ;
MQ = MWQ ^ 00FF00FF
00FF00FFH;
Performs an integer exclusive
OR operation.
!
NOT (Logical
Complement)
MB = !MB;
MB = !1;
MW = !MW;
MW = !00FFH;
ML = !ML;
ML = !00FF00FFH;
MQ = !MQ;
MQ = !00FF00FF 00FF00FFH;
Returns the inverse of the
specified bit.
Nu
meric
Com-
parison
= =
Equal
IF MB = = MB;
WHILE MB = = MB;
IF MW = = MW;
WHILE MW = = MW;
IF ML = = ML;
WHILE ML = = ML;
IF MF = = MF;
WHILE MF = = MF;
IF MQ = = MQ;
WHILE MQ = = MQ;
IF MD = = MD;
WHILE MD = = MD;
Used in an IF or WHILE condi-
tional expression. If the left side
and right side are the same,
the condition is TRUE.
<> Mismatch
IF MW < > MW;
WHILE MW < > MW;
IF ML < > ML;
WHILE ML < > ML;
IF MF < > MF;
WHILE MF < > MF;
IF MQ < > MQ;
WHILE MQ <
> MQ;
IF MD < > MD;
WHILE MD < > MD;
Used in an IF or WHILE condi-
tional expression. If the left side
and the right side do not
match, the condition is TRUE.
Continued on next page.
Continued from previous page.
Instruc-
tion
Type
Instruc-
tion
Name Format Description