Flexible NC programming
1.11 Repeat program section (REPEAT, REPEATB, ENDLABEL, P)
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
93
Significance
REPEATB: Command for repeating a program line
REPEAT: Command for repeating a program section
The
<jump marker> identifies:
• the program line to be repeated (in the case of
REPEATB)
or
• the start of the program section to be repeated (in the case of
REPEAT)
<jump marker>:
The program line identified by the
<jump marker> can appear before
or after the
REPEAT/REPEATB statement. The search initially
commences toward the start of the program. If the jump marker is
not found in this direction, the search continues working toward the
end of the program.
Exception:
If the program section between the jump marker and the
REPEAT
statement needs to be repeated (see 2. under Syntax), the program
line identified by the
<jump marker> has to appear before the REPEAT
statement, since in this case the search runs only toward the
beginning of the program.
If the line with the
<jump marker> contains further operations, these
are executed again on each repetition.
ENDLABEL: Keyword marking the end of a program section to be repeated.
If the line with the
ENDLABEL contains further operations, these are
executed again on each repetition.
ENDLABEL can be used more than once in the program.
P: Address for specifying the number of repetitions
Number of program section repetitions
Type: INT
<n>:
The program section to be repeated is repeated
<n> times. After the
last repetition, the program is resumed at the line following the
REPEAT/REPEATB line.
Note:
In the absence of a number being specified for
P=<n>, the program
section is repeated just once.