530
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
• 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.
• 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] [List 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.
[Ladder Mode] [List 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.
Step Instruction Device
D1
D2
D3
b15 b8 b7 b0
00H
D0
5126
W0
PR
(space)20H (space)
BIN value
is output.
Y40 to Y48
" 5126"
20H20H
35H (5)31H (1)
32H (2)36H (6)
D1
D2
D3
2D
H
()20
H
(space)
20
H
(space)20
H
(space)
b15 b8 b7 b0
33
H
(3)38
H
(8)
D0
PR
Y40 to Y48
34
H
(4)32
H
(2)
35
H
(5)36
H
(6)
33
H
(3)00
H
is output.
38
42
563
W11
BIN value
W10
D4
D5
- 3842563