5-60
5.1 Type Conversion Functions
5.1.19 Single-precision real type
→
string type conversion
REAL_TO_STR(_E)
Operation Error
An operation error occurs in the following case.
• The input value is outside the range of ±1.17549
−38
to ±3.40282
+38
. (Error code: 4100)
Program Example
The program which converts single-precision real type data input to into string type (exponent
form) data, and outputs the operation result from .
(a) Function without EN/ENO (REAL_TO_STR)
[Structured ladder]
[ST]
g_string1:= REAL_TO_STR(g_real1);
(b) Function with EN/ENO (REAL_TO_STR_E)
[Structured ladder]
[ST]
g_bool3 := REAL_TO_STR_E(g_bool1, g_real1, g_string1);
s
d