![Mitsubishi Electric FX3G SERIES Programming Manual Download Page 623](http://html.mh-extra.com/html/mitsubishi-electric/fx3g-series/fx3g-series_programming-manual_238902623.webp)
621
FX
3G
/FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
26 Character String Control – FNC200 to FNC209
26.2 FNC201 – VAL / Character String to BIN Conversion
21
FNC160
-F
NC1
69
R
eal
T
ime C
lock
C
ontrol
22
FNC17
0-F
NC
179
E
xternal D
evice
23
FNC
180
Alternate
Instructions
24
FN
C181-
FNC18
9
O
thers
25
FNC190
-F
NC1
99
Bl
oc
k D
ata
Op
er
atio
n
26
FNC20
0-F
NC209
C
har
ac
te
r S
trin
g
Con
tro
l
27
FNC2
10-
FNC21
9
Dat
a
Operati
on 3
28
FNC220
-F
NC2
49
Da
ta
C
omp
ari
son
29
FNC25
0-F
N
C
269
D
ata T
abl
e
Operation
30
FNC2
70-
FNC275
Ex
-Dev
ice
Inverter C
om
m
s
2. 32-bit operation (DVAL and DVALP)
1) A character string stored in
and later is converted into 32-bit binary data. The number of all digits of the
binary data acquired for conversion is stored in
, the number of digits of the decimal part is stored in
+1, and the binary data is stored in [
+1,
].
In conversion from a character string into binary data, the data from
to a device number storing "00H" is
handled as a character string in byte units.
For example, when a character string "-12345.678" is specified in
and later, the conversion result is stored
in
and
as shown below.
2) Character string to be converted
a) Number of characters of character string and the numeric range when the decimal point is ignored
b) Character types used in characters to be converted
3)
stores the number of all digits. The number of all digits indicates the number of all characters (including
the number, sign and decimal point).
4)
+1 stores the number of digits of the decimal part. The number of digits of the decimal part indicates the
number of all characters after the decimal point "." (2EH).
Description
Number of all characters (digits)
2 to 13
Number of characters (digits) of decimal part
0 to 10 and smaller than "number of all digits
−
3"
Numeric range when decimal point is ignored
−
2,147,483,648 to +2,147,483,647
Example: 12345.678
→
"12345678"
Character type
Sign
Positive numeric value
"Space" (20
H)
Negative numeric value
"–" (2D
H)
Decimal point
"." (2E
H)
Number
"0" (30
H) to "9" (39H)
S
D
1
D
1
D
2
D
2
S
Command
input
FNC201
DVAL
D
1
S
D
2
+0
-
D
1
+0
+1
b15
+2
+3
+6
b8 b7
b0
It indicates the end of character string.
S
D
2
+1
32-bit binary
data
12th c
haracter
+4
+5
Integer value in
which decimal
point is ignored
+1
D
2
00H
ASCII code of 1st character
ASCII code of 3rd character
ASCII code of 5th character
ASCII code of 7th character
ASCII code indicating sign
ASCII code of 2nd character
ASCII code of 4th character
ASCII code of 6th character
ASCII code of 12th character
ASCII code of 9th character
ASCII code of 11th character
ASCII code of 8th character
ASCII code of 10th character
Si
g
n
1st ch
aracter
2nd c
haracter
Number of all
digits
Number of digits
of decimal part
S
D
1
D
2
+0
10
3
-
2 3
5
6
D
1
+0
+1
b15
+2
+3
b8 b7
b0
S
+1
+4
+5
31H(1)
33H(3)
35H(5)
36H(6)
2DH(-)
32H(2)
34H(4)
2EH(.)
38H(8)
37H(7)
7
4
8
1
-12345678
D
2
+1
D
2
00H
D
1
D
1