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 #184 background imageLoading...
Page #184 background image
6 - 33 6 - 33
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
(2) The values for
S
and
D
can be between 0 to 99999999 (BCD 8-digit).
(3) The following will result if an underflow is generated by the subtraction operation:
The carry flag in this case does not go ON.
21 34567921 345678 99 999999
-
[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
S
or
D
BCD data is outside the 0 to 99999999 range. (Error code: 4100)
[Program Example]
(1) The following program adds the BCD data 12345600 and 34567000, stores the result at D887
and D888, and at the same time outputs them to from Y30 to Y4F.
[Ladder Mode]
Stores 12345600 at D887,D888 as BCD
Adds BCD 34567000 and D887,D888
and stores the result in D887,D888
Outputs data at D887,D888 to Y30 to Y4F
[List Mode]
Steps
Instruction
Device
(2)The following program subtracts the BCD data 98765432 from 12345678, stores the result at
D100 and D101, and at the same time outputs it from Y30 to Y4F.
[Ladder Mode]
Stores 98765432 at D100,D101 as BCD data.
Subtracts 12345678 from data in D100,D101
and stores result as BCD data at D100,D101
Outputs data at D100,D101 to Y30 to Y4F
[Ladder Mode]
Steps
Instruction
Device
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