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 #295 background imageLoading...
Page #295 background image
2-247
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Data Type Conversion Instructions
2
**_TO_*** (Real Number-to-Integer Conversion Group)
The fractional part of the value of In is rounded off to the closest integer. The following table shows how
values are rounded.
The following table shows the valid ranges for In and Out according to their data types.
Value of
fractional
part
Treatment Examples
Less than
0.5
The fractional part is truncated. 1.49 → 1
−1.49 → −1
0.5 If the ones digit is an even number, the fractional part
is truncated. If it is an odd number, the value is
rounded up.
1.50 → 2
2.50 → 2
−1.50 → −2
−2.50 → −2
Greater
than 0.5
The fractional part is rounded up. 1.51 → 2
−1.51 → −2
Data type
of In
Data type
of Out
Valid range for In Valid range for Out
REAL
USINT 0 to 2.55e+2 0 to 255
UINT 0 to 6.5535e+4 0 to 65535
UDINT 0 to 4.294967e+9 0 to 4294967295
ULINT 0 to 1.844674e+19 0 to 18446744073709551615
SINT −1.28e+2 to 1.27e+2 −128 to 127
INT −3.2768e+4 to 3.2767e+4 −32768 to 32767
DINT −2.147483e+9 to 2.147483e+9 −2147483648 to 2147483647
LINT −9.223372e+18 to 9.223372e+18 −9223372036854775808 to
9223372036854775807
LREAL
USINT 0 to 0.255e+3 0 to 255
UINT 0 to 6.5535e+4 0 to 65535
UDINT 0 to 4.294967295e+9 0 to 4294967295
ULINT 0 to 1.84467440737095e+19 0 to 18446744073709551615
SINT −1.28e+2 to 1.27e+2 −128 to 127
INT −3.2768e+4 to 3.2767e+4 −32768 to 32767
DINT −2.147483648e+9 to 2.147483647e+9 −2147483648 to 2147483647
LINT −9.22337203685477e+18 to
9.22337203685477e+18
−9223372036854775808 to
9223372036854775807
LREAL data
LINT data
In
Out=abc
LREAL#1.0e+10
10000000000

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