7-188
BINHA(P),DBINHA(P)
Program Example
(1) The following program uses the PR instruction to output the hexadecimal value of the 16-bit
BIN data at W0 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 00
H
is encountered.
(2) The following program uses the PR instruction to output the hexadecimal value of the 32-bit
BIN data at W10 and W11 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 00
H
is encountered.
Step Instruction Device
D1
D2
39
H
(9)43
H
(C)
30
H
(0)36
H
(6)
b15 b8
b7
b0
00
H
D0
W0
BIN value
9C06
H
PR
Y40 to Y48
Outputs "9C06"
Step Instruction Device
D1
D2
D3
37
H
(7)42
H
(B)
33
H
(3)43
H
(C)
b15 b8b7 b0
35
H
(5)38
H
(8)
D0
31
H
(1)46
H
(F)
00
H
D4
7B3C58
1
F
H
W11
W10
PR
Y40 to Y48
Outputs "7B3C581F"