Signed Binary Compare - Cps - Omron CQM1H - PROGRAM Programming Manual

Programmable controllers; inner boards
Table of Contents

Advertisement

Comparison Instructions
Flags
Example
00000
IR 100
IR 101
IR 102
IR 103
IR 104
IR 105
IR 106
IR 107
IR 108
IR 109
IR 110
IR 111
IR 112
IR 113
IR 114
IR 115
5-19-6 SIGNED BINARY COMPARE – CPS(––)
Description
286
ER:
One of the tables (i.e., TB1 through TB1+15, or TB2 through TB2+15)
exceeds the data area.
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
EQ:
ON if the entire contents of both tables are equal and R=0000.
The following example shows the comparisons made and the results provided
for MCMP(19). Here, the comparison is made during each cycle when 00000
is ON.
TB1: IR 100
0100
0200
0210
ABCD
ABCD
ABCD
ABCD
0800
0900
1000
ABCD
ABCD
ABCD
1400
0210
1212
Ladder Symbols
CPS(−−)
Cp1
Cp2
000
When the execution condition is OFF, CPS(––) is not executed. When the exe-
cution condition is ON, CPS(––) compares the 16-bit (4-digit) signed binary
contents in Cp1 and Cp2 and outputs the result to the GR, EQ, and LE flags in
the SR area.
Address Instruction
MCMP(19)
00000
100
00001
DM 0200
DM 0300
TB2: DM 0200
DM 0200
0100
DM 0201
0200
DM 0202
0210
DM 0203
0400
DM 0204
0500
DM 0205
0600
DM 0206
0700
DM 0207
0800
DM 0208
0900
DM 0209
1000
DM 0210
0210
DM 0211
1200
DM 0212
1300
DM 0213
1400
DM 0214
0210
DM 0215
1600
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
Section 5-19
Operands
LD
00000
MCMP(19)
DM
0200
DM
0300
R: DM 0300
DM 030000
0
DM 030001
0
DM 030002
0
DM 030003
1
DM 030004
1
DM 030005
1
DM 030006
1
DM 030007
0
DM 030008
0
DM 030009
0
DM 030010
1
DM 030011
1
DM 030012
1
DM 030013
0
DM 030014
0
DM 030015
1
Operand Data Areas
Cp1: First compare word
Cp2: Second compare word
000
Not used. Set to 000.
100

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents