// ---------------------------------------- // // 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 SmartCAM Code Generator: Prototrak A.G.E. Event Type code (not ANSI). Variable list: #U0 - PN storer. Can be set in Job Notes, otherwise it defaults to 1 #U5 - COMP code storage. Can't use #DCOMP because it gets turned off in @ENDPROF and the Prototrak needs it on here. #U9 - Profile element marker. 0=start of profile. 1=line end. 2=arc end. #V0 - X begin storer #V1 - Y begin storer #V2 - X end storer #V3 - Y end storer #V4 - X center storer #V5 - Y center storer #V7 - Feed storer #V10 - Z begin storer #V11 - Z end storer #V12 - Z center storer #V13 - Z clear storer #FZ - Plunge feed Revision history: 06-0111: Added this section. Attempted to track variable useage and add that here. Cleaned up sections with closing @'s. 06-0112: Added Z support. Made set sections for #CALLing and changed redundant code accordingly. @ @DECLARE #DEC #FZ //#OUTSEC @ @START % #IF(#U0=0)<#EVAL(#U0=1)> PN#U0 G20 #ONBLK #EVAL(#FZ=jos(feedupm3) @ @TOOLCHG (CHANGE TO TOOL NUMBER #TOOL) #EVAL(#FZ=jos(feedupm3)) @ @END #OFFBLK% @ @STPROF #EVAL(#U9=0) @ @ENDPROF #EVAL(#U2=0)#EVAL(#U4=0)#EVAL(#V8=0)#EVAL(#V9=0) #IF(#U9=1)< G10#U8 XB#V0A YB#V1A ZR#V13A ZB#V10A XE#V2A YE#V3A ZE#V11A TC#U5 F#V7 FZ#FZ D#TLDIA CR- T#TOOL> #IF(#U9=2)< G10#U8 XB#V0A YB#V1A ZR#V13A ZB#V10A XE#V2A YE#V3A ZE#V11A XC#V4A YC#V5A ZC#V12A TC#U5 F#V7 FZ#FZ#EXLN D#TLDIA CR- T#TOOL> //#EXIT @ @COMPSET // Come here to set COMP. This is needed to keep COMP set in @ENDPROF #IF(#DCOMP=0)<#EVAL(#U5=0)> #IF(#DCOMP=1)<#EVAL(#U5=2)> #IF(#DCOMP=2)<#EVAL(#U5=1)> @ @XYZ_SET #EVAL(#V0=#XST) #EVAL(#V1=#YST) #EVAL(#V10=#ZST) #EVAL(#V2=#XPOS) #EVAL(#V3=#YPOS) #EVAL(#V11=#ZST) #EVAL(#V13=#CLEAR) @ @CEN_SET #EVAL(#V4=#XCTR) #EVAL(#V5=#YCTR) #EVAL(#V12=#ZST) @ @LINE #CALL(COMPSET) #IF(#U2>0)<#EVAL(#U3=#U3+1)> #IF(#U3=1)<#EVAL(#V0=#XST)#EVAL(#V1=#YST)> #IF(#U3=2)<#EVAL(#V2=#XPOS)#EVAL(#V3=#YPOS)> #IF(#U3=4,AND#XPOS<#XST)<#EVAL(#U4=1)>#ELSE<#EVAL(#U4=2)> #IF(#U3=4)< G10#U2 XB#V0A YB#V1A ZR#V13A ZB#V10A#EXLN XD#V2A YD#V3A ZD#V11A DR#U4 TC#U5 FC#V8 F#FEED FZ#FZ D#TLDIA CR#V9 T#TOOL> #IF(#U2>0)<#EXIT> #IF(#U9=0)<#EVAL(#U8=#MOV) #CALL(XYZ_SET) #EVAL(#V7=#FEED)> #IF(#U9=1)< G10#U8 XB#V0A YB#V1A ZR#V13A ZB#V10A XE#V2A YE#V3A ZE#V11A TC#U5 F#V7 FZ#FZ #EXLN D#TLDIA CR.0000 T#TOOL #CALL(XYZ_SET) #EVAL(#V7=#FEED)> #IF(#U9=2)< G10#U8 XB#V0A YB#V1A ZR#V13A ZB#V10A XE#V2A YE#V3A ZE#V11A XC#V4A YC#V5A ZC#V12A TC#U5 F#V7 FZ#FZ #EXLN D#TLDIA CR.0000 T#TOOL #EVAL(#U8=#MOV) #CALL(XYZ_SET) #EVAL(#V7=#FEED)> #EVAL(#U9=1) @ @ARC #CALL(COMPSET) #IF(#U2>7)< G10#U2 XC#XCTRA YC#YCTRA R#ARADA #IF(#MOV=2)#ELSE#EXLN TC#U5 FC#V8 F#FEED FZ#FZ D#TLDIA T#TOOL> #IF(#U2>7)<#EVAL(#U2=0)#EXIT> #IF(#U9=0)<#EVAL(#U8=#MOV) #CALL(XYZ_SET) #CALL(CEN_SET) #EVAL(#V7=#FEED)> #IF(#U9=1)< G10#U8 XB#V0A YB#V1A ZR#V13A ZB#V10A XE#V2A YE#V3A ZE#V11A TC#U5 F#V7 FZ#FZ #EXLN D#TLDIA CR.0000 T#TOOL #EVAL(#U8=#MOV) #CALL(XYZ_SET) #CALL(CEN_SET) #EVAL(#V7=#FEED)> #IF(#U9=2) #EVAL(#U9=2) @ @OP_SPEC #CALL(OP_DRL) @OP_REAM #CALL(OP_DRL) @OP_SPDRL #CALL(OP_DRL) @OP_CDRL #CALL(OP_DRL) @OP_CBORE #CALL(OP_DRL) @OP_SPFACE #CALL(OP_DRL) @OP_CSINK #CALL(OP_DRL) @OP_DRL G100 X#XPOSA Y#YPOSA T#TOOL @ @BHC G104 XC#XPOSA YC#YPOSA HL#NHOL R#ARAD A#STANG T#TOOL @ @G106 #EVAL(#U2=6)#EVAL(#U3=0)#EVAL(#U4=2) @ @G107 #EVAL(#U2=7)#EVAL(#U3=0)#EVAL(#U4=2) @ @G108 #EVAL(#U2=8) @ @G109 #EVAL(#U2=9) @