EasyManuals Logo

Omron SYSMAC CP Series Instruction & Reference Manual

Omron SYSMAC CP Series
467 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #131 background image
2-95
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Comparison Instructions
2
CMP/CMPL
CMP/CMPL
Applicable Program Areas
Operands
Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
COMPARE CMP !CMP 020
Compares two unsigned binary values (constants
and/or the contents of specified words) and out-
puts the result to the Arithmetic Flags in the Auxil-
iary Area.
DOUBLE COMPARE CMPL --- 060
Compares two double unsigned binary values
(constants and/or the contents of specified words)
and outputs the result to the Arithmetic Flags in
the Auxiliary Area.
Symbol
CMP CMPL
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description
Data type Size
CMP CMPL CMP CMPL
S1
CMP: Comparison data 1
CMPL: Comparison data 1, rightmost word address
UINT UDINT 1 2
S2
CMP: Comparison data 2
CMPL: Comparison data 2, rightmost word address
UINT UDINT 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 OK OK OK OK OK OK OK OK OK OK --- --- ---
Name
CX-Programmer
label
Operation
CMP CMPL
Error Flag P_ER Unchanged Unchanged
Greater Than Flag P_GT ON if S
1
> S
2
.
OFF in all other cases.
ON if S
1
+1, S
1
> S
2
+1, S
2
.
OFF in all other cases.
Greater Than or Equal Flag P_GE ON if S
1
S
2
.
OFF in all other cases.
ON if S
1
+1, S
1
S
2
+1, S
2
.
OFF in all other cases.
Equal Flag P_EQ ON if S
1
= S
2
.
OFF in all other cases.
ON if S
1
+1, S
1
= S
2
+1, S
2
.
OFF in all other cases.
Not Equal Flag P_NE ON if S
1
S
2
.
OFF in all other cases.
ON if S
1
+1, S
1
S
2
+1, S
2
.
OFF in all other cases.
Less Than Flag P_LT ON if S
1
< S
2
.
OFF in all other cases.
ON if S
1
+1, S
1
< S
2
+1, S
2
.
OFF in all other cases.
Less Than or Equal Flag P_LE ON if S
1
S
2
.
OFF in all other cases.
ON if S
1
+1, S
1
S
2
+1, S
2
.
OFF in all other cases.
Negative Flag P_N Unchanged Unchanged
CMP(020)
S
1
S2
S1: Comparison data 1
S
2: Comparison data 2
CMPL(060)
S
1
S2
S1: Comparison data 1
S
2: Comparison data 2

Table of Contents

Other manuals for Omron SYSMAC CP Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC CP Series and is the answer not in the manual?

Omron SYSMAC CP Series Specifications

General IconGeneral
ManufacturerOmron
MountingDIN Rail
CategoryProgrammable Logic Controller (PLC)
Programming LanguagesFunction Block Diagram, Structured Text, Sequential Function Chart, Instruction List
Communication ProtocolsEtherNet/IP, DeviceNet, CompoNet, RS-232C, RS-485
I/O Points10 to 160
Power Supply100-240 VAC or 24 VDC
Operating Temperature0°C to 55°C
Humidity10% to 90% (non-condensing)
Vibration Resistance10 to 57 Hz, 0.075 mm amplitude
Shock Resistance147 m/s², 3 times in each direction (X, Y, Z)

Related product manuals