Omron NJ501-1500 Reference Manual page 73

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

Advertisement

Operator
OR
Logical OR
XOR
Exclusive OR
NOT
NOT
The flowchart in the following example shows the evaluation results for condition expressions 1 and 2.
You can use more than one statement for each of statements 1 to 3.
IF condition expression 1 THEN
statement 1;
ELSIF condition expression 2 THEN
statement 2;
ELSE
statement 3;
END_IF;
FALSE
Condition
expression 1
TRUE
Statement 1
Additional Information
• You can use the IF construct to build a hierarchy. The following example executes statement 11 if the
evaluation results of both condition expression 1 and condition expression 11 are TRUE.
IF condition expression 1 THEN
IF condition expression 11 THEN
statement 11;
ELSIF condition expression 12 THEN
statement 12;
ELSE
statement 13;
END_IF;
ELSIF condition expression 2 THEN
statement 2;
ELSE
statement 3;
END_IF;
NJ-series Instructions Reference Manual (W502)
Meaning
Example
a OR b
a XOR b
NOT a
FALSE
Condition
expression 2
TRUE
Statement 2
Statement 3
2 Instruction Descriptions
Evaluation result
The result is the logical OR of BOOL variables a and b.
The result is the logical exclusive OR of BOOL variables a and
b.
The result is the NOT of BOOL variable a.
2
2-25

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents