To_** (Integer Conversion Group) - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

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
Conver-
sion 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
NJ-series Instructions Reference Manual (W502)
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);
2 Instruction Descriptions
ST expression
Out:=TO_** (In);
"**" must be an integer data
type.
Unit
Default
*2
---
---
---
Times, durations,
dates, and text strings
2
OK
2-277

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents