// ---------------------------------------- // // 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. // ---------------------------------------- @START #IF(#U0=1)<************************* START *********************************> #IFSTR(#WKPLN=XY_PLANE) <#EVAL(#WKPLN=E01)> #RESET(#C1,#FDMODE) #EVAL(#V9=#TLDIA*#PECK) % $#FILE #ONBLK G90 #FDMODE G00 Z000 W000 D00 E00 S0000 F150 M03 X000 #BDSTRY000 #SAFBLK T#TOOL M00 (TOOL T#TOOL, #TDESC) #ABSI #MOV X#XPOS Y#YPOS S#SPEED #SPNDL D#DOFF #WKPLN #RFEED #CALL(WAXIS) #IF(#C0)< W#V4>#ELSE< Z#V1> M08 #UPDATE(#V4,#V1) @TOOLCHG #IF(#U0=1)<************************* TOOLCHG *******************************> #EVAL(#V9=#TLDIA*#PECK) #EVAL(#V1=0) < #FXD> M09 G90 G00 Z000 W000 D00 E00 S0000 F150 M03 X000 #BDSTRY000 #SAFBLK T#TOOL M00 (TOOL T#TOOL, #TDESC)#EXLN #FMT(#TLTIME,D3.1) ** Min.(previous tool) #CALL(WAXIS) #RESET(#FDMODE,#C0,#C1,#V1,#V2,#V3,#V4,#V5,#V6,#V9) #ABSI #MOV X#XPOS Y#YPOS S#SPEED #SPNDL D#DOFF #WKPLN #RFEED #IF(#C0)< W#V4>#ELSE< Z#V1> M08 #UPDATE(#V4,#V1) @END #IF(#U0=1)<************************* END ***********************************> < #FXD> M09 G00 Z000 W000 D00 E00 S0000 F150 M05#EXLN #FMT(#TLTIME,D3.1) ** Min.(previous tool) X000 #BDSTRY000 M30 #OFFBLK% #FMT(#CYTIME,D3.1) ** Min.(total cycle) #FILE #DATE #SYSTIME @STPROF #IF(#U0=1)<************************* STPROF ********************************> #CALL(WAXIS) < #ABSI> < #FDMODE> #MOV< #DCOMP #EXC D#DOFF>< #MOV>< X#XPOS>< Y#YPOS>#EXLN < Z#V1>< W#V4> F150< #WKPLN> @ENDPROF #IF(#U0=1)<************************* ENDPROF *******************************> #CALL(WAXIS) < #FXD> < #MOV>< #DCOMP>< X#XPOS>< Y#YPOS>< Z#V1>< W#V4>< #RFEED> @RAP #IF(#U0=1)<************************* RAP ***********************************> #CALL(WAXIS) < #FXD> < #MOV>< #DCOMP #EXC D#DOFF>< X#XPOS>< Y#YPOS>< Z#V1>< W#V4>< #WKPLN>#EXLN < #RFEED> #RESET(#FEED,#V2,#V3,#V5,#V6,#V9) @LINE #IF(#U0=1)<************************* LINE **********************************> #CALL(WAXIS) < #ABSI> < #FDMODE> < #MOV>< #DCOMP #EXC D#DOFF>< #DCOMP>< X#XPOS>< Y#YPOS>#EXLN < Z#V1>< W#V4>< F#FEED> @ARC #IF(#U0=1)<************************* ARC ***********************************> < #ABSI> < #FDMODE> < #MOV>< #DCOMP #EXC D#DOFF>< #DCOMP>< X#XPOS>< Y#YPOS>#EXLN < I#XCTR>< J#YCTR>< F#FEED> @ZCLRMV #IF(#U0=1)<************************* ZCLRMV ********************************> #CALL(WAXIS) < #ABSI> < #MOV>< Z#V1>< W#V4> @ZCHKMV #IF(#U0=1)<************************* ZCHKMV ********************************> #CALL(WAXIS) < #ABSI> < #MOV>< Z#V1>< W#V4> @ZDPTHMV #IF(#U0=1)<************************* ZDPTHMV *******************************> #CALL(WAXIS) < #ABSI> < #FDMODE> < #MOV>< Z#V1>< W#V4>< F#FEED> @FXD1 #IF(#U0=1)<******** FXD1 ******************Drill= G81****> #CALL(WAXIS) < #ABSI> < #FDMODE> < #C1> < #FXD>< X#XPOS>< Y#YPOS>#EXLN #IF(#C0)<< W#V5>< R#V6>>#ELSE<< Z#V2>< R#V3>>< F#FEED>< #WKPLN> @FXD2 #IF(#U0=1)<********* FXD2 *****Spot drill w/dwell= G82****> #CALL(WAXIS) < #ABSI> < #FDMODE> < #C1> < #FXD>< X#XPOS>< Y#YPOS>#EXLN #IF(#C0)<< W#V5>< R#V6>>#ELSE<< Z#V2>< R#V3>>< K#DWELL>< F#FEED>< #WKPLN> #RESET(#DWELL) @FXD3 #IF(#U0=1)<********* FXD3 ****************Tapping= G84****> #CALL(WAXIS) < #ABSI> < #FDMODE> < #C1> < #FXD>< X#XPOS>< Y#YPOS>#EXLN #IF(#C0)<< W#V5>< R#V6>>#ELSE<< Z#V2>< R#V3>>< F#FEED>< #WKPLN> @FXD4 #IF(#U0=1)<********* FXD4 *****************Boring= G85****> #CALL(WAXIS) < #ABSI> < #FDMODE> < #C1> < #FXD>< X#XPOS>< Y#YPOS>< #C0 #V2>#EXLN #IF(#C0)<< W#V5>< R#V6>>#ELSE<< Z#V2>< R#V3>>< F#FEED>< #WKPLN> @FXD5 #IF(#U0=1)<********* FXD5 *******************Peck= G83*****> #CALL(WAXIS) < #ABSI> < #FDMODE> < #C1> < #FXD>< X#XPOS>< Y#YPOS>#EXLN #IF(#C0)<< W#V5>< R#V6>>#ELSE<< Z#V2>< R#V3>>< K#V9>< F#FEED>< #WKPLN> @DWELL #IF(#U0=1)<************************* DWELL *********************************> G04 K#DWELL @WAXIS #IF(#U0=1)<************************* WAXIS *********************************> #IF(#C0)<#EVAL(#V4=#V0-#V1+#ZPOS+#TLEN)>#ELSE<#EVAL(#V1=#V0+#ZPOS+#TLEN)> #IF(#C0)<#EVAL(#V5=#V0-#V1+#ZDPTH+#TLEN)>#ELSE<#EVAL(#V2=#V0+#ZDPTH+#TLEN)> #IF(#C0)<#EVAL(#V6=#V0-#V1+#ZCHK+#TLEN)>#ELSE<#EVAL(#V3=#V0+#ZCHK+#TLEN)> #EVAL(#C1=#C0) #IF(#U0=1)< (ZPOS=#ZPOS, TLEN=#TLEN)> #IF(#U0=1)< (ZDPTH=#ZDPTH, ZCHK=#ZCHK)> @M00 #IF(#U0=1)<************************* STOP *********************************> M00 G00 M03 @M01 #IF(#U0=1)<************************* OSTOP *********************************> M01 G00 M03 @STOPS #IF(#U0=1)<************************* STOPS *********************************> G00 S0000 M03 D00 E00 F150 M09 M00 (wait- for "stop" before indicating). G00 M03 @WW #EVAL(#C0=1) #IF(#U0=1)<********* WAXIS- SPINDLE TRAVEL**********************> @ZZ #EVAL(#C0=0) #IF(#U0=1)<********* ZAXIS- TABLE TRAVEL ***********************> @