文档库

最新最全的文档下载
当前位置:文档库 > 840D换刀用户循环程序

840D换刀用户循环程序

%_N_INI_SPF

;$PATH=/_N_CST_DIR

PROC INI SAVE DISPLOF

_TM[11]=$MN_USER_DATA_INT[0] ;the max number of tool magazine

_TM[0]=1 ;local pot number

_TM[1]=0 ;pot number of programming tool number _TM[3]=0 ;NC T number

_TM[4]=0 ;the first T number

_TM[5]=0 ;not program test

_TM[6]=0 ;T number in program test

_TM[10]=1 ;counter and process

_INI:

$TC_DP25[_TM[10],1]=_TM[10] ;INI Pot number

$TC_DP24[_TM[10],1]=0 ;the number of empty pot

_TM[10]=_TM[10]+1

_TM[11]=_TM[11]-1

IF _TM[11] > 0 GOTOB _INI

_TM[10]=0

M99 ;INI magazine counter in PLC

T0

M206 ;Active tool parameter

M17

%_N_MGZ_SPF

;$PATH=/_N_CST_DIR

PROC MGZ SAVE DISPLOF

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

; precondition:

; After INI, T number equal to pot number: Pot=1, T=T1

; - - - - - - - - - - - - - - - - - - - - - - - - -

; MD14510[0] - the max number of tool magazine

;

; MD14514[0] - the angle of spindle fixed stop

; MD14514[1] - the X position of changing tool

; MD14514[2] - the Y position of changing tool

; MD14514[3] - the Z position of changing tool

; MD14514[4] - the speed of going into position of changing tool

; - - - - - - - - - - - - - - - - - - - - - - - - -

; Parameter description:

; _TM[0]: Local pot number

; _TM[1]: pot number of programming tool number

; _TM[3]: NC T number

; _TM[5]: 1= not program test

; _TM[6]: T number in program test

; _ZSFR[10]: The difference of T number

; $C_T: programming T number

; $PTOOLNO: NC T number

; Tool Data:

; $TC_DP1[T number,1]: tool type

; $TC_DP3[T number,1]: tool length

免费下载Word文档免费下载: 840D换刀用户循环程序

(共5页)