6 - 13 6 - 13
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
(2) The comparison operation is conducted in 16-bit units.
(3) The constant designated by
S1
can be between -32768 and 32767 (BIN 16-bit data).
(1)
(0)
(1)
ON
OFF
ON
(0)OFF
(0)
OFF
n
(BIN)
(BIN)
(BIN)
32000
4321
32000
(BIN)1234
(BIN)
5678
n
Operation Results
(BIN)32000
+1
+2
D
+(n-2)
+(n-1)
D
D
D
D
+1
+2
S2
+(n-2)
+(n-1)
S2
S2
S2
S2
S1
=
(4) The results of the comparison operations for the individual instructions are as follows:
Instruction
Symbols
Condition
Comparison
Operation Result
Instruction
Symbols
Condition
Comparison
Operation Result
BKCMP
S1
S2
BKCMP
S1
S2
BKCMP
S1
S2
BKCMP
S1
S2
BKCMP
S1
S2
BKCMP
S1
S2
BKCMP
S1
S2
BKCMP
S1
S2
BKCMP
S1
S2
BKCMP
S1
S2
BKCMP
S1
S2
ON (1)
BKCMP
S1
S2
OFF (0)
(5) If all comparison results stored n-points from
D
are ON (1), SM704 (block comparison signal)
goes ON.
[Operation Errors]
(1) In the following cases an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored at SD0.
• The range of the device n points from a device designated by
S1
,
S2
or
D
exceeds the
relevant device. (Error code: 4101)
• The device range for n points starting from the device designated by
S1
overlaps with the
device range for n points starting from the device designated by
D
. (Error code: 4101)
• The device range for n points starting from the device designated by
S2
overlaps with the
device range for n points starting from the device designated by
D
. (Error code: 4101)
• The device range for n points starting from the device designated by
S1
overlaps with the
device range for n points starting from the device designated by
S2
. (Error code: 4101)
(2) See Section 3.6 for information regarding errors during index modification.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com