Omron CP1E-N@@D@-@ Computer Hardware User Manual


 
2 Instructions
2-88
CP1E CPU Unit Instructions Reference Manual(W483)
Comparison Instructions
=, <>, <, <=, >, >=
Applicable Program Areas
Operands
Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
Input Comparison Instructions
=, <>, <, <=, >,
>=
--- 300 to 328
Input comparison instructions compare two values
(constants and/or the contents of specified words)
and create an ON execution condition when the
comparison condition is true.
Input comparison instructions are available to
compare signed or unsigned data of one-word or
double length data.
Symbol
=, <>, <, <=, >, >=
LD connection AND connection OR connection
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description
Data type Size
Unsigned
Unsigned
double length
Signed
Signed
double length
One-word Double length
S1 Comparison data 1 UINT UDINT INT DINT 1 2
S2 Comparison data 2 UINT UDINT INT DINT 1 2
Area
Word addresses Indirect DM addresses
Constants CF Pulse bits
TR
bits
CIO WR HR AR T C DM @DM *DM
S1,S2 OKOKOKOKOKOKOK OK OK OK --- --- ---
Name Label
Operation
Data length: one-word Data length: double length
Error Flag P_ER OFF or unchanged OFF or unchanged
Greater Than Flag P_GT 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.
Greater Than or Equal Flag P_GE 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.
Equal Flag P_EQ 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.
Not Equal Flag P_NE 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.
S
1
S
2
S1: Comparison data 1
S2: Comparison data 2
Mnemonic
S
1
S
2
S1: Comparison data 1
S2: Comparison data 2
Mnemonic
S1
S2
S1: Comparison data 1
S2: Comparison data 2
Mnemonic