Continuous Program Loop (Loop, Endloop) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

Meaning
IF:
ELSE:
ENDIF:
<condition>:
Example: Tool change subprogram
Program code
PROC L6
N500 DEF INT TNR_AKTUELL
N510 DEF INT TNR_VORWAHL
N520 STOPRE
N530 IF $P_ISTEST
N540
N550 ELSE
N560
N570 ENDIF
N580 GETSELT(TNR_VORWAHL)
N590 IF TNR_AKTUELL <> TNR_VORWAHL
N600
N610 M206
N620 ENDIF
N630 M17
3.1.7.2

Continuous program loop (LOOP, ENDLOOP)

Endless loops are used in endless programs. At the end of the loop, there is always a branch
back to the beginning.
Syntax
LOOP
...
ENDLOOP
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
Introduces the conditional statement or branch.
Introduces the alternative program block.
Marks the end of the conditional statement or branch.
Logical expression that is evaluated as TRUE or FALSE.
TNR_AKTUELL = $P_TOOLNO
TNR_AKTUELL = $TC_MPP6[9998,1]
G0 G40 G60 G90 SUPA X450 Y300 Z300 D0
Work preparation
3.1 Flexible NC programming
Comment
Tool change routine
Variable for active T number
Variable for preselected T number
Determine current tool
In the program test mode ...
... the "current" tool is read
from the program context.
Otherwise ...
... the tool of the spindle is
read-out.
Read the T number of the pre-se-
lected tool in the spindle.
If the pre-selected tool is
still not the current tool,
then ...
... Approach tool change posi-
tion ...
... and perform a tool change.
477

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents