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
20H(space)34H (4)
39H (9)34H (4)
b15 b8b7 b0
D20
BCD value
0494
Y4F Y40
494
Regarded
as 0494
Outputs the converted
BCD value to a display device.
Step Instruction Device
D21
D22
D23
20H(space)34H (4)
39H (9)37H (7)
b15 b8b7 b0
32H (2)39H (9)
D20
34H (4)39H (9) BCD value
04972949
Regarded
as 04972949BCD value
04972949
D11 D10 Y5FY50Y4F Y40
DMOV
4972949