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 #168 background imageLoading...
Page #168 background image
6 - 17 6 - 17
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
(4) The following will happen when an underflow or overflow is generated in an operation result:
The carry flag in this case does not go ON.
K32767 +K2
(H7FFF)
K-32768 +K-2
(H8000)
(H0002)
(HFFFE)
K-32767......A negative value is generated if b15 is 1.
K32766.......A positive value is generated if b15 is 0.
(H7FFE)
(H8001)
-
(1) Subtracts 16-bit BIN data designated by
D
from 16-bit BIN data designated by
S
and stores
the result of the subtraction at the device designated by
D
.
5678 (BIN)
b15- - - - - - - - -b0
4444 (BIN)1234 (BIN)
D S D
b15- - - - - - - - -b0 b15- - - - - - - - -b0
-
(2) Values for
S
and
D
can be designated between -32768 and 32767 (BIN, 16 bits).
(3) The judgment of whether data is positive or negative is made by the most significant bit (b15).
• 0 ....... Positive
• 1 ....... Negative
(4) The following will happen when an underflow or overflow is generated in an operation result:
The carry flag in this case does not go ON.
K32767
-K2
(
H7FFF
)
-K-2
(H8000) (H0002)
K-32767......A negative value is generated if b15 is 1.
K32766.......A positive value is generated if b15 is 0.
(H7FFE)
(
H8001
)
(
H0002
)
K-32768
[Operation Errors]
(1) There are no operation errors associated with the +(P) or -(P) instructions.
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