EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 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
Loading...
Basic instructions
8.8 Program control operations
S7-1200 Programmable controller
324 System Manual, V4.2, 09/2016, A5E02486680-AK
8.8.10.8
EXIT statement
Table 8- 164 EXIT instruction
SCL
Description
EXIT;
An EXIT statement is used to exit a loop (FOR, WHILE or REPEAT) at any point, regardless of whether
the terminate condition is satisfied.
The EXIT statement executes according to the following rules:
This statement causes the repetition statement immediately surrounding the exit
statement to be exited immediately.
Execution of the program is continued after the end of the loop (for example after
END_FOR).
Use the EXIT statement within a loop. In nested loops, the EXIT statement returns the
processing to the next higher nesting level.
Example: EXIT statement
FOR i := 0 TO 10 DO
CASE value[i, 0] OF
1..10: value [i, 1]:="A";
11..40: value [i, 1]:="B";
41..100: value [i, 1]:="C";
ELSE
EXIT;
END_CASE;
END_FOR;

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals