// ---------------------------------------- // // 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. // ---------------------------------------- ////////////////////////////////// // // Code Generator for G&L lathes using // Fanuc 10T-F control // created 9/26/01 by Donald Gardner // //////////////////////////// // @DECLARE #DEC #THREAD// PULLS THREAD PITCH FROM .JOF FILE #STR #part #STR #tooldes // @START #EVAL(#part=JOS(prt_desc)) #EVAL(#tooldes=JOS(st_desc)) ( #part #FILE ) #ONBLK #MOV #DCOMP #ABSI G70 T0000 M06 #MOV X8.75 Z15.0 M01 #EVAL(#U8=#TOOL) #IF(#U8>30)<#EVAL(#U8=#U8-10)> #EVAL(#V9=#FEED) #EVAL(#V1=#SPEED) //#EVAL(#U9=0) #IF(#V1<=250)<#EVAL(#S9=M40)> #IF(#V1>250)<#EVAL(#S9=M41)> #IFSTR(#tooldes<>)<(#tooldes)>#ELSE<( #TDESC )> #IFSTR(#TLCMT<>)<#CALL(CMT)> T#TOOL#FMT(#U8,F2.0) M06 #S9 #SPMODE S#SPEED #FDMODE F#FEED #SPNDL #MOV M08 #IF(#OPTYPE=203)<#CALL(PECK)> //#NEXTPT // // @CMT #IFSTR(#TLCMT<>#tooldes)<( #TLCMT )> // @TOOLCHG #EVAL(#tooldes=JOS(st_desc)) T0000 M06 (TIME FOR LAST TOOL: #TLTIME ) #DCOMP #MOV X8.75 Z15.0 #SPOFF M01 G92 S900 //#EVAL(#U1=#XSET) #EVAL(#V1=#SPEED) #EVAL(#U8=#TOOL) //#EVAL(#U9=0) #IF(#U8>30)<#EVAL(#U8=#U8-10)> #IF(#V1<=250)<#EVAL(#S9=M40)> #IF(#V1>250)<#EVAL(#S9=M41)> #IFSTR(#tooldes<>)<(#tooldes)>#ELSE<( #TDESC )> #IFSTR(#TLCMT<>)<#CALL(CMT)> T#TOOL#FMT(#U8,F2.0) M06 #S9 #SPMODE S#SPEED #FDMODE F#FEED #SPNDL #MOV M08 #EVAL(#V9=#FEED) #IF(#OPTYPE=203)<#CALL(PECK)> // @PECK #EVAL(#V19=#TLDIA) #IF(#V19>1.0)<#EVAL(#PECK=0.3)> #IF(#V19<1.0)<#EVAL(#PECK=#V19/4)> // @END T0000 M06 G55 #MOV X8.75 Z15.0 M09 M05 M30 #OFFBLK% ( #FILE #DATE ) ( TIME: #CYTIME ) // @STPROF #RESET(#FXD) < #MOV X#XPOS>< Z#ZPOS> // @RAP <#MOV>< X#XPOS>< Z#ZPOS> // @LINE #IF(#FEED<>#V9)<< #MOV>< X#XPOS>< Z#ZPOS>< F#FEED>< #FDMODE>> #ELSE<< #MOV>< X#XPOS>< Z#ZPOS>< #FDMODE>> #EVAL(#V9=#FEED) // @ARC #MOV X#XPOS Z#ZPOS I#XCTR K#ZCTR // @FXD1 G33< X#XPOS> Z#ZPASS F#FTHRD // @FXD4 // #EVAL(#THREAD=tl(pitch)) G83 Z#ZPASS R#ZPOS F#FEED // ///////////////////////////