Meaning
WHILE: Initiates the program loop.
ENDWHILE: Marks the end of the loop and results in a return jump to the beginning of the loop.
<condition>: The condition must be fulfilled so that the WHILE loop is executed.
Example
Program code Comment
...
WHILE $AA_IW[DRILL_AXIS] > -10 ; Call the WHILE loop under the following
condition: The actual WCS setpoint for the
drilling axis must be greater than -10.
G1 G91 F250 AX[DRILL_AXIS] = -1
ENDWHILE
...
3.1.7.5 Program loop with condition at the end of the loop (REPEAT, UNTIL)
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: Initiates the program loop.
UNTIL: Marks the end of the loop and results in a return jump to the beginning of the loop.
<condition>: The condition that must be fulfilled so that the REPEAT loop is no longer exe‐
cuted.
Example
Program code Comment
...
REPEAT ; Call the REPEAT loop.
...
UNTIL ... ; Check whether the condition is fulfilled.
...
Work preparation
3.1 Flexible NC programming
NC programming
480 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0