202
DB+, DB+P, DB-, DB-P
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
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]
[List Mode]
(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]
[List Mode]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
The or BCD data is outside the 0 to 99999999 range.
S
D
Stores
123
4
5600
i
n
BCD
to
D887
and
D888
.
Adds
3
4
567000
i
n
BCD
to
the
va
l
ue
i
n
D887
and
D888
,
and
stores
the
resu
l
t
to
D887
and
D888
.
Outputs
the
data
i
n
D887
and
D888
to
Y
30
to
Y4F.
Step
Instruction
Device
Stores
98765
4
32
i
n
BCD
to
D100
and
D101
.
Subtracts
the
va
l
ue
i
n
D100
and
D101
from
123
4
5678
i
n
BCD
,
and
stores
the
resu
l
t
to
D100
and
D101
.
Outputs
the
data
i
n
D100
and
D101
to
T
30
to
Y4F.
Step
Instruction
Device