Mitsubishi MELSEC QCPU Programming Manual page 198

Programmable logic controller
Table of Contents

Advertisement

6 BASIC INSTRUCTIONS
(3) The constant designated by
b15 - - - - - - - b0
1234
S1
S1
+1
4567
S1
S1
+2
-2000
S1
S1
+(n-2)
-1234
S1
S1
+(n-1)
4000
S1
S1
(4) The following happens if an underflow or overflow is generated in the operation results:
The carry flag in this case does not go ON.
BK –
(1) Subtracts n-points of BIN data from the device designated by
the device designated by
b15 - - - - - - - b0
8765
S1
+1
8888
S1
+2
9325
S1
+(n-2)
5000
S1
+(n-1)
4352
S1
(2) Block subtraction is performed in 16-bit units.
(3) The constant designated by
b15 - - - - - - - b0
8765
S1
+1
8888
S1
+2
9325
S1
+(n-2)
5000
S1
+(n-1)
4352
S1
(4) The following happens if an underflow or overflow is generated in the operation results:
The carry flag in this case does not go 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 n-bit range from the
• The device range for n points starting from the device designated by
device range for n points starting from the device designated by
• The device range for n points starting from the device designated by
device range for n points starting from the device designated by
• The device range for n points starting from the device designated by
device range for n points starting from the device designated by
6 - 47
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
can be between -32768 to 32767 (BIN 16 bits).
S2
(BIN)
(BIN)
b15 - - - - - - - b0
(BIN)
+
S2
n
(BIN)
(BIN)
• K32767
+K2
(H7FFF)
(H0002)
• K-32767
+K-2
(H8000)
(HFFFE)
and stores the result from the device designated by
S2
b15 - - - - - - - b0
(BIN)
S2
(BIN)
+1
S2
(BIN)
+2
S2
-
n
(BIN)
+(n-2)
S2
(BIN)
+(n-1)
S2
can be between-32768 to 32767 (BIN 16 bits).
S2
(BIN)
(BIN)
b15 - - - - - - - b0
(BIN)
-
S2
n
(BIN)
(BIN)
• K-32768
-K2
(H8000)
(H0002)
• K32767
-K-2
(H8000)
(H0002)
,
, or
D
S1
S2
D D
+1
D D
+2
D D
4321
(BIN)
+(n-2)
D D
+(n-1)
D D
K-32767
(H8001)
K32766
(H7FFE)
S1
1234
(BIN)
D
5678
(BIN)
+1
D
9876
(BIN)
+2
D
n
4321
(BIN)
+(n-2)
D
4000
(BIN)
+(n-1)
D
D
+1
D
+2
D
8880
(BIN)
+(n-2)
D
+(n-1)
D
K32766
(H7FFF)
-32766
(H8001)
device exceeds the range of that device.
MELSEC-Q/QnA
b15 - - - - - - - b0
5555
(BIN)
8888
(BIN)
2321
(BIN)
n
3087
(BIN)
8321
(BIN)
and n-points of BIN data from
onward.
D
b15 - - - - - - - b0
7531
(BIN)
3210
(BIN)
-551
(BIN)
n
679
(BIN)
352
(BIN)
b15 - - - - - - - b0
-115
(BIN)
8
(BIN)
445
(BIN)
n
-3880
(BIN)
-4528
(BIN)
overlaps with the
S1
. (Error code: 4101)
D
overlaps with the
S2
. (Error code: 4101)
D
overlaps with the
S1
. (Error code: 4101)
S2
6 - 47

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qnacpuMelsec q modeMelsec q series

Table of Contents