EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 245

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
243
6
Operation error
In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Program example
The following program multiplies the BCD data 67347125 and 573682, stores the result from D502 to D505, and at the
same time outputs the upper 8 digits to Y30 to Y4F.
The following program divides the BCD data from X20 to X3F by the BCD data at D8 and D9 when X0B goes ON, and
stores the result from D765 to D768.
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 The (S1) or (S2) BCD data is outside the 0 to 99999999 range.
The divisor is 0.

[Ladder Mode] [List Mode]
[Operation]
[Ladder Mode] [List Mode]
[Operation]
Step
Instruction
Device
Y30Y4F
8634
7
1 2
5
Multiplicand Multiplier
00
5
7 3 6 8 2
0039
2
0 9 5
0
D505
039 0
D504
29
5
5
D503
136 2
D502
4
5
0
Step
Instruction
Device
5
12
6
D9 (Upper 4 digits)
73
4
8
D8 (Lower 4 digits)
9986
X20X3F
Dividend
4
3
21
/
Quotient
0000 0006 80
2
8 8
1
33
(Lower 4 digits)(Upper 4 digits)
D766 D765
(Lower 4 digits)
D767
(Upper 4 digits)
D768
Remainder
Divisor

Table of Contents

Related product manuals