// ---------------------------------------- // // 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. // ---------------------------------------- @NOTES Machine: Bridgeport Vertical mill Control: Boss 9 Supported Functions: G-Codes (Preparatory Functions) G00 Positioning mode G01 Linear interpolation (contouring) G02 Clockwise circular interpolation G03 Counter clockwise circular interpolation G12 Clockwise helical interpolation G13 Counter clockwise helical interpolation G17 Circular Interpolation in XY Plane G18 Circular Interpolation in XZ Plane G19 Circular Interpolation in YZ Plane G04 Dwell G40 Tool radius compensation cancel G41 Tool radius compensation, left G42 Tool radius compensation, right G70 Inch input G71 Metric input G79 Milling Cycle G80 Cancel fixed cycle G81 Drilling cycle G82 Spot drill cycle G83 Peck drill cycle G84 Tapping cycle G86 Bore in / Spindle Stop / Bore out G90 Absolute positioning mode G91 Incremental positioning mode G94 IPM Feed Mode G95 IPR Feed Mode M-Codes (Miscellaneous Functions) M02 End of Program M03 Spindle on CW M04 Spindle on CCW (use negative spindle speed in job plan) M05 Spindle Stop M06 Tool Change M08 Coolant on - Flood M09 Coolant off M30 End of program / rewind tape @START #EVAL(#V1=1) #RESET(#TLID) #EVAL(#V5=2) % . 'FILE NAME:#FILE 'T#TOOL:#TDESC 'SPINDLE RPM:#SPEED 'COOLANT:#IF(#TLID=1)#IF(#TLID=2)#IF(#TLID>2)#EXLN #IF(#TLID=0) '#TLCMT #ONBLK #ABSI G0 X#XPOS Y#YPOS T#TOOL M6 S#SPEED. #IF(#TLID=1)#IF(#TLID=2)#IF(#TLID>2)#EXLN #IF(#TLID=0) #NEXTPT #MOV< X#XPOS>< Y#YPOS> < Z#ZPOS> @TOOLCHG <#FXD > #RESET(#MOV,#FXD,#PECK,#S1,#S2,#S3,#S4,#S5,#S6,#S7,#S8,#S9,#TLID) #RESET(#V9,#V8,#V7,#PLANE) #EVAL(#V1=1) #OFFBLK'T#TOOL:#TDESC 'SPINDLE RPM:#SPEED 'COOLANT:#IF(#TLID=1)#IF(#TLID=2)#IF(#TLID>2)#EXLN #IF(#TLID=0) '#TLCMT #ONBLK #ABSI G0 X#XPOS Y#YPOS T#TOOL M6 S#SPEED. #IF(#TLID=1)#IF(#TLID=2)#IF(#TLID>2)#IF(#TLID=0) #NEXTPT #MOV< X#XPOS>< Y#YPOS> < Z#ZPOS> #RESET(#PECK,#FEED,#FXD) @END 'TOTAL CYCLE TIME=#CYTIME <#FXD > G90 G0 X#XPOS Y#YPOS T1 M2 E @STPROF #IF(#V5=1)<***** START PROF *****> #EVAL(#V1=1) #EVAL(#V3=0) #RESET(#FEED) < #FXD> < #ABS1>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS> @ENDPROF #IF(#V5=1)<***** END PROF *****> #IF(#V2=1)<#EXIT> < #DCOMP>< X#XPOS#OR Y#YPOS> #EVAL(#V1=1) #RESET(#DCOMP,#XST,#YST,#ZPOS,#FEED) @RAP #IF(#V5=1)<***** RAP *****> < #FXD> < #ABSI>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS> #RESET(#FEED) @LINE #IF(#V5=1)<***** LINE *****> #IF(#DCOMP>=1,AND#V3=0)<< #DCOMP #MOV #EXCX#XST #EXCY#YST F#FEED#EXLN #EVAL(#V1=0)>> #IF(#DCOMP=0,AND#V1=1)<< #MOV>< X#XPOS>< Y#YPOS>#EXLN < Z#ZPOS>< F#FEED>#EVAL(#V2=1)>#EXLN #ELSE<< #DCOMP>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS>< F#FEED>#EVAL(#V2=0)> @ARC #IF(#V5=1)<***** ARC *****> < #PLANE> #MOV X#XPOS Y#YPOS I#XCTR J#YCTR< F#FEED> @XZARC #IF(#V5=1)<***** XZ ARC *****> < #PLANE> #MOV X#XPOS Z#ZPOS I#XCTR K#ZCTR< F#FEED> @YZARC #IF(#V5=1)<***** YZ ARC *****> < #PLANE> #MOV Y#YPOS Z#ZPOS J#YCTR K#ZCTR< F#FEED> @HELIX < #PLANE> G01< R#ARAD>< I#XCTR>< J#YCTR>< A#STANG> #EVAL(#ARAD=ABS(SQR((#XPOS*#XPOS+#YPOS*#YPOS)))) #MOV< #PLANE>< R#ARAD>< I#XCTR>< J#YCTR>< A#TANG>< Z#ZPOS>< F#FEED> @XZHELIX #MOV< #PLANE>< X#XPOS> Y#YPOS < Z#ZPOS> I#XCTR K#ZCTR< F#FEED> @YZHELIX #MOV< #PLANE> X#XPOS< Y#YPOS>< Z#ZPOS> J#YCTR K#ZCTR< F#FEED> @ZCLRMV #IF(#V5=1)<***** Z CLEAR *****> #RESET(#V9,#V8,#V7) < #FXD>< #MOV>< Z#ZPOS> #RESET(#MOV) #RESET(#DWELL) @ZCHKMV #IF(#V5=1)<***** Z CHECK *****> #EVAL(#V1=1) < #FXD>< #MOV>< Z#ZPOS> #RESET(#MOV) #RESET(#DWELL) @ZDPTHMV #IF(#V5=1)<***** Z DEPTH *****> #EVAL(#V1=1) < #MOV>< Z#ZPOS>< F#FEED> #RESET(#MOV) @FXD1 #IF(#V1=1)< #FXD#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH#OR F#FEED> #EVAL(#V1=0) @FXD2 < G4 Q#DWELL> #IF(#V1=1)< #FXD#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH#OR F#FEED> #EVAL(#V1=0) @FXD3 #IF(#V1=1)< #FXD#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH#OR F#FEED> #EVAL(#V1=0) @FXD4 #IF(#V1=1)< #FXD#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH#OR F#FEED> #EVAL(#V1=0) @FXD5 #EVAL(#V9=.05+.3*#TLDIA) #EVAL(#V7=.27*#TLDIA)#IF(#V7>.05)<#EVAL(#V7=.05)> #EVAL(#V8=#V7+.05)#IF(#V8>.1)<#EVAL(#V8=.1)> #IF(#V1=1)< #FXD#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>#IF(#V6=1)<< Z#ZDPTH Z#V8 Z.05>>#EXLN #ELSE<< Z#ZDPTH Z#V9 Z#V7>>< F#FEED> #EVAL(#V1=0) @