7.11 String Processing Instructions
7.11.4 Decimal ASCII data to 16-/32-bit BIN data conversion
7-167
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
DABI
N, DDABI
N
DABIN, DDABIN
Function
DABIN(P)
(1) Converts decimal ASCII data stored in the device specified for
and the following devices
to 16-bit BIN data, and stores the results to the device specified for
.
For example, if the ASCII code " 25108" is specified for the devices following
, the
results will be stored to
as shown below.
(2) The ASCII data specified for
[0] to
[2] can be in the range of 32768 to 32767.
(3) The sign 20
H
will be stored if the BIN value is positive, and the sign 2D
H
will be stored if it is
negative.
(If other than 20
H
or 2D
H
is set, it will be processed as positive data.)
(4) ASCII code can be set for each position within the range from 30
H
to 39
H
.
(5) If the ASCII code set for each position is 20
H
or 00
H
, it will be processed as 30
H
.
DDABIN(P)
(1) Converts decimal ASCII data stored in the device specified for
and the following devices
to 32-bit BIN data, and stores the results to the device specified for
.
For example, if the ASCII code 1234543210
is specified for the devices following
, the
result will be stored to
as shown below.
(2) The ASCII data specified for
[0] to
[5] can be in the range of 2147483648 to
2147483647.
Further, data stored in the upper bytes of
[5] will be ignored.
s
d
b15
b0
B
IN 16 bi
ts
Si
gn
d
ata
ASCII
co
d
e
for
ten
-
thousan
d’
s
p
l
ace
ASCII
co
d
e
for
thousan
d’
s
p
l
ace
ASCII
co
d
e
for
hun
d
re
d’
s
p
l
ace
b15
b8b7
b0
ASCII
co
d
e
for
ten
’
s
p
l
ace
ASCII
co
d
e
for
un
i
t
’
s
p
l
ace
s
d
s
s
[0]
[1]
[2]
s
d
b15
b0
2
D
H
(
)
32
H
(2)
35
H
(5)
31
H
(1)
b15
b8b7
b0
30
H
(0)
38
H
(8)
2
5
1
0
8
d
s
s
s
[
0
]
[
1
]
[
2
]
s
s
s
d
Si
gn
d
ata
ASCII
co
d
e
for
billi
on
’
s
p
l
ace
ASCII
co
d
e
for
hun
d
re
d-
m
illi
on
’
s
p
l
ace
ASCII
co
d
e
for
ten
-
m
illi
on
’
s
p
l
ace
b15
b8b7
b0
ASCII
co
d
e
for
m
illi
on
’
s
p
l
ace
ASCII
co
d
e
for
hun
d
re
d-
thousan
d’
s
p
l
ace
ASCII
co
d
e
for
ten
-
thousan
d’
s
p
l
ace
ASCII
co
d
e
for
thousan
d’
s
p
l
ace
ASCII
co
d
e
for
hun
d
re
d’
s
p
l
ace
ASCII
co
d
e
for
ten
’
s
p
l
ace
ASCII
co
d
e
for
un
i
t
’
s
p
l
ace
(I
gnore
d)
Upper
16 bi
ts
L
o
w
er
16 bi
ts
B
IN 32 bi
ts
b31
b16 b15
b0
s
s
s
s
s
s
d
[0]
[1]
[2]
[3]
[4]
[5]
s
d
2
D
H
(
)
31
H
(1)
32
H
(2)
33
H
(3)
b15
b8b7
b0
3
4
H
(
4
)
35
H
(5)
3
4
H
(
4
)
33
H
(3)
32
H
(2)
31
H
(1)
30
H
(0)
12 3
4
3 2 1 0
5
4
s
s
s
s
s
s
d
[
0
]
[
1
]
[
2
]
[
3
]
[4]
[
5
]
s
s
s
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......