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

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

Advertisement

25.59

Converting STRING to REAL

STRING_TO_REAL(_E)
RnPCPU
RnCPU RnENCPU
(Process)
These functions convert a value from STRING data type to REAL data type.
Ladder, FBD/LD
[Without EN/ENO]
s
d
Setting data
■Description, type, data type
Argument
EN
s (IN)
ENO
d
Processing details
■Operation processing
• These functions convert the value input to (s) from STRING data type (decimal form/exponential form) to REAL data type,
and output the converted value from (d).
+0
ASCII code (1st character)
+1
ASCII code (3rd character)
+2
ASCII code (5th character)
+3
ASCII code (7th character)
+4
ASCII code (9th character)
+5
ASCII code (11th character)
+6
25 TYPE CONVERSION FUNCTIONS
1876
25.59 Converting STRING to REAL
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
[With EN/ENO]
EN
ENO
s
Description
Execution condition (TRUE: Executed, FALSE: Not executed)
Input
Output status (TRUE: Normal, FALSE: Abnormal)
Output
Upper byte
00H (Null character (end of string))
STRING
Structured text
[Without EN/ENO]
d:=STRING_TO_REAL(s);
[With EN/ENO]
d:=STRING_TO_REAL_E(EN,ENO,s);
d
(s)
Lower byte
ASCII code (sign data)
ASCII code (2nd character)
ASCII code (4th character)
ASCII code (6th character)
ASCII code (8th character)
ASCII code (10th character)
Type
Data type
Input variable
BOOL
Input variable
STRING(24)
Output variable
BOOL
Output variable
REAL
(d)
REAL

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents