492
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
18 Floating Point – FNC110 to FNC139
18.4 FNC116 – ESTR / Floating Point to Character String Conversion
2. In the case of decimal point format
• The total number of digits which can be specified by +1 is as follows (24 digits maximum):
When the number of digits of the decimal part is "0", Total number of digits ≥ 2
When the number of digits of the decimal part is any value other than "0", Total number of digits ≥ (Number of digits
of decimal part + 3)
• The number of digits of the decimal part which can be specified by +2 is from 0 to 7.
However, the following must be satisfied, "Number of digits of decimal part ≤ (Total number of digits - 3)"
For example, when the total number of digits is "8", the number of digits of the decimal part is "3", and
"-1.23456" is specified, data is stored in and later as shown below:
• The character string data after conversion is stored in the devices and later as shown below:
- For the sign, "20H (space)" is stored when the binary floating point data is positive, and "2DH (-)" is stored when
the data is negative.
- If the decimal part of the binary floating point data cannot be accommodated in the number of digits of the
decimal part, low-order digits of the decimal part are rounded.
Decimal point
format
Total number of
digits
Number of digits
of decimal part
Sign
+1
+2
ASCII code in "(specified
total number of digits - 1)"th
digit
ASCII code in "(specified
total number of digits - 3)"th
digit
ASCII code in "(specified
total number of digits - 5)"th
digit (decimal part)
ASCII code in "(specified
total number of digits - 7)"th
digit (decimal part)
ASCII code for sign
ASCII code in "(specified
total number of digits - 2)"th
digit
ASCII code for decimal point
(.)
(2E
H
)
ASCII code in "(specified
total number of digits - 6)"th
digit (decimal part)
0000
H
b15
+1
+2
+3
+4
b8 b7 b0
0000H is automatically stored at the end of the
character string.
+1
Binary floating point
(real number)
S
2
S
2
S
2
S
1
S
1
D
D
D
D
D
S
2
S
2
D
S
1
S
2
D
0
8
3
1 2 3 5
Sign
+1
+2
20H(space)
31H(1)
0000H
b15
+1
+2
+3
+4
b8 b7 b0
0000H is automatically stored at the end of the
character string.
32H(2)
35H(5)
2DH(-)
20H(space)
2EH(.)
33H(3)
+1
Binary floating point
(real number)
−
1.23456
Total
number
of digits
Number of
digits of
decimal part
S
2
S
2
D
D
D
D
S
1
D
1 2 3
Low-order
digits of
decimal part
0: Decimal point
format
8 (Total number of
digits)
2 (Number of digits
of decimal part)
+1
+2
Total
number of
digits
456
Rounded.
+1
−
1.23456
S
1
S
2
S
2
S
2
S
1