Mitsubishi Electronics FX3G User Manual

Page of 964
494
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
18 Floating Point – FNC110 to FNC139
18.4 FNC116 – ESTR / Floating Point to Character String Conversion
• 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 - 7)"
For example, when the total number of digits is "12", the number of digits of the decimal part is "4", and
 "-12.34567" 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 of the integer part, "20H (space)" is stored when the binary floating point data is positive, and "2DH 
(-)" is stored when the data is negative.
- The integer part is fixed to 1 digit.
"20H (space)" is stored between the integer part and the sign.
- 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.
- When the number of digits of the decimal part is set to any value other than "0", "2EH (.)" is automatically stored 
in "specified number of digits of decimal part + 1"th digit.
When the number of digits of the decimal part is "0", "2EH (.)" is not stored.
- For the sign of the exponent part, "2BH (+)" is stored when the exponent is positive, and "2DH (-)" is stored when 
the exponent is negative.
  
S
2
   
D
1
12
4
2 3 4 6 E + 0 1
Sign (integer part)
+1
+2
1
Sign (exponent part)
20H space
2EH(.)
0000H
b15
+1
+2
+3
+4
b8 b7
b0
0000H is automatically stored at the end of the
character string.
33H(3)
36H(6)
2DH(-)
31H(1)
32H(2)
34H(4)
2BH(+)
31H(1)
45H(E)
30H(0)
+5
+6
+1
Binary floating point
(real number)
−12.34567
Total number
of digits
Number of
digits of
decimal
part
Fixed to 2 digits
S
1
 
S
2
 
S
2
 
S
2
 
S
1
 
   
D
1
12
4
+1
+2
Total number of digits (12)
0
"20H (space)" is stored.
2 3 4 6 E +
1
1
Fixed to 1 digit
+1
−12.34567
S
2
 
S
1
 
S
1
 
S
2
 
S
2
 
1
12
4
+1
+2
Total number of digits (12)
0
2 3 4 6
E +
1
1
6 7
Number of digits of
decimal part (4)
Cut by rounding.
+1
−12.34567
S
1
 
S
1
 
S
2
 
S
2
 
S
2
 
1
12
4
+1
+2
Total number of digits (12)
0
2 3 4 6 E +
1
1
Number of digits of
decimal part (4)
Automatically added.
+1
−12.34567
S
1
 
S
1
 
S
2
 
S
2
 
S
2