@COMMENTS ---------------------------------------- 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. ---------------------------------------- Machine: Mazak Horizontal Mill Control: Mazak CAM M2 Control with EIA/ISO Programming Capabilities @ @DECLARE //#OUTCND // outputs conditional status //#OUTSEC // outputs @section names //#OUTREF // outputs processing errors //#OUTRPT // outputs an error report file @ @VARSET #EVAL(#XHOME=0) #EVAL(#YHOME=0) #EVAL(#ZHOME=0) #IFSTR(#WKPLN=XY_PLANE)<#EVAL(#V0=54)> #ELSE<#EVAL(#V0=55)> @ @START #CALL(VARSET) % #ONBLK G80#ABSIG40G49 G28G91X#XHOMEY#YHOMEZ#ZHOME T#TOOL M06T00 M00 T#NTOOL #SAFBLK(T#TOOL #TDESC) G28G91X#XHOMEY#YHOMEZ#ZHOME G#FMT(#V0,T2.0)#ABSI<#CYCLE>#MOV#EXLN #SPNDL @ @TOOLCHG #CALL(VARSET) M09 G28G91#MOV#CYCLEX#XHOMEY#YHOMEZ#ZHOME #RESET(#XPOS,#YPOS,#ZPOS) M01 M06T#LTOOL #SAFBLK(T#TOOL #TDESC) G28G91#MOV#CYCLEX#XHOMEY#YHOMEZ#ZHOME G#FMT(#V0,T2.0)#ABSI<#CYCLE>#MOV#EXLN #SPNDL @ @END #CALL(VARSET) <#CYCLE>M09 G28G91#MOV<#CYCLE>X#XHOMEY#YHOMEZ#ZHOME M01 T00 M06T00 (TOTAL TIME: #CYTIME) M30 #OFFBLK % @ @CYCLE -1,G80 0,G80 @ @STPROF <#ABSI><#CYCLE><#MOV>#EXLN <#SPNDL> @ @ENDPROF <<#MOV>Z#ZPOS> @ @RAP <#ABSI><#CYCLE>#MOV#EXLN <#SPNDL> @ @LINE <#MOV><#DCOMP#EXCD#DOFF>#EXLN <#SPNDL> @ @ARC #IF(#TANG=360,OR#TANG=-360)#EXLN <<#PLANE><#MOV>X#XPOSY#YPOSI#XCTRJ#YCTR> #ELSE<<#PLANE><#MOV>X#XPOSY#YPOSR#ARAD> @ @XZARC #IF(#TANG=360,OR#TANG=-360)#EXLN <<#PLANE><#MOV>I#XCTRK#ZCTR> #ELSE<<#PLANE><#MOV>R#ARAD> @ @YZARC #IF(#TANG=360,OR#TANG=-360)#EXLN <<#PLANE><#MOV>J#YCTRK#ZCTR> #ELSE<<#PLANE><#MOV>R#ARAD> @ @HELIX <#PLANE>#MOVZ#ZPOSI#XCTRJ#YCTR @ @XZHELIX <#PLANE>#MOVY#YPOSI#XCTRK#ZCTR @ @YZHELIX <#PLANE>#MOVX#XPOSJ#YCTRK#ZCTR @ @ZCLRMV <#ABSI><<#MOV>Z#ZPOS> @ @ZCHKMV <#CYCLE><<#MOV>Z#ZPOS> @ @ZDPTHMV <<#MOV>Z#ZPOS> @ @OP_SPEC #CALL(OP_DRL) @OP_REAM #CALL(OP_DRL) @OP_DRL <#ABSI><#RTNLVL><#CYCLE>#EXLN M08 @@CYCLE 0,G81 @ @OP_SPDRL #CALL(OP_CSINK) @OP_CDRL #CALL(OP_CSINK) @OP_CBORE #CALL(OP_CSINK) @OP_SPFACE #CALL(OP_CSINK) @OP_CSINK <#ABSI><#RTNLVL><#CYCLE>#EXLN M08 @@CYCLE 0,G82 @ @OP_TAP <#ABSI><#RTNLVL><#CYCLE>#EXLN M08 @@CYCLE 0,G84 @ @OP_BORE <#ABSI><#RTNLVL><#CYCLE>#EXLN M08 @@CYCLE 0,G86 @ @OP_PDRL #EVAL(#V1=jos(pekdpth2)) <#ABSI><#RTNLVL><#CYCLE>#EXLN M08 @@CYCLE 0,G83 @ @TPINDX #IFSTR(#WKPLN=XY_PLANE)<#EVAL(#V0=54)> #ELSE<#EVAL(#V0=55)> @ @DWELL G04P#DWELL#EVAL(#TIME=#DWELL/60) @