Real_To_Str(_E) - Mitsubishi Electric MELSEC FX Series Structured Programming Manual

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)

5.1.25 REAL_TO_STR(_E)

Outline
This function converts float (single precision) data into string data, and outputs the data obtained by
conversion.
1. Format
Function name
REAL_TO_STR
REAL_TO_STR_E
*1.
Output variable
2. Set data
Variable
EN
Input
variable
_REAL (
ENO
Output
variable
*1
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
1) This function converts float (single precision) data stored in a device specified in
(exponent) data, and outputs the data obtained by conversion to a device specified in
Float
(single
precision)
data
.
Sign
(integer part)
84
FX
3U(C)
Expression in each language
Structured ladder
REAL_TO_STR
Label 1
_REAL
X000
REAL_TO_STR_E
EN
ENO
Label 1
_REAL
Execution condition
Conversion source float (single precision) data
)
s
Execution status
String data after conversion
(
)
d
E
Sign (exponent part)
Added
automatically
FX
FX
FX
3G
2N(C)
1N(C)
REAL_TO_STR(_REAL);
Example:
Label 2:=
*1
Label 2
REAL_TO_STR(Label 1);
REAL_TO_STR_E(EN,_REAL,
Output label);
Example:
REAL_TO_STR_E(X000, Label 1,
*1
Label 2
Label 2);
Description
High-order byte
20H (space)
ASCII code (2EH)
for decimal point (.)
ASCII code
for 2nd decimal place
ASCII code
for 4th decimal place
45H(E)
ASCII code for tens
place of exponent part
00H
Automatically stored at the end of the character string
5 Applied Functions
5.1 Type Conversion Functions
FX
FX
/FX
FX
1S
U
2C
ST
Data type
Bit
FLOAT (Single Precision)
Bit
String
d
Low-order byte
String
Sign data (integer part)
ASCII code
for integer part
ASCII code
for 1st decimal place
ASCII code
for 3rd decimal place
ASCII code
for 5th decimal place
Sign data
(exponent part)
ASCII code for ones
place of exponent part
FX
0N
0(S)
into string
s
.
1st word
2nd word
3rd word
4th word
5th word
6th word
7th word

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents