
Chapter 5. Application instructions
5-19
5.3.2
TCMP, TCMPP, DTCMP, DTCMPP
TCMP
(Table compare)
FUN(54) TCMP
FUN(56) DTCMP
FUN(55) TCMPP
FUN(57) DTCMPP
Applicable
CPU
All CPUs
Available Device
Flag
Instructions
M
P
K
L
F
T
C
S
D
#D Integer
Steps
Error
(F110)
Zero
(F111)
Carry
(F112)
O O O O O O O
O
O
O
O O O O O
O
O
O
O
TCMP(P)
DTCMP(P)
O O O O*
O O
O O
7 / 9
O
O
* Available only when do not use computer link module or data link module
1) Functions
-
Compares content of the device specified at [ S1 ] with each contents of 16 words from the device
specified at [ S2 ].
-
The comparison result (If two words are same, 1 is output. If not, 0 is output) consists of 16 bits,
and they are stored at the device specified at [ D ].
-
If all comparison result are 0, then the zero flag (F111) is switched on. ( [ D ] = 0)
-
Execution conditions
Operand setting
TCMP
TCMPP
DTCMP
DTCMPP
Data to be compared
The device at which the
comparison result is stored
S1
S1
S2
S2
S1
S2
D
The start address of block
to be compared with
S1
S1
S2
D
D
D
Input condition
TCMP
TCMPP
Executed only once
Executed only once
Executed per scan
Executed per scan