// ---------------------------------------- // // 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. // ---------------------------------------- // ----------------------------------------------------------- // // !! P L E A S E R E A D T H I S !! // // This is a sample code generator built to // generate code for the Machine/Control combination // named below. Due to differences in programming // style, controller versions, and optional equipment // McKenzie River Software can not guarantee that the // code generated is correct for your machine. // // It is YOUR responsibility to verify that the code // created by this Code Generator will not cause a // machine malfunction which could result in scrap // and/or personal injury. // // McKenzie River Software assumes no responsibility // or liability for any damage caused or alleged to be // caused by the use of this Code Generator. // // ----------------------------------------------------------- // A generic Yasnak (MX2) Code Generator template file that SHOULD work with most vertical, // 3 axis CNC milling machines with this control. This template has // no provisions for 4th or 5th axis support. @DECLARE //#OUTCND //outputs conditional status //#OUTSEC //outputs @section names //#OUTREF //outputs processing errors //#OUTRPT //outputs an error report file @ @START % O#FILE #EVAL(#U9=#TOOL*100) ( **** TOOL ##TOOL: #TDESC **** ) N#U9 G00 G49 G53 Y0 Z0 T#TOOL M06 #NEXTPT G43 X#XPOS Y#YPOS Z#ZPOS S#SPEED #SPNDL H#LOFF T#NTOOL @ @TOOLCHG < #FXD> M09 G00 G49 G53 Y0 Z0 M29 #EVAL(#U9=#TOOL*100) ( **** TOOL ##TOOL: #TDESC **** ) N#U9 G00 G49 G53 Y0 Z0 T#TOOL M06 #NEXTPT G43 X#XPOS Y#YPOS Z#ZPOS S#SPEED #SPNDL H#LOFF T#NTOOL @ @END < #FXD> M09 G00 G49 G53 Y0 Z0 M06 M98 P0001 M30 % @ @SUBDEF % O#SNAME #EVAL(#ABSI=1) #ABSI @ENDDEF #EVAL(#ABSI=0) < #ABSI> M99 % @ @GOSUB M98 P#SNAME L#SREPT @ @STPROF < #ABSI>< #FXD>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS> @ @ENDPROF < #ABSI><< #MOV> Z#ZPOS> < #DCOMP> @ @RAP < #ABSI>< #FXD>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS> @ @LINE < #ABSI>< #DCOMP#EXC D#DOFF>< #PLANE>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS>< F#FEED> @ @ARC < #ABSI>< #PLANE>< #MOV>< X#XPOS>< Y#YPOS> I#XCTR J#YCTR< F#FEED> @ @XZARC < #ABSI>< #PLANE>< #MOV>< X#XPOS>< Z#ZPOS> I#XCTR K#ZCTR< F#FEED> @ @YZARC < #ABSI>< #PLANE>< #MOV>< Y#YPOS>< Z#ZPOS> J#YCTR K#ZCTR< F#FEED> @ @HELIX #EVAL(#ABSI=1) #EVAL(#U8=#ZPOS-#ZST) #EVAL(#U9=#U8/#INC) < #PLANE>< #ABSI>< #MOV>< X#XPOS>< Y#YPOS> Z#INC I#XCTR J#YCTR#EXLN L#U9< F#FEED> #EVAL(#ABSI=0) #UPDATE(#ZPOS) @ @XZHELIX < #PLANE>< #ABSI> #MOV< X#XPOS> Y#YPOS< Z#ZPOS> I#XCTR K#ZCTR< F#FEED> @ @YZHELIX < #PLANE>< #ABSI> #MOV X#XPOS< Y#YPOS>< Z#ZPOS> J#YCTR K#ZCTR< F#FEED> @ @ZCLRMV < #ABSI>< #FXD><< #MOV> Z#ZPOS> @ @ZCHKMV < #ABSI>< #FXD><< #MOV> Z#ZPOS> @ @ZDPTHMV < #ABSI><< #MOV> Z#ZPOS< F#FEED>> @ @FXD1 < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH R#ZCHK>< F#FEED> @ @FXD2 < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH R#ZCHK P#DWELL>< F#FEED> @ @FXD3 < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH R#ZCHK>< F#FEED> @ @FXD4 < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH R#ZCHK>< F#FEED> @FXD5 #EVAL(#PECK=2.5*#TLDIA) #EVAL(#V9=#TLDIA) #EVAL(#V8=.5*#TLDIA) < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH R#ZCHK I#PECK J#V8 K#V9>< F#FEED> @ @DWELL G04 P#DWELL#EVAL(#TIME=#DWELL/60) @