5.1 Type Conversion Functions
5.1.28 String type
→
word (signed), double word (signed) type conversion
5-85
5
APPLICATION
FUNCTIONS
STR_TO_INT(_E),
STR_TO_DINT(_E)
STR_TO_INT(_E), STR_TO_DINT(_E)
5.1.28 String type → word (signed), double word (signed) type
conversion
STR_TO_INT(_E), STR_TO_DINT(_E)
Function
Operation processing
(1) STRING_TO_INT, STRING_TO_INT_E
(a) Converts string type data input to into word (signed) type data, and outputs the
operation result from .
(b) The value to be input to is string type data within the following range.
ASCII code: '30
H' to '39H', '20H', '2DH', and '00H'
String type data: '−32768 to 32767'
STR_TO_INT(_E)
STR_TO_DINT(_E)
_E: With EN/ENO
indicates any of the following
functions.
STR_TO_INT STR_TO_INT_E
STR_TO_DINT STR_TO_DINT_E
Input argument, EN:
Executing condition (TRUE: Execution, FALSE: Stop) :Bit
s:
Input :String
Output argument, ENO:
Output status (TRUE: Normal, FALSE: Error) :Bit
d:
Output :Word (signed), double word (signed)
Universal
UD
High
Performance
EN ENO
ds
STR_TO_INT_E
(EN, s, d);ENO:=
Structured ladder
ST
STR_TO_INT_E
s
d
Word (signed) typ
ASCII code of hundreds place ASCII code of thousands place
ASCII code of units place
ASCII code of tens place
00H (Indicates the end of the character string.)
ASCII code of ten-thousands place
Sign data
2nd word
3rd word
4th word
String 1st word
High-order byte Low-order byte
s