![background image](http://html.mh-extra.com/html/mitsubishi-electric/melsec-iq-f-fx5/melsec-iq-f-fx5_programming-manual_239114964.webp)
962
18 TYPE CONVERSION FUNCTIONS
18.47 Converting STRING to REAL
• With regard to STRING type data, six digits excluding the sign, decimal point and exponent part are valid, and the 7th and
later digits are discarded during conversion.
• When 2BH (+) is specified as the sign in the floating point format or when the sign is omitted, a character string is converted
into a positive value. It is handled as negative value during conversion when the sign is set to 2DH (-).
• String data in the exponent format is handled as positive value during conversion when the sign of the exponent part is set
to 2BH (+) or when the sign is omitted. When 2DH (-) is specified as the sign, a character string is converted into a negative
value.
• When 20H (space) or 30H (0) exists between numbers except the first 0 in STRING type data, 20H or 30H is ignored during
conversion.
• When 30H (0) exists between a number and "E" in STRING type data (exponent format), 30H is ignored during conversion.
• When 20H (space) is contained in character string, 20H is ignored during conversion.
• Up to 24 characters can be input as STRING type data. 20H (space) and 30H (0) in a character string are counted as one
character respectively.
• A value input to (s) is the STRING type data value and within the following range.
• Exponent format
• Decimal point format
• Exponent format
• Decimal point format
• Exponent format
• Within the range of "30H" to "39H", "45H", "2BH", "2DH", "2EH", "20H" and "00H" in ASCII code
REAL
33H (3)
2EH (.)
30H (0)
35H (5)
34H (4)
33H (3)
2DH (-)
45H (E)
30H (0)
31H (1)
00H
31H (1)
2DH (-)
+1
+2
+3
+4
+5
+6
+0
High-order byte
Low-order byte
-1.35034E-10
E
4
3
0
5
3
.
1
-
- 1 0
(s)
(d)
REAL
-1.35034
3
0
5
3
1
-
4 1 2 0 2 3
.
REAL
-1.35034E-10
3
0
5
3
.
1
-
4 1 2 E - 1 0
REAL
-1.35034
5
3
.
1
0
-
0 3 4
REAL
-1.35034E-10
5
3
.
1
0
-
0 3 4 E - 1 0
REAL
-1.35034E-2
5
3
.
1
-
0 3 4 E - 0 2
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......