15 TYPE CONVERSION FUNCTIONS
15.37 Converting REAL to STRING
737
15
15.37 Converting REAL to STRING
REAL_TO_STRING(_E)
These functions convert REAL type data to STRING type data (exponent format).
â– Descriptions, types, and data types
â– Operation processing
• These functions convert the REAL type data input to (s) to STRING type (exponent format) data and output from (d).
• A value input to (s) is the REAL type data value.
Ladder diagram Structured text
[Without EN/ENO] [With EN/ENO] [Without EN/ENO]
d:=REAL_TO_STRING(s);
[With EN/ENO]
d:=REAL_TO_STRING_E(EN,ENO,s);
Argument Description Type Data type
EN Execution condition (TRUE: Execution, FALSE: Stop) Input variable BOOL
s Input Input variable REAL
ENO Output status (TRUE: Normal, FALSE: Abnormal) Output variable BOOL
d Output Output variable STRING(13)
Sign (integer part) Sign (exponent part)
REAL
1st word of the character string
2nd word
3rd word
4th word
5th word
6th word
7th word
High-order byte Low-order byte
20H (space)
2EH (.)
45H (E)
(d)
(s)
00H (NUL)
E
.
ASCII code for ones
place of exponent part
ASCII code for tens
place of exponent part
Sign data
(exponent part)
Added
automatically
ASCII code for
5th decimal place
ASCII code for
3rd decimal place
ASCII code for
4th decimal place
ASCII code for
1st decimal place
ASCII code for 2nd
decimal place
ASCII code for
integer part
Sign data
(integer part)