Outputting a comparison result of 32-bit binary data
DCMP(P)(_U)
RnPCPU
RnCPU RnENCPU
(Process)
• The RnCPU and RnENCPU with firmware version "17" or later support this instruction. (Use an engineering tool with version "1.020W" or later.)
These instructions compare the 32-bit binary data specified by (s1) with the 32-bit binary data specified by (s2), and according
to the result (small, equal, or large), (d), (d)+1, or (d)+2 is turned on.
Ladder
(s1)
FBD/LD
EN
ENO
s1
d
s2
■Execution condition
Instruction
DCMP
DCMP_U
DCMPP
DCMPP_U
Setting data
■Description, range, data type
Operand
(s1)
DCMP(P)
DCMP(P)_U
(s2)
DCMP(P)
DCMP(P)_U
(d)
EN
ENO
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB,
FX, FY
*1
(s1)
*1
(s2)
(d)
*1 FX and FY cannot be used.
*2 T, ST, and C cannot be used.
6 BASIC INSTRUCTIONS
224
6.1 Comparison Operation Instructions
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
(s2)
(d)
Execution condition
Description
Comparison data or the device where the
comparison data is stored
Comparison data or the device where the
comparison data is stored
The start device where the comparison result is
stored
Execution condition
Execution result
Word
J\
T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
*2
ST
ENO:=DCMP(EN,s1,s2,d);
ENO:=DCMPP(EN,s1,s2,d);
Range
-2147483648 to 2147483647
0 to 4294967295
-2147483648 to 2147483647
0 to 4294967295
Double word Indirect
U\G, J\,
Z
LT, LST,
U3E\(H)G
LC
ENO:=DCMP_U(EN,s1,s2,d);
ENO:=DCMPP_U(EN,s1,s2,d);
Data type
Data type (label)
32-bit signed binary
ANY32_S
32-bit unsigned binary
ANY32_U
32-bit signed binary
ANY32_S
32-bit unsigned binary
ANY32_U
Bit
ANYBIT_ARRAY
(Number of elements: 3)
Bit
BOOL
Bit
BOOL
Constant
specification
LZ
K, H E
Others
$