Function, 2 instructions, Options – Omron SYSMAC CP CP1E-N@@D@-@ User Manual
Page 125

2-89
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Co
mp
ari
s
on I
n
stru
ctio
ns
2
=, <>
, <, <=, >, >=
Function
i
Options
The input comparison instructions can compare signed or unsigned data and they can compare one-
word or double values. If no options are specified, the comparison will be for one-word unsigned data.
With the three input types and two options, there are 72 different input comparison instructions.
Less Than Flag
P_LT
• ON if S
1
< S
2
with one-word data.
• OFF in all other cases.
• ON if S
1
+1, S
1
< S
2
+1, S
2
with double-length data.
• OFF in all other cases.
Less Than or Equal Flag
P_LE
• ON if S
1
≤ S
2
with one-word data.
• OFF in all other cases.
• ON if S
1
+1, S
1
≤ S
2
+1, S
2
with double-length data.
• OFF in all other cases.
Negative Flag
P_N
OFF or unchanged
OFF or unchanged
Symbol
Option (data format)
Option (data length)
=
(Equal)
< > (Not equal)
<
(Less than)
<= (Less than or equal)
>
(Greater than)
>= (Greater than or equal)
None: Unsigned data
S: Signed data
None: One-word data
L: Double-length data
Function
Mnemonic
Name
Code
True if C1 = C2
LD/AND/OR =
EQUAL
300
LD/AND/OR =L
DOUBLE EQUAL
301
LD/AND/OR =S
SIGNED EQUAL
302
LD/AND/OR =SL
DOUBLE SIGNED EQUAL
303
True if C1
≠ C2
LD/AND/OR <>
NOT EQUAL
305
LD/AND/OR <>L
DOUBLE NOT EQUAL
306
LD/AND/OR <>S
SIGNED NOT EQUAL
307
LD/AND/OR <>SL
DOUBLE SIGNED NOT EQUAL
308
True if C1 < C2
LD/AND/OR <
LESS THAN
310
LD/AND/OR DOUBLE LESS THAN 311 LD/AND/OR SIGNED LESS THAN 312 LD/AND/OR DOUBLE SIGNED LESS THAN 313 Name Label Operation Data length: one-word Data length: double length < < S1 S2 S1 S2 S1 S2 < LD connection AND connection OR connection ON execution condition when ON execution condition when ON execution condition when The input comparison instruction compares S1 The input comparison instructions are treated just Input type Operation LD The instruction can be connected directly to the AND The instruction cannot be connected directly to the OR The instruction can be connected directly to the
comparison result is true.
comparison result is true.
comparison result is true.
and S2 as signed or unsigned values and creates
an ON execution condition when the comparison
condition is true.
like the LD, AND, and OR instructions to control
the execution of subsequent instructions.
left bus bar.
left bus bar.
left bus bar.