EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #331 background imageLoading...
Page #331 background image
2-283
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Data Type Conversion Instructions
2
TRUNC, Round, and RoundUp
TRUNC, Round, and RoundUp
These instructions change real numbers to integers.
* If you omit the input parameter, the default value is not applied. A building error will occur.
These instructions change the real number in In to an integer by eliminating the fractional part.
z TRUNC
The TRUNC instruction truncates the number at the first decimal digit.
TRUNC: Truncates the number at the first decimal digit.
Round: Rounds the number at the first decimal digit.
RoundUp: Rounds up the number at the first decimal digit.
Instruction Name FB/FUN Graphic expression ST expression
TRUNC Truncate FUN Out:=TRUNC(In);
Round Round Off Real
Number
FUN Out:=Round(In);
RoundUp Round Up Real
Number
FUN Out:=RoundUp(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Data to
convert
Input Data to convert Depends on data type.
---
*
Out Conver-
sion result
Output Conversion result Depends on data type. --- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK OK
Out OK OK
Function
(@)TRUNC
EN ENO
In Out
(@)Round
EN ENO
In Out
(@)RoundUp
EN ENO
In Out

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals