String_To_** (Text String-To-Integer Conversion Group) - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

STRING_TO_** (Text String-to-
Integer Conversion Group)
These instructions convert text strings to integers.
Instruction
STRING_TO_**
Text String-to-
Integer Conversion
Group
Variables
Name
Meaning
In
Data to
convert
Out
Conversion
result
* The valid range depends on the data type of Out. Refer to Function for details.
Bit strings
In
Out
Function
These instructions convert a text string, In, to an integer.
Basically, the text string in In must consist only of numbers 0 to 9. The following exceptions are possi-
ble.
• If the first character in In is a single minus sign (−) or a single plus sign (+), it is processed as the sign.
• Any blank characters at the beginning of In are ignored.
• Any blank characters between an initial minus sign (−) or plus sign (+) and a number are ignored.
• Any single underbars ('_') at any location are ignored.
• An error occurs if there are two or more consecutive underbars ('_') at any location.
• An error occurs if there are any underbars ('_') at the beginning or end.
• An error occurs if there are any underbars ('_') between the minus signs ('−') or plus sign ('+') and the
number at the beginning.
The name of the instruction is determined by the data type of conversion result Out. For example, if Out
is the DINT data type, the instruction is STRING_TO_DINT.
NY-series Instructions Reference Manual (W560)
Name
FB/FUN
FUN
I/O
Description
Input
Data to convert
Output
Conversion result
OK OK OK OK OK OK OK OK
Graphic expression
(@)STRING_TO_**
EN
ENO
In
"**" must be an integer data type.
Valid range
*
Depends on data type.
Integers
2 Instruction Descriptions
ST expression
Out:=STRING_TO_** (In);
"**" must be an integer data
Out
type.
Unit
Default
---
''
---
---
Times, durations, dates,
and text strings
2
OK
2-299

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents