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 00H 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 00H is encountered.
Step Instruction Device
D1
D2
39H (9)43H (C)
30H (0)36H (6)
b15 b8b7 b0
00H
D0
W0
BIN value
9C06H
PR
Y40 to Y48
Outputs "9C06"
Step Instruction Device
D1
D2
D3
37H (7)42H (B)
33H (3)43H (C)
b15 b8b7 b0
35H (5)38H (8)
D0
31H (1)46H (F)
00H
D4
7B3C581FH
W11 W10 PR
Y40 to Y48
Outputs "7B3C581F"