EasyManuals Logo

Mitsubishi MELSEC QCPU User Manual

Mitsubishi MELSEC QCPU
285 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #198 background imageLoading...
Page #198 background image
6 - 47 6 - 47
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
(3) The constant designated by
S2
can be between -32768 to 32767 (BIN 16 bits).
+
(BIN)
(BIN)
(BIN)
5555
8888
(BIN)3087
(BIN)
8321
(BIN)
(BIN)
(BIN)
b15 - - - - - - - b0
1234
4567
-2000
(BIN)-1234
(BIN)
4000
+1
+(n-2)
+(n-1)
n
(BIN)4321
S1S1
DD
S1S1
+2
S1S1
S1S1
S1S1
S2
+1
+(n-2)
+(n-1)
+2
n
2321
DD
DD
DD
DD
b15 - - - - - - - b0
b15 - - - - - - - b0
(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.
K32767
(H7FFF)
K-32767
(
H8000
)
+K-2
+K2
K-32767
K32766
(H0002) (H8001)
(
HFFFE
)
(
H7FFE
)
BK
(1) Subtracts n-points of BIN data from the device designated by
S1
and n-points of BIN data from
the device designated by
S2
and stores the result from the device designated by
D
onward.
(BIN)
(BIN)
(BIN)
1234
5678
9876
(BIN)4321
(BIN)
4000
(BIN)
(BIN)
(BIN)
7531
3210
-551
(BIN)679
(BIN)
352
(BIN)
(BIN)
(BIN)
b15 - - - - - - - b0
8765
8888
9325
(BIN)5000
(BIN)
4352
+1
+2
+(n-2)
+(n-1)
n
S1
S2
D
S1
S1
S1
S1
+1
+2
+(n-2)
+(n-1)
S2
S2
S2
S2
n
+1
+2
+(n-2)
+(n-1)
n
D
D
D
D
-
b15 - - - - - - - b0 b15 - - - - - - - b0
(2) Block subtraction is performed in 16-bit units.
(3) The constant designated by
S2
can be between-32768 to 32767 (BIN 16 bits).
(BIN)8880
(BIN)
(BIN)
(BIN)
8
445
(BIN)
(BIN)
(BIN)
(BIN)
(BIN)
b15 - - - - - - - b0
8765
8888
9325
(BIN)5000
(BIN)
4352
+1
+2
+(n-2)
+(n-1)
n
S1
S2
D
S1
S1
S1
S1
+1
+2
+(n-2)
+(n-1)
n
D
D
D
D
-115
-4528
-3880
-
b15 - - - - - - - b0
b15 - - - - - - - b0
(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.
K-32768
(H8000)
K32767
(H8000)
-K-2
-K2
K32766
-32766
(H0002)
(H8001)(H0002)
(H7FFF)
[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
S1
,
S2
, or
D
device exceeds the range of that device.
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)
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC QCPU and is the answer not in the manual?

Mitsubishi MELSEC QCPU Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC QCPU
CategoryController
LanguageEnglish

Related product manuals