Mitsubishi MELSEC Q Series Programming Manual page 573

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

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]
Step
Instruction
[Operation]
b15
D20
34
H
D21
34
H
(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]
Step
Instruction
[Operation]
b15
b8 b7
D20
34
(4)
H
D21
37
(7)
H
D22
39
(9)
H
D23
39
(9)
H
Device
b8 b7
b0
(4)
20
(space)
H
(4)
39
(9)
H
494
Device
b0
20
(space)
H
39
(9)
H
32
(2)
H
Regarded
34
(4)
H
as 04972949
4972949
DABCD(P),DDABCD(P)
Outputs the converted
BCD value to a display device.
Y4F
Y40
0 4 9 4
Regarded
BCD value
as 0494
Outputs the converted
BCD value to a display device.
D11
D10
DMOV
0 4 9 7 2 9 4 9
BCD value
1
2
3
4
6
6
7
8
Y5F
Y50 Y4F
Y40
0 4 9 7 2 9 4 9
BCD value
7-199

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents