Mitsubishi MELSEC-Q Series Programming Manual page 84

Mitsubishi programmable controller
Hide thumbs Also See for MELSEC-Q Series:
Table of Contents

Advertisement

(7) WHILE...DO syntax
(a) Format
(b) Description
(c) Example
(8) REPEAT...UNTIL syntax
(a) Format
(b) Description
(c) Example
5.1 ST Language
5-8
5.1.3 Syntaxes in ST language
WHILE <Boolean expression> DO
<Syntax ...>;
END_WHILE;
The WHILE...DO syntax executes one or more syntaxes while the value of Boolean
expression (conditional formula) is TRUE.
The Boolean expression is evaluated before the execution of the syntax. If the value of
Boolean expression is FALSE, the syntax in the WHILE...DO syntax is not executed.
Since a return result of the Boolean expression in the WHILE syntax requires only
TRUE or FALSE, any Boolean expression that can be specified in the IF conditional
syntax can be used.
REPEAT
<Syntax ...>;
UNTIL <Boolean expression>
END_REPEAT;
The REPEAT...UNTIL syntax executes one or more syntaxes while the value of Boolean
expression (conditional formula) is FALSE.
The Boolean expression is evaluated after the execution of the syntax. If the value of
Boolean expression is TRUE, the syntaxes in the REPEAT...UNTIL syntax are not
executed.
Since a return result of the Boolean expression in the REPEAT syntax requires only
TRUE or FALSE, any Boolean expression that can be specified in the IF conditional
syntax can be used.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l seriesMelsec-f series

Table of Contents