Mitsubishi Electric MELSEC Q Series Programming Manual page 81

Structured. fundamentals
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

REPEAT...UNTIL syntax
■Format
REPEAT
<Syntax ...>;
UNTIL <Boolean expression>
END_REPEAT;
■Description
The REPEAT...UNTIL syntax executes one or more syntax while the value of Boolean expression (conditional expression) is
FALSE.
The Boolean expression is evaluated after the execution of the syntax. If the value of Boolean expression is TRUE, the syntax
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.
■Example
REPEAT
intV1 := intV1 + 1;
UNTIL intV1 = 30
END_REPEAT;
RETURN syntax
■Format
RETURN;
■Description
The RETURN syntax is used to end a program in a middle of the process.
When the RETURN syntax is used in a program, the process jumps from the RETURN syntax execution step to the last line of
the program, ignoring all the remaining steps after the RETURN syntax.
■Example
IF bool1 THEN
RETURN;
END_IF;
5 WRITING PROGRAMS
5.1 ST
5
79

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec f seriesMelsec l series

Table of Contents