To_*** (Real Number-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

2 Instruction Descriptions
**_TO_*** (Real Number-to-Integer
Conversion Group)
These instructions convert real numbers to integers.
Instruction
Name
**_TO_***
Real Number-to-
Integer Conversion
Group
Variables
Name
Meaning
In
Data to
convert
Out
Conver-
sion result
* The valid ranges depend on the data types of In and Out. Refer to Function, below, for details.
Bit strings
In
Out
Function
These instructions convert a real number, In, to an integer.
The name of the instruction is determined by the data types of In and conversion result Out. For exam-
ple, if In is LREAL data and Out is LINT data, the name of the instruction is LREAL_TO_LINT.
The following example for the LREAL_TO_LINT instruction is for when In is LREAL#1.0e+10.
LD
LREAL#1.0e+10
2-246
FB/FUN
FUN
"**" must be a real number data type.
"***" must be an integer data type.
I/O
Description
Input
Data to convert
Output
Conversion result
OK OK OK OK OK OK OK OK
LREAL_TO_LINT
EN
ENO
In
Graphic expression
(@)**_TO_***
EN
ENO
In
Out
Valid range
*
*
Integers
OK OK
ST
abc:=LREAL_TO_LINT(LREAL#1.0e+10);
abc
NJ-series Instructions Reference Manual (W502)
ST expression
Out:=**_TO_*** (In);
"**" must be a real number
data type.
"***" must be an integer data
type.
Unit
Default
0
---
---
---
Times, durations,
dates, and text strings

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents