Siemens SINUMERIK 840DE Programming Manual page 400

Hide thumbs Also See for SINUMERIK 840DE:
Table of Contents

Advertisement

Subprograms and Repetition of Program Sections
11.4 Program section repetition
Programming repeat block
LABEL: xxx
yyy
REPEATB LABEL P=n
Zzz
The program line identified by a label is repeated P=n times. If P is not specified, the
program section is repeated exactly once. After the last repetition, the program is continued
at the line zzz following the REPEATB line.
The block identified by the label can appear before or after the REPEATB statement. The
search initially commences toward the start of the program. If the label is not found in this
direction, the search continues toward the end of the program.
Programming repeat area starting at label
LABEL: xxx
yyy
REPEAT LABEL P=n
zzz
The program section between the label with any name and the REPEAT statement is
repeated P=n times. If the block with the label contains further statements, these are
executed again on each repetition. If P is not specified, the program section is repeated
exactly once. After the last repetition, the program is continued at the line zzz following the
REPEAT line.
Note
The label must appear before the REPEAT statement. The search is performed toward the
start of the program only.
Programming repeat area between two labels
START_LABEL: xxx
ooo
END_LABEL: yyy
ppp
REPEAT START_LABEL END_LABEL P=n
zzz
The area between the two labels is repeated P=n times. User-defined names can be
assigned to the labels. The first line of the repetition contains the start label, the last line
contains the end label. If the line containing the start or end label contains further
statements, these are executed again on each pass. If P is not specified, the program
section is repeated once. After the last repetition, the program is continued at the line zzz
following the REPEAT line.
11-8
Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
Fundamentals

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents