Siemens SIMATIC S5 Manual page 149

Ip 266 positioning module
Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

IP 266
G20: End of loop
G24: Start of loop
Loops may be nested. Subroutines which themselves contain loops may also
be called in a loop. The nesting depth for loops and subroutine calls together
may not exceed five. A continuous loop may be programmed only once, and
only at the highest level. A program invoked via an L function may not
contain a continuous loop.
G20: End of loop
G20 identifies the end of a program loop. A block containing G20 may con-
tain no other functions.
G24: Start of loop
The G24 function identifies the start of a program loop.
The number of loop passes must be specified via the F function.
Example 1:
N20
N120
Example 2:
N20
N130
EWA 4NEB 812 6057-02
Machine Data, Modes and Traversing Programs
G24
F5
A loop with five passes begins on
.
this line
.
.
.
.
.
The loop ends on this line
G20
G24
F0
When you specify a 0 as the
.
parameter for the number of loop
.
.
passes, you define the loop as
.
.
continuous loop.
.
.
G20
End of the continuous loop.
5-77

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents