Mitsubishi MELSEC Q Series Programming Manual page 564

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

Advertisement

BCDDA(P),DBCDDA(P)
Program Example
(1) The following program uses the PR instruction to convert BCD 4-digit data (the value at W0)
to decimal, and outputs it in ASCII format to Y40 to Y48.
[Ladder Mode]
[Operation]
Conducts ASCII output of Y40 to Y48 by using the PR instruction when X0 goes ON.
Because SM701 is OFF, The PR instruction will output ASCII code until 00
W0
1
2 9 5
BCD value
(2) The following program uses the PR instruction to convert BCD 8-digit data (the values at
W10 and W11) to decimal, and outputs it in ASCII format to Y40 to 48.
[Ladder Mode]
[Operation]
Conducts ASCII output of Y40 to Y48 by using the PR instruction when X0 goes ON.
Because SM701 is OFF, The PR instruction will output ASCII code until 00
W11
3
5 4 7 8 3 5 2
7-190
b15
D0
32
(2)
H
D1
35
(5)
H
D2
b15
D0
35
(5)
H
W10
D1
37
H
D2
33
(3)
H
D3
32
(2)
BCD value
H
D4
[List Mode]
Step
Instruction
b8b7
b0
31
(1)
PR
H
39
(9)
H
00
Outputs "1295"
H
[List Mode]
Step
Instruction
b8b7
b0
33
(3)
H
(7)
34
(4)
H
38
(8)
H
Outputs "35478352"
35
(5)
H
00
H
Device
is encountered.
H
Y40 to Y48
Device
is encountered.
H
PR
Y40 to Y48

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents