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

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

Precautions for Correct Use
• If In is not a range specification variable, the value of Out changes to TRUE.
• If this instruction is used in a ladder diagram, the value of Out changes to FALSE if an error occurs in
the previous instruction on the rung.
Sample Programming
Here, the result of addition i is checked to see if it is within the valid range (10 to 99) of the range speci-
fication variable x. If it is not within the valid range, the value of variable Correct is assigned to variable
x.
LD
Variable
i
abc
def
x
Correct
P_On
EN
abc
In1
def
In2
EN
i
In
x
Val
ST
Variable
i
abc
def
Chk
x
Correct
i := abc+def;
Chk:=ChkRange(i, x);
IF (Chk=TRUE) THEN
x := i;
ELSE
x := Correct;
END_IF;

NY-series Instructions Reference Manual (W560)

Data type
Initial value
INT
0
INT
0
INT
0
INT(10..99)
10
INT
0
ADD
ENO
i
ChkRange
EN
i
In
EN
Correct
In
Data type
Initial value
INT
0
INT
0
INT
0
BOOL
FALSE
INT(10..99)
10
INT
0
// Check subrange variable.
// Assign i to x if value of i is in range.
// Assign Correct to x if value of i is out of range.
MOVE
ENO
x
Out
MOVE
ENO
Out
x
2 Instruction Descriptions
2-1371
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents