451
BINHA, BINHAP, DBINHA, DBINHAP
1
2
3
4
4
6
7
8
7.11
Char
acter
string processing inst
ructions
7.11.2
B
INHA, BINH
AP, D
B
INHA, DBINH
A
P
Operat
i
on
E
rror
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Program
E
xamp
l
e
(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.
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4101
The range of the device specified in exceeds the range of the
corresponding device.
––
––
––
––
D
Step
I
nstruct
i
on
De
vi
ce
D1
D2
39
H
(9)
4
3
H
(C)
30
H
(0)
36
H
(6)
b15
b8b7
b0
00
H
D0
W0
B
IN v
a
l
ue
9C06
H
PR
Y4
0
to
Y4
8
Outputs
"
9C06
"
Step
I
nstruct
i
on
De
vi
ce
D1
D2
D3
37
H
(7)
4
2
H
(B)
33
H
(3)
4
3
H
(C)
b15
b8b7
b0
35
H
(5)
38
H
(8)
D0
31
H
(1)
4
6
H
(
F
)
00
H
D
4
7 B 3 C 5 8 1
F
H
W11
W10
PR
Y4
0
to
Y4
8
Outputs
"
7B3C581
F"