EXIT Statement

Help Contents

Introduction

The IEC 61131-3 ST EXIT statement stops a loop before it has completed:

Examples

  1. Use an EXIT statement to stop a FOR loop before it completes:
    For Index:= 0 To 10 Do
        If Item[ Index ] != 0 Then
            Exit;
        End_If;
    End_For;

Standards Compliance

IEC 61131-3 Second Edition: Table 56.9.

IEC 61131-3 Third Edition: Table 72.10.

Further Information

Structured Text

For other Structured Text (ST) statement types.

Glossary

For the meaning of terms used in Fernhill SCADA.