Flexible NC programming
1.12 Check structures
Job planning
104 Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
Example
Program code Comments
...
WHILE $AA_IW[DRILL_AXIS] > -10 ; Call the WHILE loop under the following
ondition: The actual WCS setpoint for the
drilling axis must be greater than -10.
G1 G91 F250 AX[DRILL_AXIS] = -1
ENDWHILE
...
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>
Significance
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 executed.
Example
Program code Comments
...
REPEAT ; Call the REPEAT loop.
...
UNTIL ... ; Check whether the condition is fulfilled.
...