469
VAL, VALP, DVAL, DVALP
1
2
3
4
4
6
7
8
7.11
Char
acter
string processing inst
ructions
7.11.1
0
VAL, VALP, DVAL, DVALP
: Character string to be converted to BIN data or head number of the devices where the character string is stored (character string)
: Head number of the devices where the number of digits of the converted BIN data will be stored (BIN 16 bits)
: Head number of the devices where the converted BIN data will be stored (BIN 16/32 bits)
F
unct
i
on
VAL
(1) Converts character strings stored in the device numbers starting from that designated at to BIN 16-bit data, and stores
the number of digits and BIN data in and .
For conversions from character strings to BIN, all data from the device number designated by to the device number
where "00
H
" is stored will be processed as character strings.
For example, if the character string "-123.45" is designated for the area starting from , the operation result would be
stored at and in the following manner:
(2) The total number of characters that can be designated as a character string at is from 2 to 8.
(3) From 0 to 5 characters from the character string designated at can become the decimal fraction part.
However, this number must not exceed the total number of digits minus 3.
(4) The range of the numerical character string that can be converted to BIN value is from -32768 to 32767, ignoring a
decimal point.
Numerical value character strings, excluding the sign and the decimal point, can be designated only within the range
from "30
H
" to "39
H
".
The value ignoring a decimal point means:
: "-12345.6" "-123456"
7.11.10 VAL, VALP
Conversion from character string to BIN 16-bit data
DVAL, DVALP
Conversion from character string to BIN 32-bit data
7.11.10
VAL, VALP, DVAL, DVALP
• Basic model QCPU: The serial number (first five digits) is
"04122" or later.
(Compatible GX Developer: Version 8.00A or later)
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
$
Other
Bit
Word
Bit
Word
––
––
––
––
––
––
––
––
Basic
Process
High
performance
Redundant Universal
LCPU
Ver.
Command
Command
P
VALP, DVALP
VAL, DVAL
i
nd
i
cates
an
i
nstruct
i
on
symbo
l
of
VA
L/
DVA
L.
S
D1
D2
S
D1
D2
S
D1
D2
S
D1
D2
S
D1
D2
S
.
S
i
gn 1st
char
-
acter
2nd
char
-
acter
7th
char
-
acter
T
ota
l
number
of
d
i
g
i
ts
N
umber
of
d
i
g
i
ts
i
n
dec
i
ma
l
fract
i
on
I
nteger
v
a
l
ue
i
gnor
i
ng
dec
i
ma
l
po
i
nt
+
1
B
IN
16
b
i
ts
I
nd
i
cates
the
end
of
character
str
i
ng
ASC
II
code
for
the
s
i
gn
ASC
II
code
for
the
1st
character
ASC
II
code
for
the
2nd
character
ASC
II
code
for
the
3rd
character
b15
b8b7
b0
ASC
II
code
for
the
4
th
character
00
H
ASC
II
code
for
the
5th
character
ASC
II
code
for
the
6th
character
ASC
II
code
for
the
7th
character
+4
+
3
+
2
+
1
D1
D2
S
S
S
S
S
D1
S
D1
D2
.
7
2
1
2
3
4
5
+
1
2D
H
(
)
31
H
(1)
32
H
(2)
33
H
(3)
b15
b8 b7
b0
2
E
H
(
.
)
3
4
H
(
4
)
35
H
(5)
00
H
+
3
+
2
+
1
1 2 3
4
5
S
S
S
S
D2
D1
D1
S
S
Example