Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
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
If the product c of a and b is not nonnumeric data, positive infinity,
or negative infinity, then the value of c is assigned to d.
START
a× b → c
c is nonnumeric data.
Nan = abc → FALSE
c is positive infinity.
PosInfinite = def → FALSE
c is negative infinity.
NegInfinite = ghi → FALSE
c → d
END
2-238
MUL
EN
ENO
c
In1
In2
CheckReal
EN
ENO
In
abc
Nan
def
PosInfinite
ghi
NegInfinite
MOVE
EN
ENO
d
In
Out
TRUE
FALSE
Nan = abc → TRUE
TRUE
FALSE
PosInfinite = def → TRUE
TRUE
FALSE
NegInfinite = ghi → TRUE
ST
c:=a*b;
CheckReal(c, abc, def, ghi);
IF ( (abc=FALSE) AND (def=FALSE) AND (ghi=FALSE) ) THEN
d:=c;
END_IF;
CheckReal

NY-series Instructions Reference Manual (W560)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents