// ---------------------------------------- // // 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 V5.0 Code Generator Machine: Cincinnati Milacron Cinturn Turning Center with Cincinnati Milacron Acramatic 900TC CNC Control @ @DECLARE //#OUTCND // outputs conditional status //#OUTSEC // outputs @section names //#OUTREF // outputs processing errors //#OUTRPT // outputs an error report file @ @START #EVAL(#S1=jos(st_desc)) #IF(#SPEED<500)<#EVAL(#C1=0)> #ELSE<#EVAL(#C1=1)> #EVAL(#XPOFF=#XSET) #EVAL(#ZPOFF=#ZSET) #EVAL(#V3=#XSET) #EVAL(#V4=#ZSET) % #EVAL(#BLK=1) N#BLK (PGM,I#FILE) #EVAL(#BLK=#BLK+1) O#BLK G90 #EVAL(#BLK=#BLK+1) #ONBLK G70 #SPMODE S#SPEED #C1 #IF(#U3=1)<#CALL(TIN)> G94 F2000 #MOV X#XPOS Z#ZPOS T#TOFF M06 (MSG, TOOL #FMT(#TOOL,T2.0) #S1) #NEXTPT X#XPOS Z#ZPOS #SPNDL #IF(#FDMODE=1)< #FDMODE> @ @TOOLCHG #EVAL(#S1=jos(st_desc)) #IF(#SPEED<500)<#EVAL(#C1=0)> #ELSE<#EVAL(#C1=1)> #EVAL(#V5=#XPOS-#V3) #EVAL(#V6=#ZPOS-#V4) #EVAL(#XPOFF=#XSET) #EVAL(#ZPOFF=#ZSET) #EVAL(#V3=#XSET) #EVAL(#V4=#ZSET) G00 X#V5 Z#V6 #EVAL(#U1=INT(#TLTIME)) #EVAL(#U2=#TLTIME-#U1) #EVAL(#U0=#U2*60) (MSG, TOOL #FMT(#LTOOL,T2.0) EST. TIME:#EXLN #IF(#U1>0)< #FMT(#U1,T3.0) MIN.> #FMT(#U0,T2.0) SEC.) #OFFBLK #EVAL(#BLK=#BLK+1) O#BLK G90 #EVAL(#BLK=#BLK+1) #ONBLK #SPMODE S#SPEED #C1 #IF(#U3=1)<#CALL(TIN)> G94 F2000 #MOV X#V5 Z#V6 (MSG, TOOL #FMT(#TOOL,T2.0) #S1) T#TOFF M06 #NEXTPT X#XPOS Z#ZPOS #SPNDL #IF(#FDMODE=1)< #FDMODE> @ @END < #MOV> X#XHOME Z#ZHOME T#LTOOL M06 #EVAL(#U1=INT(#TLTIME)) #EVAL(#U2=#TLTIME-#U1) #EVAL(#U0=#U2*60) (MSG, TOOL #FMT(#LTOOL,T2.0) EST. TIME:#EXLN #IF(#U1>0)< #FMT(#U1,T3.0) MIN.> #FMT(#U0,T2.0) SEC.) #EVAL(#U1=INT(#CYTIME)) #EVAL(#U2=#CYTIME-#U1) #EVAL(#U0=#U2*60) (MSG, TOTAL EST. TIME:#EXLN #IF(#U1>0)< #FMT(#U1,T3.0) MIN.> #FMT(#U0,T2.0) SEC.) M30 #OFFBLK% @ @STPROF #RESET(#FXD) < #MOV>< X#XPOS>< Z#ZPOS> @ @RAP #RESET(#FXD) < #MOV>< X#XPOS>< Z#ZPOS> @ @LINE #RESET(#FXD) #IF(#U4=1)< G21< X#XPOS>< Z#ZPOS>< F#FEED>>#EXLN #ELSE<< #MOV>< X#XPOS>< Z#ZPOS>< F#FEED>> @ @ARC #RESET(#FXD) #IF(#U4=1,#AND#MOV=2)< G22< X#XPOS>< Z#ZPOS> I#XCTR K#ZCTR< F#FEED>> #IF(#U4=1,#AND#MOV=3)< G23< X#XPOS>< Z#ZPOS> I#XCTR K#ZCTR< F#FEED>> #IF(#U4=0)<< #MOV>< X#XPOS>< Z#ZPOS> I#XCTR K#ZCTR< F#FEED>> @ @DWELLF G04 F#FMT(#DWELL,F2.2) @ @DWELLS G04 S#FMT(#DWELL,F4.0) @ @OP_THD G33 Z#ZPASS K#FTHRD @ @OP_TAP G33 Z#ZPASS K#FTHRD #IF(#SPNDL=1)< G00 M14>#ELSE< G00 M13> G33 Z#ZPOS K#FTHRD @ @STOP M00 @ @OPSTOP M01 @ @PCIN M82 @ @PCOUT M83 @ @TIN M05 M85 M86 #EVAL(#U3=0) @ @TOUT M87 @ @INPO #EVAL(#U4=1) @ @NINPO #EVAL(#U4=0) @