EasyManuals Logo

Omron CPM1 Programming Manual

Omron CPM1
541 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 #276 background imageLoading...
Page #276 background image
255
Comparison Instructions Section 5-18
LE: ON if Cp1 is less than Cp2.
GR: N if Cp1 is greater than Cp2.
Example In the following example, the content of 102 is greater than that of DM 0020,
so 10000 is turned ON and the other bits, 10001 and 10002, are turned OFF.
5-18-7 DOUBLE SIGNED BINARY COMPARE – CPSL(––)
Limitations This instruction is available in the CQM1-CPU4@-E/-EV1 only.
Description When the execution condition is OFF, CPSL(––) is not executed. When the
execution condition is ON, CPSL(––) compares the 32-bit (8-digit) signed
binary contents in Cp1+1, Cp1 and Cp2+1, Cp2 and outputs the result to the
GR, EQ, and LE flags in the SR area.
Precautions Placing other instructions between CPSL(––) and the operation which
accesses the EQ, LE, and GR flags may change the status of these flags. Be
sure to access them before the desired status is changed.
Comparison result Flag status
GR (SR 25505) EQ (SR 25506) LE (SR 25507)
Cp1 < Cp2 0 0 1
Cp1 = Cp2 0 1 0
Cp1 > Cp2 1 0 0
CPS(––)
DM 0020
102
00500
25505
10000
25507
10002
TR
0
25506
10001
Greater Than
Equal
Less Than
000
Address Instruction Operands
00000 LD 00500
00001 OUT TR 0
00002 CPS(––)
102
DM 0020
000
00003 AND 25505
00004 OUT 10000
00005 LD TR 0
00006 AND 25506
00007 OUT 10001
00008 LD TR 0
00009 AND 25507
00010 OUT 10002
Cp2: DM 0020
AE 3 5
>
Cp1: 102
6FA 4
(28,580 decimal) (–20,939 decimal)
Cp1: First compare word
IR, SR, AR, DM, HR, TC, LR, #
Cp2: Second compare word
IR, SR, AR, DM, HR, TC, LR, #
Ladder Symbols Operand Data Areas
CPSL(––)
Cp1
Cp2
000
000
Not used. Set to 000.

Table of Contents

Other manuals for Omron CPM1

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CPM1 and is the answer not in the manual?

Omron CPM1 Specifications

General IconGeneral
ModelCPM1
ManufacturerOmron
Instruction SetBasic and advanced instructions
Power Supply100 to 240 VAC or 24 VDC
CommunicationRS-232C
I/O Points10, 20, 30, or 40 points depending on the model
TimersYes, multiple timers available
CountersYes, multiple counters available
Input Voltage24V DC
Output TypeRelay or transistor
Number of I/O Points10, 20, 30, 40
Communication PortsRS-232C (optional)
Operating Temperature0°C to 55°C
Storage Temperature-20°C
Humidity10% to 90% (non-condensing)
DimensionsVaries depending on the model
WeightVaries depending on the model
Program Memory2048 steps (2K steps)

Related product manuals