Mitsubishi Electric MELSEC-Q/L Programming Manual page 532

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Program example
• The following example program uses the PR instruction to output the 16-bit BIN data W0 value by decimal to Y40 to Y48 as
ASCII.
[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 00H is encountered.
D0
W0
D1
5126
D2
BIN value
D3
• The following program uses the PR instruction to output the decimal value of the 32-bit BIN data at W10 and W11 in ASCII
code 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 00H is encountered.
W11
W10
3 8 4 2 5 6 3
BIN value
7 APPLICATION INSTRUCTIONS
530
7.11 Character String Processing Instructions
b15
b8 b7
20H
20H (space)
20H
31H (1)
35H (5)
36H (6)
32H (2)
00H
b15
b8 b7
D0
20
(space)
H
D1
20
(space)
H
D2
38
(8)
H
D3
32
(2)
H
D4
36
(6)
H
D5
00
H
[List Mode]
Step
b0
(space)
PR
"
5126"
is output.
[List Mode]
Step
b0
2D
(
)
H
20
(space)
H
33
(3)
-
3842563
H
34
(4)
H
is output.
35
(5)
H
33
(3)
H
Instruction
Device
Y40 to Y48
Instruction
Device
PR
Y40 to Y48

Advertisement

Table of Contents
loading

Table of Contents