Siemens SINUMERIK 840D sl Programming Manual page 113

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

Advertisement

Meaning
FOR
ENDFOR
<variable>
<initial value>
<full-scale value>
Examples
Example 1: INTEGER variable or R parameter as count variable
INTEGER variable as count variable:
Program code
DEF INT iVARIABLE1
R10=R12-R20*R1 R11=6
FOR iVARIABLE1 = R10 TO R11
R20=R21*R22+R33
ENDFOR
M30
R parameter as count variable:
Program code
R11=6
FOR R10=R12-R20*R1 TO R11
R20=R21*R22+R33
ENDFOR
M30
Job Planning
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
:
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
:
Initial value of the count
Condition: The start value must be lower than the end value.
: End value of the count
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.
Comment
; Count variable = INTEGER variable
Comment
; Count variable = R parameter (real variable)
Flexible NC programming
1.12 Check structures
113

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents