// ---------------------------------------- // // 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 07/07/90 Machine: Mazak M-4 Turning Center with Fanuc 2000C Control @START % #IF(#TOOL>4)<#EVAL(#U3=#TOOL+16)> #IF(#TOOL>4)<#EVAL(#U4=#TOOL+6)> #EVAL(#U5=#TOOL) #ONBLK G50 X#XSET Z#ZSET #MOV T#IF(#TOOL>4)<#FMT(#U3,L2.0)>#ELSE<#TOOL>#EXLN #IF(#TOOL>4)<#FMT(#U4,L2.0)>#ELSE<#TOOL> M08 #IF(#SPEED>450)< S05 #SPNDL G04 S#TABLE(SPEEDS,#SPEED) U#DWELL> #ELSE< S#TABLE(SPEEDS,#SPEED) #SPNDL> #EVAL(#V7=#XSET) #EVAL(#V9=#ZSET) #NEXTPT @TOOLCHG #MOV X#V7 Z#V9 M09 T#IF(#U5>4)<#FMT(#U3,L2.0)00>#ELSE<#FMT(#U5,L2.0)00> #OFFBLK #IF(#TOOL>4)<#EVAL(#U3=#TOOL+16)> #IF(#TOOL>4)<#EVAL(#U4=#TOOL+6)> #EVAL(#U5=#TOOL) #ONBLK G50 X#XSET Z#ZSET #EVAL(#U1=INT(#TLTIME)) #EVAL(#U2=#TLTIME-#U1) #EVAL(#U0=#U2*60) #OFFBLK(TOOL #FMT(#LTOOL,T2.0) EST.TIME:#EXLN #IF(#U1>0)< #FMT(#U1,T3.0) MIN.> #FMT(#U0,T2.0) SEC.) #ONBLK #MOV T#IF(#TOOL>4)<#FMT(#U3,L2.0)>#ELSE<#TOOL>#EXLN #IF(#TOOL>4)<#FMT(#U4,L2.0)>#ELSE<#TOOL> M08 #IF(#SPEED>450)< S05 #SPNDL G04 S#TABLE(SPEEDS,#SPEED) U#DWELL> #ELSE< S#TABLE(SPEEDS,#SPEED) #SPNDL> #EVAL(#V7=#XSET) #EVAL(#V9=#ZSET) #NEXTPT @END < #MOV> X#XSET Z#ZSET #EVAL(#U1=INT(#TLTIME)) #EVAL(#U2=#TLTIME-#U1) #EVAL(#U0=#U2*60) #OFFBLK(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) (TOTAL EST.TIME:#EXLN #IF(#U1>0)< #FMT(#U1,T3.0) MIN.> #FMT(#U0,T2.0) SEC.)#ONBLK T#IF(#U5>4)<#FMT(#U3,L2.0)00>#ELSE<#FMT(#U5,L2.0)00> M05 M30 #OFFBLK% @STPROF #RESET(#FXD) < #MOV>#IF(ABS(#XPOS)<1)< X#FMT(#XPOS,F0.4)>< X#XPOS>#EXLN #IF(ABS(#ZPOS)<1)< Z#FMT(#ZPOS,F0.4)>< Z#ZPOS>< S#TABLE(SPEEDS,#SPEED)> @RAP #RESET(#FXD) < #MOV>#IF(ABS(#XPOS)<1)< X#FMT(#XPOS,F0.4)>< X#XPOS>#EXLN #IF(ABS(#ZPOS)<1)< Z#FMT(#ZPOS,F0.4)>< Z#ZPOS>< S#TABLE(SPEEDS,#SPEED)> @LINE #RESET(#FXD) < #MOV>#IF(ABS(#XPOS)<1)< X#FMT(#XPOS,F0.4)>< X#XPOS>#EXLN #IF(ABS(#ZPOS)<1)< Z#FMT(#ZPOS,F0.4)>< Z#ZPOS>< F#FMT(#FEED,F0.4)>#EXLN < S#TABLE(SPEEDS,#SPEED)> @ARC #RESET(#FXD) < #MOV>#IF(ABS(#XPOS)<1)< X#FMT(#XPOS,F0.4)>< X#XPOS>#EXLN #IF(ABS(#ZPOS)<1)< Z#FMT(#ZPOS,F0.4)>< Z#ZPOS>#EXLN #IF(ABS(#XCTR)<1)< I#FMT(#XCTR,F0.4)>< I#XCTR>#EXLN #IF(ABS(#ZCTR)<1)< K#FMT(#ZCTR,F0.4)>< K#ZCTR>#EXLN < F#FMT(#FEED,F0.4)>< S#TABLE(SPEEDS,#SPEED)> @FXD1 < #FXD>< X#XPASS>< Z#ZPASS>< I#XOV>< E#FTHRD> @FXD2 < #FXD>< X#XPASS>< Z#ZPASS>< F#FEED> @FXD3 < #FXD>< X#XPASS>< Z#ZPASS>< F#FEED> @FXD4 G1< Z#ZPASS F#FEED> M5 #IF(#SPNDL=1)<#EVAL(#SPNDL=2)>#ELSE<#EVAL(#SPNDL=1)> #SPNDL G1 Z#ZPOS< F#FEED> @FXD5 #EVAL(#V8=#TLDIA/2) #EVAL(#C0=1) < #C0>< X#XPOS>< Z#ZPASS>< K#V8>< F#FEED>< E.02> @DWELL G4 U#DWELL#EVAL(#TIME=#DWELL/60) @SPEEDS 73,01 92,02 115,03 145,04 180,05 225,06 280,07 360,08 450,09 570,10 700,11 900,12 1100,13 1400,14 1750,15 2200,16 @