649
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
FN
C
160-
FN
C
169
R
eal T
im
e C
lo
ck
C
ont
ro
l
22
FN
C
170-
FN
C
179
Exter
nal D
ev
ice
23
FN
C
180
Al
ter
nate
In
str
uc
tions
24
FN
C
181-
FN
C
189
O
ther
s
25
FN
C
190-
FN
C
199
B
lock D
ata
O
per
at
ion
26
FN
C
200
-F
N
C
20
9
C
har
acter
S
tring
C
ont
ro
l
27
FN
C
210-
FN
C
219
Da
ta
O
per
ation 3
28
FN
C
220-
FN
C
249
Da
ta
C
om
par
ison
29
FN
C
250
-F
N
C
26
9
D
ata T
abl
e
O
per
ati
on
30
FN
C
270-
FN
C
274
Ex
-D
ev
ice
Inv
ert
er
Com
m
s
For example, when a character string "-123.45" 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).
5)
stores 16-bit data (bin) converted from a character string with the decimalpoint ignored.
In the character string located in
and later, "space" (20H) and "0" (30H) characters between the
sign and the first number other than "0" are ignored in the conversion to 16-bit binary data.
Description
Number of all characters (digits)
2 to 8
Number of characters (digits) of decimal part
0 to 5 and smaller than "number of all digits -3"
Numeric range when decimal point is ignored
−
32768 to +32767
Example: 123.45
→
12345
Character type
Sign
Positive numeric value
"Space" (20
H
)
Negative numeric value "–" (2D
H
)
Decimal point
"." (2E
H
)
Number
"0" (30
H
) to "9" (39
H
)
S
D
1
D
2
+0
7
2
- 1 2 3
4 5
D
1
+0
+1
b15
+2
+3
b8 b7
b0
It indicates the end of the character string.
S
D
2
-12345
+1
31H(1)
33H(3)
34H(4)
00H
2DH(-)
32H(2)
2EH( )
35H(5)
D
1
D
1
D
2
S
1 2
Number of all
digits
Ignored
Number of digits
of decimal part
16-bit binary
data
8
2
-12345
3
4 5
-
0
0
Ignored
7
4
12
0 1 2
Sign
Number of all
digits
Number of digits
of decimal part
16-bit binary
data