In addition, machine data setting MD20310 $MC_TOOL_MANAGEMENT_MASK Bit 11 = 1 is
required because the ASUB may have to repeat a T selection.
Systems with tool management and auxiliary spindle are not supported by SERUPRO!
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
ASUB for calling the tool change routine after type 5 block search
Program code
PROC ASUPWZV2
N1000 DEF INT TNR_SPINDEL
N1010 DEF INT TNR_VORWAHL
N1020 DEF INT TNR_SUCHLAUF
N1030 TNR_SPINDEL = $TC_MPP6[9998,1]
N1040 TNR_SUCHLAUF = $P_TOOLNO
N1050 GETSELT(TNR_VORWAHL)
N1060 IF TNR_SPINDEL ==TNR_SUCHLAUF GOTOF AS-
UP_ENDE1
N1070 T = $TC_TP2[TNR_SUCHLAUF]
Basic Functions
Function Manual, 01/2015, 6FC5397-0BP40-5BA2
K1: Mode group, channel, program operation, reset response
Comment
; Tool change routine
; Variable for active T number
; Variable for preselected T number
; Determine current tool
; In program testing
; From the program context
; The "current" tool is read
; Otherwise, the tool of the spindle is read out.
; Read tool T number on the spindle
; Read T number of the preselected tool of the master spindle
; Execute tool change only if tool is not yet current
; Approach tool change point
; Execute tool change
Comment
; Variable for active T number
; Variable for preselected T number
; Variable for T number determined in block search
; Read tool T number on the spindle
; Read T number determined by search,
i.e. this tool determines the
current tool offset
; Read T number of preselected tool
; T selection by tool name
9.8 Block search Type 5 (SERUPRO)
509