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-29
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
ST Statement Instructions
2
CASE
You can use the CASE construct to build a hierarchy. The following example executes statement 12 if
the value of integer expression 1 is 1 and the value of integer expression 11 is 2.
CASE integer expression 1 OF
1 :
CASE integer expression 1 OF
1 :
statement 11;
2 :
statement 12;
ELSE
statement 1m;
END_CASE;
2 :
statement 2;
3 :
statement 3;
ELSE
statement m;
END_CASE;
You can use more than one value at the same time. Separate values with commas. The following
example executes statement 1 if the value of the integer expression is either 1 or 2.
CASE integer expression 1 OF
1,2 :
statement 1;
3 :
statement 2;
4 :
statement 3;
ELSE
statement m;
END_CASE;
Additional Information
Statement 1 Statement m Statement n Statement 2
Equal to
value 1?
FALSE
TRUE
FALSE
TRUE
FALSE
TRUE
Equal to
value 2?
Equal to
value n?

Table of Contents

Related product manuals