EasyManuals Logo

Omron NJ501-1500 User Manual

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
Page #80 background imageLoading...
Page #80 background image
2 Instruction Descriptions
2-32
NJ-series Instructions Reference Manual (W502)
WHILE
The WHILE construct repeatedly executes a statement as long as the evaluation result of a specified
condition expression is TRUE.
None
The WHILE construct repeatedly executes a statement as long as the evaluation result of a specified
condition expression is TRUE. Use a condition expression that evaluates to TRUE or FALSE.
You can use the following operators in the logic expression.
Instruction Name FB/FUN Graphic expression ST expression
WHILE While --- None WHILE condition expression
DO
statement;
END_WHILE;
Variables
Function
Item used for condition
expression
Example Evaluation result
Logic expression
a>3 If the value of variable a is greater than 3, the result is TRUE. Oth-
erwise, the result is FALSE.
a=b If the values of variables a and b are equal, the result is TRUE. Oth-
erwise, the result is FALSE.
BOOL variable abc If the value of variable abc is TRUE, the result is TRUE. If it is
FALSE, the result is FALSE.
BOOL constant TRUE TRUE
Function with a BOOL
return value
FUN name If the function returns TRUE, the result is TRUE. If it returns FALSE,
the result is FALSE.
Operator Meaning Example Evaluation result
= Equals a=b If the values of variables a and b are equal, the result is TRUE.
Otherwise, the result is FALSE.
<> Not equals a<>b If the values of variables a and b are not equal, the result is
TRUE. Otherwise, the result is FALSE.
<
Comparison
a<b If the value of variable a is less than the value of variable b, the
result is TRUE. Otherwise, the result is FALSE.
<= a<=b If the value of variable a is less than or equal to the value of
variable b, the result is TRUE. Otherwise, the result is FALSE.
> a>b If the value of variable a is greater than the value of variable b,
the result is TRUE. Otherwise, the result is FALSE.
>= a>=b If the value of variable a is greater than or equal to the value of
variable b, the result is TRUE. Otherwise, the result is FALSE.
AND (&) Logical AND a AND b
a & b
The result is the logical AND of BOOL variables a and b.
OR Logical OR a OR b The result is the logical OR of BOOL variables a and b.
XOR Exclusive OR a XOR b The result is the logical exclusive OR of BOOL variables a and
b.
NOT NOT NOT a The result is the NOT of BOOL variable a.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals