Count Loop (For - Siemens SINUMERIK 840D sl Programming Manual

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.1 Flexible NC programming
Meaning
LOOP:
ENDLOOP:
Example
Program code
...
LOOP
MSG ("no tool cutting edge active")
M0
STOPRE
ENDLOOP
...
3.1.7.3
Count loop (FOR ... TO ..., ENDFOR)
The count loop is used if an operation must be repeated with a fixed number of runs.
Syntax
FOR <variable> = <initial value> TO <end value>
...
ENDFOR
Meaning
FOR:
ENDFOR:
<variable>:
<initial value>: Initial value of the count
<full-scale
value>:
478
Initiates the endless loop.
Marks the end of the loop and results in a return jump to the beginning of the loop.
Initiates the count loop.
Marks the end of the loop and results in a return jump to the beginning of the loop,
as long as the end value of the count has still not been reached.
Count variable, which is incremented from the initial to the end value and is
increased by the value "1" at each run.
Type
INT or REAL
Note:
The REAL type is used if R parameters are programmed for a count
loop, for example. If the count variable is of the REAL type, its value is
rounded to an integer.
Condition: The start value must be lower than the end value.
End value of the count
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents