@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: Bostomatic (mill) Control: SPC1 VARIABLES U1: speed value integer for high low clutch U2: flag for changing format from tlchg or start U3: holds tap cycle depth U4: holds early exit switch from cyclchg and wrap U5: holds early exit for wrap elemnt processing V1: holds the Zpos of a hole plus Zchk of .100 V3: holds accumulated line length of cut off line element ....... canned cycle controller variables ........... v60 total hole depth v63 peck increment v64 drill clearance ( machine default = 0.1 ) v65 drill clearance break chip ( machine default = 0.05 ) v66 drill re-entry clearance ( machine default = 0.03 ) v67 drill feedrate @ @DECLARE //#OUTCND // outputs conditional status //#OUTSEC // outputs @section names //#OUTREF // outputs processing errors //#OUTRPT // outputs an error report file @ @START #EVAL(#U0=0) #FILE #DATE #SYSTIME % #ONBLK G90 G1 X2. Y3. Z#ZHOME A#INDXA R #OFFBLK #IF(#SPEED>400)<#EVAL(#U1=INT((#SPEED/7000)*100))>// HI SPEED CALCULATION #IF(#SPEED<=400)<#EVAL(#U1=INT((#SPEED/7000)*175))>// LO SPEED CALCULATION -------------- TOOL #TOOL OFFSET #DOFF -------------- PROG. TOOL DIA = #TLDIA #IF(#SPEED>400)< HI SPEED BELT = #SPEED RPM> #IF(#SPEED<=400)< LO SPEED BELT = #SPEED RPM> #ONBLK T#TOOL M6 G48 R M3 M8 S#FMT(#U1,T3.0) G4 X3.0 #RESET(#ZPOS) #EVAL(#U2=1)// used in the startprof section @ @TOOLCHG < #FXD> Z#ZHOME R M5M9 < X#XHOME>< Y#YHOME> R G49 R #OFFBLK #IF(#SPEED>400)<#EVAL(#U1=INT((#SPEED/7000)*100))>// HI SPEED CALCULATION #IF(#SPEED<=400)<#EVAL(#U1=INT((#SPEED/7000)*175))>// LO SPEED CALCULATION -------------- TOOL #TOOL OFFSET #DOFF -------------- PROG. TOOL DIA = #TLDIA #IF(#SPEED>400)< HI SPEED BELT = #SPEED RPM> #IF(#SPEED<=400)< LO SPEED BELT = #SPEED RPM> #ONBLK M1 T#TOOL M6 G48 R M3 M8 S#FMT(#U1,T3.0) G4X3.0 < Z#ZPSET R> #EVAL(#U2=1)// used to test and reset zpos in stprof & fxd sections #EVAL(#U5=0)// for wrap junk @ //@STEPCHG // this section may be used // remember that no toolchange happens during one step @ @TPINDX < #FXD> Z#ZSTR// this is the last retract zposition < A#INDXA#RFEED> // if you dont want the following message just remove them. #OFFBLK ------------------- INDEX POSITION TO A#INDXA DEGREES ------------ #ONBLK < X#XPSET>< Y#YPSET>< Z#ZPSET>R @ @END #FXD < #DCOMP> Z#ZHOMEA0.R M5M9G49R M7 X#XHOMEY#YHOMERM9 G49R M30 #OFFBLK% @ @STPROF #IF(#U2=1)<<< #ABSI>< #MOV>>< X#XPOS>< Y#YPOS>#RFEED> #IF(#U2=0)<< #ABSI>< #FXD>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS>< F#FEED>> #EVAL(#U2=0) @ @ENDPROF < #DCOMP>< X#XPOS>< Y#YPOS>< Z#ZPOS>< F#FEED> #IF(#U4=2)< G25A#WRAD G131 #MOV Y#V3 Z#ZPOS G130> @ @RAP < #FXD> < Z#ZPOS #RFEED> < X#XPOS Y#YPOS #RFEED> @ @LINE #IF(#WRAD<=0)<< #PLANE>< #DCOMP#EXC D#DOFF>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS>< F#FEED>> @ @ARC < #PLANE>< #MOV>< X#XPOS>< Y#YPOS> I#XCTR J#YCTR< F#FEED> @ @XZARC <#PLANE><#MOV>I#XCTRK#ZCTR @ @YZARC <#PLANE><#MOV>J#YCTRK#ZCTR @ @HELIX <#PLANE>#MOVZ#ZPOSI#XCTRJ#YCTR @ @XZHELIX <#PLANE>#MOVY#YPOSI#XCTRK#ZCTR @ @YZHELIX <#PLANE>#MOVX#XPOSJ#YCTRK#ZCTR @ @ZCLRMV < #ABSI> < #FXD>< Z#ZPOS #RFEED> @ @ZCHKMV < #FXD>< Z#ZPOS #RFEED> @ @ZDPTHMV << #MOV> Z#ZPOS > @ @CYCLCHG #IF(#WRAD>0,#AND#ENDPROF=0)<#EVAL(#V3=#V3+#LNLEN)#EVAL(#U4=1)> #IF(#U4=1,#AND#ENDPROF=1)<#EVAL(#U4=2)> @ @OP_SPEC #CALL(OP_DRL) @OP_REAM #CALL(OP_DRL) @OP_DRL // This section will be used for Drilling, Reaming and Special < V60D#ZDPTH> < V64D#ZCHK> < V67D#FEED> #EVAL(#V1=#ZPOS-.1) < Z#V1R> < #CYCLE> X#XPOS Y#YPOSR @@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 // This section will be used for Spot Drilling, Center Drilling, Counter Boring, Spot Facing and Counter Sinking < V60D#ZDPTH> < V64D#ZCHK> < V67D#FEED> #EVAL(#V1=#ZPOS-.1) #IF(#U2=1)< Z#V1R>#EVAL(#U2=0)< Z#V1R> < #CYCLE> X#XPOS Y#YPOSR @@CYCLE 0,G82 @ @OP_PDRL // This section will be used for Peck Drilling // Use G83 normal deep hole or G84 chip break deep hole based on JOF < V60D#ZDPTH> < V63D#PECK> < V64D#ZCHK> < V67D#FEED> #EVAL(#V1=#ZPOS-.1) < Z#V1R> < #CYCLE> X#XPOS Y#YPOSR @@CYCLE 0,G83 1,G84 @ @OP_TAP // This section will be used for Tapping < X#XPOS>< Y#YPOS>R < Z#ZCHKR> #EVAL(#U3=-1*#ZDPTH) G91 #CYCLE Z#FMT(#U3,D3.4) F#FEED Z#ZDPTH G90 Z#ZCHK @@CYCLE 0,G01 @ @OP_BORE // This section will be used for Boring < V60D#ZDPTH> < V63D#PECK> < V64D#ZCHK> < V67D#FEED> #EVAL(#V1=#ZPOS-.1) < Z#V1R> < #CYCLE> X#XPOS Y#YPOSR @@CYCLE 0,G85 @