Program Loop With Condition At Start Of Loop (While, Endwhile) - Siemens Sinumerik 840D sl Programming Manual

Job planning
Hide thumbs Also See for Sinumerik 840D sl:
Table of Contents

Advertisement

Flexible NC programming
1.12 Check structures
1.12.4

Program loop with condition at start of loop (WHILE, ENDWHILE)

Function
For a WHILE loop, the condition is at the beginning of the loop. The WHILE loop is executed
as long as the condition is fulfilled.
Syntax
WHILE <condition>
...
ENDWHILE
Significance
WHILE:
ENDWHILE:
<condition>:
Example
Program code
...
WHILE $AA_IW[DRILL_AXIS] > -10
G1 G91 F250 AX[DRILL_AXIS] = -1
ENDWHILE
...
112
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.
Comments
; Call the WHILE loop under the following
condition: The actual WCS setpoint for the
drilling axis must be greater than -10.
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents