Converting String To Real - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

15.47

Converting STRING to REAL

STRING_TO_REAL(_E)
These functions convert STRING type data to REAL type data.
Ladder diagram
[Without EN/ENO]
s
d
Setting data
■Descriptions, types, and data types
Argument
Description
EN
Execution condition (TRUE: Execution, FALSE: Stop)
s
Input
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
d
Output
Processing details
■Operation processing
• These functions convert the STRING type (in the decimal format or exponent format) data input to (s) to REAL type data
and output from (d).
1st word of the character string
2nd word
3rd word
4th word
5th word
6th word
7th word
• The conversion source STRING type data can be in the decimal format or exponent format.
• Decimal point format
1st word of the character string
2nd word
3rd word
4th word
5th word
[With EN/ENO]
EN
ENO
s
d
(s)
High-order byte
Low-order byte
ASCII code for 1st character
ASCII code for 3rd character
ASCII code for 2nd character
ASCII code for 5th character
ASCII code for 4th character
ASCII code for 7th character
ASCII code for 6th character
ASCII code for 8th character
ASCII code for 9th character
ASCII code for 11th character
ASCII code for 10th character
00H (Indicates the end of the character string.)
(s)
High-order byte
Low-order byte
31H (1)
33H (3)
30H (0)
34H (4)
00H
-
1
.
3
5
0
3
Structured text
[Without EN/ENO]
d:=STRING_TO_REAL(s);
[With EN/ENO]
d:=STRING_TO_REAL_E(EN,ENO,s);
Type
Input variable
Input variable
Output variable
Output variable
Sign data
REAL
2DH (-)
2EH (.)
35H (5)
-1.35034
33H (3)
REAL
4
15 TYPE CONVERSION FUNCTIONS
Data type
BOOL
STRING(24)
BOOL
REAL
(d)
(d)
15.47 Converting STRING to REAL
15
751

Advertisement

Table of Contents
loading

Table of Contents