7.11 String Processing Instructions
7.11.10 Character string data to 16-/32-bit BIN data conversion
7-191
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
VA
L
, D
V
A
L
VAL, DVAL
(8) In cases where the character string specified for
contains 20
H
(space) or 30
H
(0) between
the sign and the first numeric value other than 0, these 20
H
and 30
H
are ignored in the
conversion to BIN value.
DVAL(P)
(1) Converts the character string data stored in the device specified for
and the following
devices to 32-bit BIN data, and stores the digits numbers and BIN data to
and
.
For converting character string data to BIN data, all data from the device specified for
to
the device where 00
H
is stored will be processed as character strings.
(2) The total number of characters in the character string specified for
is from 2 to 13
characters.
(3) From 0 to 10 characters in the character string specified for
can be the decimal fraction.
However, this number must not exceed the total number of digits minus 3.
(4) The range of the numeric character string that can be converted to BIN value is from
2147483648 to 2147483647, excluding the decimal point.
Numeric value character strings, excluding the sign and the decimal point, can be specified
only within the range from 30
H
to 39
H
.
(5) The sign 20
H
will be stored if the numeric value is positive, and the sign 2D
H
will be stored if
it is negative.
(6) 2E
H
is set for the decimal point.
(7) The total number of digits stored to
is the total number of characters that represent
numeric values including a sign and decimal point.
The number of digits for decimal fraction stored to
+1 is the number of characters that
represent decimal fraction separated by 2E
H
(. ).
The BIN data stored to
is the character string ignoring the decimal point that has been
converted to BIN value.
s
8
2
Total num
b
er of
d
igits
Num
b
er of
d
igits
in
d
ecimal fraction
BIN
d
ata
1 2
Ignore
d
3
. 4
5
1 2 3
4
5
7
4
Total num
b
er of
d
igits
Num
b
er of
d
igits
in
d
ecimal fraction
BIN
d
ata
0
.
Ignore
d
0 0 1 2
12
S
ign
s
d1
d2
s
[4]
[3]
[2]
[1]
[0]
[5]
2
D
H
( )
31
H
(1)
32
H
(2)
33
H
(3)
b8 b7
b0
34
H
(4)
35
H
(5)
2E
H
(.)
36
H
(6)
37
H
(7)
38
H
(8)
.
00
H
10
3
1 2 3 4 5
6 7 8
1 2 3 4 5 6 7 8
d1
s
s
s
s
s
s
b15
d2
I
n
di
cates
the
en
d
of
character
str
i
ng
ASCII
co
d
e
for
the
s
i
gn
ASCII
co
d
e
for
the
1
st
character
ASCII
co
d
e
for
the
2
n
d
character
ASCII
co
d
e
for
the
3
r
d
character
ASCII
co
d
e
for
the
4
th
character
00
H
ASCII
co
d
e
for
the
5
th
character
ASCII
co
d
e
for
the
6
th
character
ASCII
co
d
e
for
the
7
th
character
[4]
[3]
[2]
[1]
[0]
[5]
[6]
ASCII
co
d
e
for
the
8
th
character
ASCII
co
d
e
for
the
9
th
character
ASCII
co
d
e
for
the
10
th
character
ASCII
co
d
e
for
the
11
th
character
ASCII
co
d
e
for
the
12
th
character
.
I
nteger
va
l
ue
i
gnor
i
ng
d
ec
i
ma
l
po
i
nt
B
IN 32 bi
ts
s
s
s
s
s
s
s
d2
Si
gn
1
st
char
-
acter
2
n
d
char
-
acter
12
th
char
-
acter
T
ota
l
num
b
er
of
di
g
i
ts
N
um
b
er
of
di
g
i
ts
i
n
d
ec
i
ma
l
fract
i
on
d1
b15
b8b7
b0
s
s
d1
d1
d2
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: ......