// ---------------------------------------- // // The following SmartCAM code generator has been // created to generate NC code for the respective // machine and control combinations listed below. // // Due to differences in programming styles, // controller versions, and optional equipment, // SmartCAMcnc DOES NOT and CANNOT guarantee // that the NC code generated is correct for any // specific machine. Some modification to the code // generator to match your setup and output // requirements is likely necessary. // // Modifications to code generators do not TYPICALLY // require a significant amount of time. SmartCAM // customers with active SMA contracts are entitled // to support for their code generators from the // SmartCAMcnc Support Group. To contact them for // support, please send an email to: // Support@SmartCAMcnc.com. If you would like // information on purchasing SMA for your SmartCAM // products, please contact: Sales@SmartCAMcnc.com // // DISCLAIMER: It is the responsibility of the end // user to confirm and verify that the NC code // created by any code generator is accurate and // will not cause a machine malfunction which // could result in stock, tooling, machine, and/or // personal injury. // // SmartCAMcnc assumes no responsibility or // liability for any damage caused or alleged to // have been caused by the use of any of the code // generators it provides. // ---------------------------------------- @COMMENTS Haas HL-6 TC - Fanuc style code @ @DECLARE //#OUTCNDoutputs conditional status //#OUTSECoutputs @section names //#OUTREFoutputs processing errors //#OUTRPToutputs an error report file #STR #StepDesc #INT #MaxRPM @ @VARSET #EVAL(#MaxRPM=1000)// change RPM as required for your machine @ @START % O0000 M01 G50 S#MaxRPM T#TOFF #IF(#SPEED=0)<#EXIT> G00 Z#ZPOS < #FDMODE>< #SPMODE>< S#SPEED>< #SPNDL> /M08 #MOV #DCOMP X#XPOS Z#ZPOS F#FEED #NEXTPT @ @STEPCHG #EVAL(#StepDesc=JOS(ST_DESC)) (T#TOFF #StepDesc) << #SPMODE>< S#SPEED>< #SPNDL>< F#FEED>> @ @TOOLCHG #EVAL(#StepDesc=JOS(ST_DESC)) (T#TOFF #StepDesc) G97 M09 #MOV X#XPOS Z#ZPOS G28 X#XPOS M01 G00 T#TOFF (#TDESC ) G50 S#MaxRPM #SPMODE S#SPEED #SPNDL F#FEED #IF(#SPEED=0)<#EXIT> Z#ZPOS < #FDMODE> X#XPOS /M08 #RESET(#XPOS) @ @END M09 M05 #MOV< #DCOMP> G28 X#XPOS M30 % @ @STPROF < #MOV>< #DCOMP>< X#XPOS>< Z#ZPOS>< F#FEED> @ @ENDPROF < #MOV>< #DCOMP> @ @RAP #IF(#SPEED=0)<#CALL(BARSTOP)> < #MOV>< #DCOMP>< X#XPOS>< Z#ZPOS> @ @LINE < #MOV>< #DCOMP>< X#XPOS>< Z#ZPOS>< F#FEED> @ @ARC < #MOV>< #DCOMP>< X#XPOS>< Z#ZPOS>< I#XCTR>< K#ZCTR>< F#FEED> @ @OP_THD < #FXD> X#XPASS Z#ZPASS< I#XOV> D#V2 K#V1 E#FTHRD A60 @ @OP_TURN < G00< X#XPOS> Z#ZPOS> < #FXD>< X#XPASS>< Z#ZPASS>< F#FEED> @ @OP_FACE < G00 X#XPOS > < #FXD>< X#XPASS>< Z#ZPASS>< F#FEED> @ @OP_TAP < G84 R0.1 Z#ZPASS F#FEED> G80 @ @OP_PDRL #IF(#CYCLE=0)< G83 I#IPECK Q#PECK Z#ZPASS R#ZST F#FEED> #IF(#CYCLE=1)< G74 Z#ZPASS K#PECK F#FEED> G80 (CANCEL CYCLE) @ @DWELL G04 U#DWELL#EVAL(#TIME=#DWELL/60) @ @BARSTOP #MOV Z#ZPOS X#XPOS M00 (BAR STOP) @ @TAILGET M21// Tailstock advance @ @TAILRETURN M22// Tailstock return @