207
DB*, DB*P, DB/, DB/P
1
2
3
4
6
7
8
6.2
A
rithmetic Opera
tion In
str
uctions
6.2.8
D
B*, DB*P, DB/, DB/P
Operation Error
(1) 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
(1) 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.
[Ladder Mode]
[List Mode]
[Operation]
(2) 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.
[Ladder Mode]
[List Mode]
[Operation]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
The or BCD data is outside the 0 to 9999 range.
The divisor is 0.
S1
S2
Step
Instruction
Device
Y30
Y4F
8
6
3 4 7 1 2 5
Multiplicand
Multiplier
0
0
5 7 3 6 8 2
0
0
3 9 2 0 9 5
0
D505
0
3 9
0
D504
2
9 5
5
D503
1
3 6
2
D502
4
5 0
Step
Instruction
Device
5
1
2
6
D9
(U
pper 4 digits
)
7
3
4
8
D8
(
Lower 4 digits
)
9
9
8
6
X20
X3F
Dividend
4
3
2
1
/
Q
uotient
0
0
0
0
0
0
0
6
8
0
2
8
8
1
3
3
(
Lower 4 digits
)
(U
pper 4 digits
)
D766
D765
(
Lower 4 digits
)
D767
(U
pper 4 digits
)
D768
Remainder
Divisor