K1: Mode group, channel, program operation, reset response
9.8 Block search Type 5 SERUPRO
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
539
Systems with tool management and auxiliary spindle are not supported by SERUPRO!
Example
Tool change subroutine
ASUB for calling the tool change routine after block search type 5
PROC L6
;
Tool change routine
N500 DEF INT TNR_AKTUELL
;
Variable for active T number
N510 DEF INT TNR_VORWAHL
;
Variable for preselected T number
;
Determine current tool
N520 STOPRE
;
In program testing
N530 IF $P_ISTEST
;
from the program context
N540 TNR_AKTUELL = $P_TOOLNO
;
the "current" tool is read.
N550 ELSE
;
Otherwise, the tool of the spindle
is read out.
N560 TNR_AKTUELL = $TC_MPP6[9998,1]
;
Read tool T number on the spindle
N570 ENDIF
N580 GETSELT(TNR_VORWAHL)
;
Read T number of preselected tool
of the master spindle. Execute tool
change only if tool not yet
current.
N590 IF TNR_AKTUELL <> TNR_VORWAHL
;
Approach tool change position
N600 G0 G40 G60 G90 SUPA X450 Y300 Z300 D0
N610 M206
;
Execute tool change
N620 ENDIF
N630 M17
PROC ASUPWZV2
N1000 DEF INT TNR_SPINDEL
;
Variable for active T number
N1010 DEF INT TNR_VORWAHL
;
Variable for preselected T number
N1020 DEF INT TNR_SUCHLAUF
;
Variable for T number determined in
block search
N1030 TNR_SPINDEL = $TC_MPP6[9998,1]
;
Read tool T number on the spindle
N1040 TNR_SUCHLAUF = $P_TOOLNO
;
read T number determined by search
run, i.e., that tool determines the
current tool offset.
N1050 GETSELT(TNR_VORWAHL)
;
Read T number of preselected tool
N1060 IF TNR_SPINDEL ==TNR_SUCHLAUF GOTOF
ASUP_ENDE1
;
N1070 T = $TC_TP2[TNR_SUCHLAUF]
;
T selection by tool name
N1080 L6
;
Call tool change routine
;