Attention

IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.

EXIT

The EXIT statement terminates execution of the innermost enclosing loop.

IEC 61131-3

Section 3.3.2.4

Support

Supported

Syntax

EXIT ;

Description

EXIT immediately breaks out of the innermost FOR, WHILE, or REPEAT loop. Execution continues with the first statement after the loop’s closing keyword (END_FOR, END_WHILE, or END_REPEAT).

If EXIT appears inside nested loops, only the innermost loop is terminated.

Example

See Also

  • FOR — counted loop

  • WHILE — pre-tested loop

  • REPEAT — post-tested loop

  • RETURN — early exit from POU