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