6 BASIC INSTRUCTIONS
6.1 Comparison Operation Instructions
153
6
Comparing 16-bit binary data band
ZCP(P)(_U)
These instructions perform a comparison operation on the 16-bit binary data in the device specified by (s1) and the 16-bit
binary data in the device specified by (s2) with the 16-bit binary data in the device specified by comparison source (s3), and
output the comparison result (below, within zone, above) to the device specified by (d) onwards.
■Descriptions, ranges, and data types
■Applicable devices
*1 T, ST, C cannot be used.
Ladder diagram Structured text
ENO:=ZCP(EN,s1,s2,s3,d);
ENO:=ZCPP(EN,s1,s2,s3,d);
ENO:=ZCP_U(EN,s1,s2,s3,d);
ENO:=ZCPP_U(EN,s1,s2,s3,d);
Operand Description Range Data type Data type (label)
(s1) ZCP(P) Lower limit comparison data or the device
where the comparison data is stored
-32768 to +32767 16-bit signed binary ANY16
ZCP(P)_U 0 to 65535 16-bit unsigned binary ANY16_U
(s2) ZCP(P) Upper limit comparison data or the device
where the comparison data is stored
-32768 to +32767 16-bit signed binary ANY16
ZCP(P)_U 0 to 65535 16-bit unsigned binary ANY16_U
(s3) ZCP(P) Comparison source data or the device where
the comparison source data is stored
-32768 to +32767 16-bit signed binary ANY16
ZCP(P)_U 0 to 65535 16-bit unsigned binary ANY16_U
(d) The starting bit device to which the comparison
result is output
Bit ANY_BOOL
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)
(s3)
(d)
*1