458
HABIN, HABINP, DHABIN, DHABINP
DHABIN
(1) Converts hexadecimal ASCII data stored in the area starting from the device number designated by into BIN 32-bit
data, and stores it in the device number designated by .
For example, if the ASCII code of 5CB807E1
H
is designated for the area starting from , the operation result would be
stored at +1 and in the following manner:
(2) The ASCII data designated by to +3 can be in the range of from 00000000
H
to FFFFFFFF
H
.
(3) The ASCII codes can be in the range of "30
H
" to "39
H
" and from "41
H
" to "46
H
".
Operat
i
on
E
rror
(1) In any of the following cases, 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 converts the hexadecimal, 4-digit ASCII data set at D20 and D21 to BIN data, and stores the
result at D0.
[Ladder Mode]
[List Mode]
[Operation]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
The ASCII codes specified in to +3 are other than "30
H
" to "39
H
"
and from "41
H
" to "46
H
".
––
4101
The range of the device specified in exceeds the range of the
corresponding device.
––
––
––
––
S
D
+
1
ASC
II
code
for
the
8th
d
i
g
i
t
ASC
II
code
for
the
7th
d
i
g
i
t
ASC
II
code
for
the
6th
d
i
g
i
t
ASC
II
code
for
the
5th
d
i
g
i
t
b15
b8b7
b0
+
2
ASC
II
code
for
the
4
th
d
i
g
i
t
ASC
II
code
for
the
3rd
d
i
g
i
t
ASC
II
code
for
the
2nd
d
i
g
i
t
ASC
II
code
for
the
1st
d
i
g
i
t
+
3
U
pper
16
b
i
ts
L
o
w
er
16
b
i
ts
B
IN
32
b
i
ts
+
1
b31
b16 b15
b0
S
D
S
S
S
D
S
D
D
35
H
(5)
4
3
H
(C)
4
2
H
(B)
38
H
(8)
b8b7
b0
30
H
(0)
37
H
(7)
4
5
H
(
E
)
31
H
(1)
5CB8
H
07
E
1
H
+
1
b31
b15
b0
D
b15
D
b16
+
1
+
2
+
3
S
S
S
S
S
S
S
S
S
Step
I
nstruct
i
on
De
vi
ce
D21
41
H
(A)
36
H
(6)
33
H
(3)
46
H
(F)
b8b7
b0
D20
D0
BIN
v
alue
22977
A63F
b15
Regarded as A63F
H
(-22977 in decimal
v
alue)