Siemens SINUMERIK 828D Programming Manual page 100

Hide thumbs Also See for SINUMERIK 828D:
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
100
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, 07/2010, 6FC5398-2BP40-0BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents