Siemens Sinumerik 840D sl Programming Manual page 108

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

Advertisement

Flexible NC programming
1.12 Check structures
Significance
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 TNR_AKTUELL = $P_TOOLNO
N550 ELSE
N560 TNR_AKTUELL = $TC_MPP6[9998,1]
N570 ENDIF
N580 GETSELT(TNR_VORWAHL)
N590 IF TNR_AKTUELL <> TNR_VORWAHL
N600 G0 G40 G60 G90 SUPA X450 Y300 Z300 D0
N610 M206
N620 ENDIF
N630 M17
108
Introduces the IF loop.
Introduces the alternative program block.
Marks the end of the IF loop and results in a return jump to the
beginning of the loop.
Condition that determines which program block is executed.
Comments
; Tool change routine
; Variable for active T number
; Variable for pre-selected 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-
selected tool in the spindle.
; If the pre-selected tool is
still not the current tool,
then ...
; ... Approach tool change
position ...
; ... and execute a tool change.
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