178
7 BASIC INSTRUCTIONS
7.1 Comparison Operation Instructions
Processing details
• These instructions perform a comparison operation between (n) point(s) of 16-bit binary data in the device starting from the
one specified by (s1) and (n) point(s) of 16-bit binary data in the device starting from the one specified by (s2), and store the
comparison result in (n) point(s) of data starting from the device specified by (d).
• The relevant devices of (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 16 bits.
• A constant can be directly specified in (s1).
• The following table lists the comparison operation result of each instruction.
• When the comparison operation result is all ON (1) in all (n) point(s) starting from (d), SM704 and SM8090 (block
comparison signal) turns ON.
Operation error
Instruction symbol
Condition
Result
BKCMP=(P)(_U)
(s1) = (s2)
On(1)
BKCMP<>(P)(_U)
(s1)
(s2)
BKCMP>(P)(_U)
(s1) > (s2)
BKCMP<=(P)(_U)
(s1)
(s2)
BKCMP<(P)(_U)
(s1) < (s2)
BKCMP>=(P)(_U)
(s1)
(s2)
BKCMP=(P)(_U)
(s1)
(s2)
Off(0)
BKCMP<>(P)(_U)
(s1) = (s2)
BKCMP>(P)(_U)
(s1)
(s2)
BKCMP<=(P)(_U)
(s1) > (s2)
BKCMP<(P)(_U)
(s1)
(s2)
BKCMP>=(P)(_U)
(s1) < (s2)
Error code
(SD0/SD8067)
Description
2820H
The (n) point(s) starting from the device specified by (s1), (s2), and (d) exceeds said device.
2821H
When (d) specifies "D
.b", the data register of (d) and the (n) point(s) of data starting from the device specified by (s1) overlap.
When (d) specifies "D
.b", the data register of (d) and the (n) point(s) of data starting from the device specified by (s2) overlap.
∙∙∙
>
OFF
ON
OFF
ON
1234
(BIN)
5678
(BIN)
5000
(BIN)
7777
(BIN)
4321
(BIN)
(n)
(n)
(n)
5321
(BIN)
3399
(BIN)
5678
(BIN)
6543
(BIN)
1200
(BIN)
(0)
(1)
(0)
(1)
ON
(1)
(s1)
(s1)+1
(s1)+(n-2)
(s1)+(n-1)
(s1)+2
∙∙∙
(s2)
(s2)+1
(s2)+(n-2)
(s2)+(n-1)
(s2)+2
∙∙∙
(d)
(d)+1
(d)+(n-2)
(d)+(n-1)
(d)+2
b15
b0
∙∙∙
b15
b0
∙∙∙
=
ON
OFF
ON
OFF
32000
(BIN)
(n)
(n)
32000
(BIN)
4321
(BIN)
32000
(BIN)
1234
(BIN)
5678
(BIN)
(1)
(0)
(1)
(0)
OFF
(0)
(s1)
∙∙∙
(s2)
(s2)+1
(s2)+(n-2)
(s2)+(n-1)
(s2)+2
∙∙∙
(d)
(d)+1
(d)+(n-2)
(d)+(n-1)
(d)+2
b15
b0
∙∙∙
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......