Chapter 6 Instruction Details
XBC E-Type Main Unit
6-119
Ver. 1
6.22.3 TCMP, TCMPP, DTCMP, DTCMPP
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
TCMP(P)
DTCMP(P)
S1 O O O O O O O - O O O O O O O O
4~6
O
-
-
S2 O O O O O O O - O O O - O O O O
D O O O - O O O - O O O - O O O O
Operand
Description
Data Type
S1
Data or Data address to compare with S2
WORD/DWORD
S2
Data address to compare with S1
WORD/DWORD
D
Area (1 Word) to save the result of compared S1 and S2
WORD/DWORD
[Flag Set]
Flag
Description
Device
Number
Error
The value of ‘S2 area + 15 (WORD/DWORD)’ exceeded range of applicable
device.
F110
1) TCMP (Table Compare)
(1) Compares specified Compare Data S1 with 16-word data starting S2 to output to specified D area’s 16 bits
(‘1‘ if identical, ‘0’ if different).
(2) S1 sets word data or data address, and S2 sets table head area address.
2) Program Example
(1) If Input Signal P00020 is On, it compares Data ‘h0057’ saved in D0000 to 16-word data from D0002. And
compared result ‘5’ is saved in P0006.
TCMP D0000 D0002 P0006
P00020
D0000
Comparison
Data
(S1)
h0057
h0057
h1234
h0057
h3456
h7893
h1252
h3452
h4523
h0024
h3451
D0002
D0004
D0007
D0014
D0017
(S2)
5
P0006
(
D
)
TCMP,
DTCMP
P
S
1
S
2
TCMPP,
DTCMPP
S
1
S
2
means
D
D
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...