457
HABIN, HABINP, DHABIN, DHABINP
1
2
3
4
4
6
7
8
7.11
Char
acter
string processing inst
ructions
7.11.5
H
ABIN, HABINP, DHABIN, DHABINP
(2) The following program converts the decimal, 10-digit ASCII data and sign set at D20 through D25 to BIN values and
stores the result at D10 and D11.
[Ladder Mode]
[List Mode]
[Operation]
: ASCII data to be converted to BIN value or head number of the devices where the ASCII data is stored (character string)
: Head number of the devices where the conversion result will be stored (BIN 16/32 bits)
F
unct
i
on
HABIN
(1) Converts hexadecimal ASCII data stored in the area starting from the device number designated by into BIN 16-bit
data, and stores it in the device number designated by .
For example, if the ASCII code of 5A8D
H
is designated for the area starting from , the operation result would be stored
at in the following manner:
(2) The ASCII data designated by to +1 can be in the range of from 0000
H
to FFFF
H
.
(3) The ASCII codes can be in the range of "30
H
" to "39
H
" and from "41
H
" to "46
H
".
HABIN, HABINP
Conversion from hexadecimal ASCII to BIN 16-bit data
DHABIN, DHABINP
Conversion from hexadecimal ASCII to BIN 32-bit data
7.11.5
HABIN, HABINP, DHABIN, DHABINP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
$
Other
Bit
Word
Bit
Word
––
––
––
––
––
Step
I
nstruct
i
on
De
vi
ce
D21
D22
D23
20
H
(space)
20
H
(space)
20
H
(space)
20
H
(space)
b15
b8b7
b0
33
H
(3)
39
H
(9)
D20
36
H
(6)
38
H
(8)
33
H
(3)
37
H
(7)
30
H
(0)
D2
4
D25
D11
B
IN v
a
l
ue
D10
(Regarded
as
+
0003968370)
3 9 6 8 3 7 0
3968370
Process
High
performance
Redundant Universal
LCPU
Bas
i
c
Command
Command
P
D
S
D
S
HABIN, DHABIN
HABINP, DHABINP
i
nd
i
cates
an
i
nstruct
i
on
symbo
l
of
H
AB
IN/
D
H
AB
IN.
S
D
S
D
S
D
b15
b0
B
IN
16
b
i
ts
+
1
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
b15
b8b7
b0
S
S
D
S
D
b15
b0
+
1
35
H
(5)
4
1
H
(A)
38
H
(8)
44
H
(D)
b15
b7
b0
5A8D
H
D
S
S
b8
S
S