230
6 BASIC INSTRUCTIONS
6.1 Comparison Operation Instructions
Comparing 16-bit binary block data
BKCMP(P)(_U)
These instructions compare the two sets of 16-bit binary block data specified.
*1 The engineering tool with version "1.035M" or later supports the ST.
*2 EQ indicates =, NE indicates <>, GT indicates >, LE indicates <=, LT indicates <, and GE indicates >=.
■Execution condition
■Description, range, data type
*1 When specifying setting data by using a label, define an array to secure enough operation area and specify an element of the array
label.
Ladder ST
*1
( is replaced by any of the following: BKCMP=(P)(_U), BKCMP<>(P)(_U),
BKCMP>(P)(_U), BKCMP<=(P)(_U), BKCMP<(P)(_U), BKCMP>=(P)(_U).)
ENO:=BKCMP_(EN,s1,s2,n,d);
ENO:=BKCMP_P(EN,s1,s2,n,d);
ENO:=BKCMP__U(EN,s1,s2,n,d);
ENO:=BKCMP_P_U(EN,s1,s2,n,d)
;
( is replaced by any of the following: EQ, NE, GT, LE, LT, GE.)
*2
FBD/LD
( is to be replaced by combination of any of the following: BKCMP_ and EQ(P)(_U), NE(P)(_U), GT(P)(_U), LE(P)(_U), LT(P)(_U), GE(P)(_U).)
*2
Instruction Execution condition
BKCMP(_U)
BKCMPP(_U)
Operand Description Range Data type Data type (label)
(s1) BKCMP(P) Comparison data or the start device where the
comparison data is stored
-32768 to 32767 16-bit signed binary ANY16_S
*1
BKCMP(P)_U 0 to 65535 16-bit unsigned binary ANY16_U
*1
(s2) BKCMP(P) Start device where the comparison data is
stored
16-bit signed binary ANY16_S
*1
BKCMP(P)_U 16-bit unsigned binary ANY16_U
*1
(d) Start device for storing the comparison
operation result
Bit ANY_BOOL
*1
(n) Number of data points to be compared 0 to 65535 16-bit unsigned binary ANY16
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)