6 BASIC INSTRUCTIONS
6.1 Comparison Operation Instructions
159
6
Comparing 32-bit binary block data
DBKCMP(P)(_U)
These instructions perform a comparison operation between the (n) point(s) of 32-bit binary data starting from the device
specified by (s1) and the (n) point(s) of 32-bit binary data starting from the device specified by (s2), and store the operation
result in the device specified by (d).
■Descriptions, ranges, and data types
■Applicable devices
*1 T, ST, C cannot be used.
• These instructions perform a comparison operation between (n) point(s) of 32-bit binary data starting from the device
specified by (s1) and (n) point(s) of 32-bit binary data starting from the device specified by (s2), and store the comparison
result in (n) point(s) of data starting from the device specified by (d).
• The relevant (n) point(s) of data starting from the device specified by (d) are turned ON when the comparison conditions are
met and turned OFF when the comparison conditions are not met.
• Comparison operation is performed in units of 32 bits.
Ladder diagram Structured text
( is to be replaced by any of the following: DBKCMP=(P)(_U),
DBKCMP<>(P)(_U), DBKCMP>(P)(_U), DBKCMP<=(P)(_U),
DBKCMP<(P)(_U), DBKCMP>=(P)(_U).)
Not supported
Operand Description Range Data type Data type (label)
(s1) DBKCMP(P) Comparison data or the head device where the
comparison data is stored
-2147483648 to +2147483647 32-bit signed binary ANY32
DBKCMP(P)_
U
0 to 4294967295 32-bit unsigned binary ANY32_U
(s2) DBKCMP(P) Head device where the comparison source
data is stored
32-bit signed binary ANY32
DBKCMP(P)_
U
32-bit unsigned binary ANY32_U
(d) Head device storing comparison result Bit ANY_BOOL
(n) Number of data to be compared 0 to 65535 16-bit unsigned binary ANY16_U
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s1)
(s2)
(d)
*1
(n)
···
···
···
···
···
···
=
OFF
OFF
ON
ON
(n)
1090 (BIN)
2080 (BIN)
5060 (BIN)
1106 (BIN)
(n)
b31 b0
1000 (BIN)
2000 (BIN)
5060 (BIN)
1106 (BIN)
(0)
(0)
(1)
(1)
(n)
b31 b0
(s1)
(s1)+1,
(s1)+2
(s1)+(2n-2)
(s1)+(2n-1),
(s1)+4
(s1)+3,
(s1)+5,
(s2)
(s2)+1,
(s2)+2
(s2)+(2n-2)
(s2)+(2n-1),
(s2)+4
(s2)+3,
(s2)+5,
(d)
(d)+1
(d)+2
(d)+(n-1)
···
Operation result