EasyManua.ls Logo

Omron NJ501-1500

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
Loading...
2-31
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
ST Statement Instructions
2
CASE
This example assigns INT#10 to variable def if the value of variable abc is INT#1, INT#20 if the value of
variable abc is INT#2, and INT#30 if the value of variable abc is INT#3. Otherwise, it assigns the value
of variable ghi to variable def.
This example assigns INT#10 to variable def if the value of variable abc is INT#1, INT#20 if the value of
variable abc is INT#2 or INT#5, and INT#30 if the value of variable abc is between INT#6 and INT#10,
inclusive. Otherwise, it does nothing.
Sample Programming
CASE abc OF
INT#1:
def:=INT#10;
INT#2:
def:=INT#20;
INT#3:
def:=INT#30;
ELSE
def:=ghi;
END_CASE;
abc
def
ghi
0
0
0
INT
INT
INT
Variable
Data type
Initial value
CASE abc OF
INT#1:
def:=INT#10;
INT#2,INT#5:
def:=INT#20;
INT#6..INT#10:
def:=INT#30;
END_CASE;
abc
def
0
0
INT
INT
Variable
Data type
Initial value

Table of Contents

Related product manuals