1.12.5
Program loop with condition at the end of the loop (REPEAT, UNTIL)
Function
For a REPEAT loop, the condition is at the end of the loop. The REPEAT loop is executed
once and repeated continuously until the condition is fulfilled.
Syntax
REPEAT
...
UNTIL <significance>
Meaning
REPEAT
UNTIL
<condition>
Example
Program code
...
REPEAT
...
UNTIL ...
...
1.12.6
Program example with nested check structures
Program code
LOOP
IF NOT $P_SEARCH
Job Planning
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
:
Initiates the program loop.
:
Marks the end of the loop and results in a return jump to the beginning
of the loop.
:
The condition that must be fulfilled so that the REPEAT loop is no longer
executed.
G1 G90 X0 Z10 F1000
WHILE $AA_IM[X] <= 100
G1 G91 X10 F500
Z–5 F100
Z5
Comment
; Call the REPEAT loop.
; Check whether the condition is fulfilled.
Comment
; IF no block search
; WHILE (setpoint X axis <= 100)
; Drilling pattern
Flexible NC programming
1.12 Check structures
115