Repeat - Omron NY532-5400 Reference Manual

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

Advertisement

2 Instruction Descriptions

REPEAT

The REPEAT construct executes a statement once and then executes it repeatedly until a specified
condition expression is TRUE.
Instruction
REPEAT
Repeat
Variables
None
Function
The REPEAT construct executes a statement once and then executes it repeatedly until a specified
condition expression is TRUE. Use a condition expression that evaluates to TRUE or FALSE.
Item used for condition
expression
Logic expression
BOOL variable
BOOL constant
Function with a BOOL
return value
You can use the following operators in the logic expression.
Operator
=
Equals
<>
Not equals
<
<=
Comparison
>
>=
AND (&)
Logical AND
OR
Logical OR
XOR
Exclusive OR
NOT
NOT
2-36
Name
FB/FUN
---
Example
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.
abc
If the value of variable abc is TRUE, the result is TRUE. If it is
FALSE, the result is FALSE.
TRUE
TRUE
FUN name
If the function returns TRUE, the result is TRUE. If it returns FALSE,
the result is FALSE.
Meaning
Example
a=b
a<>b
a<b
a<=b
a>b
a>=b
a AND b
a & b
a OR b
a XOR b
NOT a
Graphic expression
None
Evaluation result
Evaluation result
If the values of variables a and b are equal, the result is TRUE.
Otherwise, the result is FALSE.
If the values of variables a and b are not equal, the result is
TRUE. Otherwise, the result is FALSE.
If the value of variable a is less than the value of variable b, the
result is TRUE. Otherwise, the result is FALSE.
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.
If the value of variable a is greater than the value of variable b,
the result is TRUE. Otherwise, the result is FALSE.
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.
The result is the logical AND of BOOL variables a and b.
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.
NY-series Instructions Reference Manual (W560)
ST expression
REPEAT
statement;
UNTIL condition expression
END_REPEAT;

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents