Converting Real To String - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

25.43

Converting REAL to STRING

REAL_TO_STRING(_E)
RnPCPU
RnPCPU
RnCPU RnENCPU
(Process)
(Redundant)
These functions converts a REAL data type value to STRING data type (exponential form).
Ladder, FBD/LD
[Without EN/ENO]
s
d
Setting data
■Description, type, data type
Argument
Description
EN
Execution condition (TRUE: Executed, FALSE: Not executed)
s (IN)
Input
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
d
Output
Processing details
■Operation processing
• These functions convert the value input to (s) from REAL data type to STRING data type (exponential form), and output the
converted value from (d).
(s)
REAL
.
E
Sign for
Sign for
integral part
exponent part
Automatically
added.
RnSFCPU RnSFCPU
(Standard)
(Safety)
[With EN/ENO]
EN
ENO
s
d
Upper byte
20H (space)
2EH (.)
ASCII code
(2nd decimal place)
ASCII code
(4th decimal place)
45H(E)
ASCII code
(tens place (exponent part))
00H
When SM701 is off, 00H is stored.
Structured text
[Without EN/ENO]
d:=REAL_TO_STRING(s);
[With EN/ENO]
d:=REAL_TO_STRING_E(EN,ENO,s);
Type
Input variable
Input variable
Output variable
Output variable
(d)
Lower byte
ASCII code
(sign data for integral part)
ASCII code
(integral part)
ASCII code
(1st decimal place)
ASCII code
(3rd decimal place)
ASCII code
(5th decimal place)
ASCII code
(sign data for exponent part)
ASCII code
(ones place (exponent part))
STRING
25 TYPE CONVERSION FUNCTIONS
25.43 Converting REAL to STRING
25
Data type
BOOL
REAL
BOOL
STRING(13)
+0
+1
+2
+3
+4
+5
+6
1851

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents