EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 239

Mitsubishi Electric MELSEC-Q/L
1084 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
Loading...
6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
237
6
Operation error
In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Program example
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.
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.
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 The (S) or (D) BCD data is outside the 0 to 99999999 range. 
[Ladder Mode]
[List Mode]
[Ladder Mode]
[List Mode]
Stores 12345600 in BCD to D887 and D888.
Adds 34567000 in BCD to the value in D887 and D888,
and stores the result to D887 and D888.
Outputs the data in D887 and D888 to Y30 to Y4F.
Step
Instruction
Device
Stores 98765432 in BCD to D100 and D101.
Subtracts the value in D100 and D101 from 12345678
in BCD, and stores the result to D100 and D101.
Outputs the data in D100 and D101 to T30
to Y4F.
Step
Instruction
Device

Table of Contents

Related product manuals