Mitsubishi Electronics FX3G User Manual

Page of 964
495
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
11
FN
C30
-FN
C3
9
R
ota
tion and 
Shi
ft
12
FN
C40-FN
C49
D
ata O
perati
on
13
FNC
50-FNC
59
High-Speed
 
Proc
essing
14
FM
C60-FN
C69
H
andy 
In
struction
15
FN
C70-FN
C79
E
xternal
 F
X
 I/O
 
De
vice
16
FNC
80-FNC
89
External
 FX 
Dev
ice
17
FNC1
00-
FNC10
9
Dat
Transfer 2
18
FNC1
10-
FNC139
Fl
oati
ng Poi
nt
19
FNC14
0-F
N
C
149
Da
ta
 
Operation 2
20
FNC1
50-
FNC159
Pos
itioning 
Control
- The exponent part is fixed to 2 digits.
When the exponent part is 1 digit, "30H (0)" is stored after the sign of the exponent part.
- "00H" or "0000H" is automatically stored at the end of the converted character string.
Related instructions
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
• When 
 is not located within the following range (error code: K6706)
0, 
±2
−126
 
< ±2
128
• When the format specified by 
 is any value other than "0" or "1" (error code: K6706)
• When the total number of digits specified by 
+1 is not located within the following range (error code: K6706)
In the case of decimal point format:
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)
In the case of exponent format:
When the number of digits of the decimal part is "0", Total number of digits 
≥ 6
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 + 7)
• When the number of digits of the decimal part specified by 
+2 is not located within the following range (error 
code: K6706)
In the case of decimal point format: Number of digits of decimal part 
≤ (Total number of digits - 3)
In the case of exponent format: Number of digits of decimal part 
≤ (Total number of digits - 7)
• When the devices storing a character string specified by 
 exceeds the allowable device range (error code: 
K6706)
• When the conversion result exceeds the specified total number of digits (error code: K6706)
Instruction
Description
EVAL (FNC117)
Converts a character string (ASCII codes) into binary floating point data.
STR (FNC200)
Converts binary data into a character string (ASCII codes).
VAL (FNC201)
Converts a character string (ASCII codes) into binary data.
1
12
4
+1
+2
Total number of digits (12)
0
"30H (0)" is stored.
2 3 4 6 E +
1
1
Fixed to 2 digits.
+1
−12.34567
S
1
 
S
1
 
S
2
 
S
2
 
S
2
 
  
S
1
  
S
1
  
S
2
  
S
2
  
S
2
   
D