Omron SYSMAC C200HS Operation Manual page 185

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Data Comparison
Example
00000
CD 001
001
0210
Compare data in IR 001
(which contains 0210)
with the given ranges.
5-17-5 TABLE COMPARE – TCMP(85)
Limitations
Description
Flags
The following example shows the comparisons made and the results provided
for BCMP(68). Here, the comparison is made during each cycle when 00000 is
ON.
Lower limits
HR 10
0000
HR 12
0101
HR 14
0201
HR 16
0301
HR 18
0401
HR 20
0501
HR 22
0601
HR 24
0701
HR 26
0801
HR 28
0901
HR 30
1001
HR 32
1101
HR 34
1201
HR 36
1301
HR 38
1401
HR 40
1501
Ladder Symbols
TCMP(85)
@TCMP(85)
CD
TB
R
TB and TB+15 must be in the same data area.
When the execution condition is OFF, TCMP(85) is not executed. When the exe-
cution 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 DM word is non-existent. (Content of ∗DM word is
not BCD, or the DM area boundary has been exceeded.)
Address Instruction
BCMP(68)
00000
LD
001
00001
BCMP(68)
HR 10
HR 05
Upper limits
HR 11
0100
HR 13
0200
HR 15
0300
HR 17
0400
HR 19
0500
HR 21
0600
HR 23
0700
HR 25
0800
HR 27
0900
HR 29
1000
HR 31
1100
HR 33
1200
HR 35
1300
HR 37
1400
HR 39
1500
HR 41
1600
IR, SR, AR, DM, HR, TC, LR, #
TB: First comparison table word
CD
TB
R
IR, SR, AR, DM, HR, TC, LR
Section 5-17
Operands
00000
001
HR
10
HR
05
R: HR 05
HR 0500
0
HR 0501
0
HR 0502
1
HR 0503
0
HR 0504
0
HR 0505
0
HR 0506
0
HR 0507
0
HR 0508
0
HR 0509
0
HR 0510
0
HR 0511
0
HR 0512
0
HR 0513
0
HR 0514
0
HR 0515
0
Operand Data Areas
CD: Compare data
IR, AR, DM, HR, TC, LR
R: Result word
175

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents