7-200
DABCD(P),DDABCD(P)
Program Example
(1) The following program converts the decimal ASCII data set from D20 to D22 to BCD
4-digit data, and outputs the results to Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operation]
(2) The following program converts the decimal ASCII data set at D20 to D23 into 8-digit BCD
data, stores the result at D10 and D11, and also outputs it to from Y40 to Y5F.
[Ladder Mode]
[List Mode]
[Operation]
Outputs the converted
BCD value to a display device.
Step Instruction Device
D21
20
H
(space)34
H
(4)
39
H
(9)34
H
(4)
b15 b8b7 b0
D20
BCD value
0 4 9 4
Y4F Y40
494
Regarded
as 0494
Outputs the converted
BCD value to a display device.
Step Instruction Device
D21
D22
D23
20
H
(space)34
H
(4)
39
H
(9)37
H
(7)
b15 b8b7 b0
32
H
(2)39
H
(9)
D20
34
H
(4)39
H
(9)
BCD value
0
4 97294 9
Regarded
as 04972949
BCD value
0
4 97294 9
D11 D10
Y5FY50
Y4F
Y40
DMOV
4972949