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 #258 background imageLoading...
Page #258 background image
2 Instruction Descriptions
2-210
NJ-series Instructions Reference Manual (W502)
The CheckReal instruction checks a real number In to see if it is nonnumeric data, positive infinity, or
negative infinity. It outputs the results to Nan, PosInfinite, and NegInfinite.
The following figure shows a programming example. The values of REAL variables a and b are multi-
plied and the result is tested to see if it is a real number. If the multiplication result is a real number, it is
assigned to variable d.
Use this instruction on the result of a math instruction that handles real numbers to see if the result is
nonnumeric data, positive infinity, or negative infinity.
• Return value Out is not used when the instruction is used in ST.
• If you pass an integer parameter to In, the data type is converted as follows:
Function
Additional Information
Precautions for Correct Use
Data type of parameter that is
passed to In
Data type of In
USINT, UINT, SINT, or INT REAL
UDINT or DINT LREAL
ULINT or LINT A building error will occur.
c:=a*b;
CheckReal(c, abc, def, ghi);
IF ( (abc=FALSE) AND (def=FALSE) AND (ghi=FALSE) ) THEN
d:=c;
END_IF;
LD ST
a
b
abc
abc
def
ghi
def ghi
CheckReal
EN ENO
In
Nan
PosInfinite
NegInfinite
MUL
c
c
c
d
EN ENO
In1
In2
MOVE
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