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 #326 background imageLoading...
Page #326 background image
2 Instruction Descriptions
2-278
NJ-series Instructions Reference Manual (W502)
• Conversion is performed to within the effective digits of the data type of In. If In is a real number, the
fractional part is rounded off to the closest integer. The following table shows how values are
rounded.
The valid ranges for In and Out depend on their data types. Refer to the descriptions of the functions of
the following instructions for the valid ranges: **_TO_*** (Integer-to-Integer Conversion Group) (page 2-
232), **_TO_*** (Bit String-to-Integer Conversion Group) (page 2-239), and **_TO_*** (Real Number-
to-Integer Conversion Group) (page 2-246).
For detailed specifications when In is STRING data, refer to Function for the STRING_TO_** (Text
String-to-Integer Conversion Group) instructions (page 2-270).
• Always use the correct instruction name for the data type of Out.
• If the data type of In is for a bit string and the sizes of the data types of In and Out are different, the
following processing is performed.
• If the data size of Out is larger than the data size of In, the upper digits of Out will contain 0.
• If the data size of Out is smaller than the data size of In, the upper digits are truncated in Out.
• Observe the following precautions if In is STRING data.
• If the first character in In is a minus sign (−) or a plus sign (+), it is processed as the sign.
• Except for a minus sign (−) or a plus sign (+) at the beginning, In must consist of consecutive ‘0’ to
‘9’ characters. Underbars (‘_’) and blank characters before or after the ‘−’ or ‘+’ are allowed in the
text string.
• If the conversion result exceeds the valid range of Out, Out will contain an illegal value.
• An error occurs in the following cases. ENO will be FALSE, and Out will not change.
• In is STRING data, but the text sting in In does not express a number.
• In is STRING data, but it does not end in a NULL character.
Value of
fractional
part
Treatment Examples
Less than
0.5
The fractional part is truncated. 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
Greater
than 0.5
The fractional part is rounded up. 1.51 → 2
Precautions for Correct Use

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