Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 1880

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

Advertisement

• The ASCII code 20H (space) or 30H (0) that exists before the first numerical value 0 in the STRING data type value is
ignored.
• When (s) is in decimal form
-
0 1 . 3 5
0
3
• When (s) is in exponential form
-
0 1 . 3 5
0
3
• The ASCII code 30H (0) that exists between E and a numerical value in the STRING data type value is ignored (in
exponential form only).
- 1 . 3 5
0
3
4
E
• The ASCII code 20H (space) that exists in the the string is ignored.
• Up to 24 characters can be input. The ASCII codes 20H (space) and 30H (0) that exist in the string are counted as one
character as well.
• Input a STRING data type value to (s) within the following range.
• ASCII code: 30H to 39H, 45H, 2BH, 2DH, 2EH, 20H, and 00H
■Operation result
1.
Function without EN/ENO
The operation processing is performed. The operation result is output from (d).
2.
Function with EN/ENO
The execution conditions and operation results will be as follows.
Execution condition
EN
TRUE (executed)
FALSE (not executed)
*1 If the value FALSE is output from ENO, the output data from (d) will be undefined. Create a program so that the undefined value will not
be used in operations.
Operation error
Error code
Description
(SD0)
2820H
There is no NULL code (00H) in the device area (between the specified device number and the last device number) specified by (s).
3401H
An out-of-range value is input to (s).
• The integral part or decimal part contains a character other than 30H(0) to 39H(9).
• More than one 2EH (.) exists in the specified string.
• The exponent of the specified character string contains a character other than 45H(E), 65H(e), 2BH(+), and 2DH(-).
• The specified character string contains more than one exponent 45H(E) or 65H(e).
• The exponent in the specified string contains a numerical value consisting of three digits or more.
• The exponent of the specified character string contains more than one sign 2BH(+) or 2DH(-).
• The specified string (in the integral part if the decimal format is used or in the mantissa if the exponent format is used) contains more
than one sign data of 2BH(+) or 2DH(-).
• The number of characters in the device specified by (s) and later is 0 or exceeds 24.
3403H
The data output from (d) exceeds the following range. (An overflow has occurred.)
|(d)|<2
25 TYPE CONVERSION FUNCTIONS
1878
25.59 Converting STRING to REAL
4
-1.35034
REAL
4
E
-
1
0
-1.35034E-10
-
0
2
-1.35034E-2
REAL
Operation result
ENO
TRUE
FALSE
128
REAL
*1
(d)
Operation result output value
Undefined value

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents