Omron CQM1H - PROGRAM Programming Manual page 307

Programmable controllers; inner boards
Table of Contents

Advertisement

Comparison Instructions
5-19-2 TABLE COMPARE – TCMP(85)
Limitations
Description
Flags
Example
00000
CD: 001
IR
001
0210
Compare the data in IR 001
with the given ranges.
282
Ladder Symbols
@TCMP(85)
TCMP(85)
CD
TB
R
DM 6144 to DM 6655 cannot be used for R.
When the execution condition is OFF, TCMP(85) is not executed. When the
execution condition is ON, TCMP(85) compares CD to the content of TB,
TB+1, TB+2, ..., and TB+15. If CD is equal to the content of any of these
words, the corresponding bit in R is set, e.g., if the CD equals the content of
TB, bit 00 is turned ON, if it equals that of TB+1, bit 01 is turned ON, etc. The
rest of the bits in R will be turned OFF.
ER:
The comparison table (i.e., TB through TB+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.)
The following example shows the comparisons made and the results provided
for TCMP(85). Here, the comparison is made during each cycle when IR
00000 is ON.
TCMP(85)
Upper limits
DM 0000
0100
DM 0001
0200
DM 0002
0210
DM 0003
0400
DM 0004
0500
DM 0005
0600
DM 0006
0210
DM 0007
0800
DM 0008
0900
DM 0009
1000
DM 0010
0210
DM 0011
1200
DM 0012
1300
DM 0013
1400
DM 0014
0210
DM 0015
1600
IR, SR, DM, EM, HR, TIM/CNT, LR, #
TB: First comparison table word
CD
IR, SR, DM, EM, HR, TIM/CNT, LR
TB
R
IR, SR, DM, EM, HR, TIM/CNT, LR
Address Instruction
00000
001
00001
DM 0000
216
R: 216
IR 21600
0
IR 21601
0
IR 21602
1
IR 21603
0
IR 21604
0
IR 21605
0
IR 21606
1
IR 21607
0
IR 21608
0
IR 21609
0
IR 21610
1
IR 21611
0
IR 21612
0
IR 21613
0
IR 21614
1
IR 21615
0
Section 5-19
Operand Data Areas
CD: Compare data
R: Result word
Operands
LD
00000
TCMP(85)
DM
0000
001
216

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents