To_** (Integer Conversion Group) - Omron NY532-5400 Reference Manual

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

Advertisement

2 Instruction Descriptions

TO_** (Integer Conversion Group)

These instructions convert integers, bit strings, real numbers, and text strings to integers.
Instruction
TO_**
Integer Conversion
Group
Variables
Name
Meaning
In
Data to
convert
Out
Conversion
result
*1 The valid ranges depend on the data types of In and Out.
*2 If you omit the input parameter, the default value is not applied. A building error will occur.
Bit strings
In
OK OK OK OK OK OK OK OK OK OK OK OK OK OK
Out
Function
These instructions convert the integer, bit string, real number, or text string in In to an integer.
The name of the instruction is determined by the data type of conversion result Out. For example, if Out
is the LINT data type, the instruction is TO_LINT.
The following example for the TO_LINT instruction is for when In is LREAL#1.0e+10.
LD
LREAL#1.0e+10
LREAL data
In
LREAL#1.0e+10
2-306
Name
FB/FUN
FUN
I/O
Description
Input
Data to convert
Output
Conversion result
OK OK OK OK OK OK OK OK
TO_LINT
EN
ENO
In
abc
LINT data
Out=abc
10000000000
Graphic expression
(@)TO_**
EN
ENO
In
Out
"**" must be an integer data type.
Valid range
*1
*1
Integers
ST
abc:=TO_LINT(LREAL#1.0e+10);
NY-series Instructions Reference Manual (W560)
ST expression
Out:=TO_** (In);
"**" must be an integer data
type.
Unit
Default
---
*2
---
---
Times, durations, dates,
and text strings
OK

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents