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

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

Advertisement

25.57

Converting STRING to DINT

STRING_TO_DINT(_E)
RnPCPU
RnCPU RnENCPU
(Process)
These functions convert a value from STRING data type to DINT 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 to DINT data type, and output the converted value
from (d).
+0
+1
+2
ASCII code (hundred-thousands place)
+3
+4
+5
• Input a STRING data type value to (s) within the following range.
• ASCII code: 30H to 39H, 20H, 2DH, and 00H
• STRING data type value: -2147483648 to 2147483647
■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.
25 TYPE CONVERSION FUNCTIONS
1872
25.57 Converting STRING to DINT
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
ASCII code (billions place)
ASCII code (ten-millions place)
ASCII code (thousands place)
ASCII code (tens place)
00H (Null character (end of string))
Operation result
ENO
TRUE
FALSE
Structured text
[Without EN/ENO]
d:=STRING_TO_DINT(s);
[With EN/ENO]
d:=STRING_TO_DINT_E(EN,ENO,s);
d
(s)
Lower byte
ASCII code (sign data)
ASCII code (hundred-millions place)
ASCII code (millions place)
ASCII code (ten-thousands place)
ASCII code (hundreds place)
ASCII code (ones place)
STRING
*1
Type
Data type
Input variable
BOOL
Input variable
STRING(11)
Output variable
BOOL
Output variable
DINT
(d)
Operation result output value
Undefined value
(d)
DINT

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents