4 - 21 4 - 21
4 ST PROGRAM EXPRESSIONS
(2) EXIT syntax
[Format]
EXIT;
[Explanation]
The EXIT syntax can be used in the repeat statement of an ST program
and terminates a repeat loop midway.
When the EXIT syntax is reached during execution of a repeat loop, the
repeat loop processing after the EXIT syntax is not executed. The program
is continued on the line that follows the one where the repeat loop
processing has been terminated.
FALSE
EXIT
TRUE
TRUE
FALSE
Loop statement
Conditional
statement
Statement
[Description example]
(a) When actual device is used in IF conditional Boolean expression
FOR D0 : = 0 TO 10 D0 (* If the D0 value is less than or equal to 10, *)
(* repeat is executed.
*)
IF D1 > 10 THEN
(* Whether the D1 value is greater than 10
*)
(* or not is checked.
*)
EXIT;
(* If the D1 value is greater than 10,
*)
(* repeat processing
*)
(*
ends.
*)
END_IF;
END_FOR;
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......