Nj-Series Instructions Reference Manual (W502 - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

2 Instruction Descriptions
Function
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.
LD
a
b
c
abc
def
ghi
c
Additional Information
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.
Precautions for Correct Use
• 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:
Data type of parameter that is
passed to In
USINT, UINT, SINT, or INT
UDINT or DINT
ULINT or LINT
2-210
MUL
EN
ENO
c
In1
In2
CheckReal
EN
ENO
In
abc
Nan
def
PosInfinite
ghi
NegInfinite
MOVE
EN
ENO
d
In
Out
Data type of In
REAL
LREAL
A building error will occur.
ST
c:=a*b;
CheckReal(c, abc, def, ghi);
IF ( (abc=FALSE) AND (def=FALSE) AND (ghi=FALSE) ) THEN
d:=c;
END_IF;

NJ-series Instructions Reference Manual (W502)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents