Search the Community
Showing results for tags 'custom drill cycle'.
-
Hello Mastercam Community. I shared this when I originally developed this back in 2007. I keep getting requests about it so I thought I would share it again. There were many people who helped me back then to make it what it is so I cannot take al the credit for it. Robert Brunsen (Zoober) had a big hand in this. Please use at your own risk. <!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!> <!><!><!><!><!><!><!><!> Make a Backup of your Post before attempting any of this <!><!><!><!><!><!><!><!> <!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!> I defined all the variables I wanted to use in the drilling section of the post right before the custom drill cycles: # --------------------------------------------------------------------- # Macro Variables as I need them # --------------------------------------------------------------------- sequal : "=" #Equal Sign spound : "#" #Pound Sign sminus : "-" #Minus Sign sadd : "+" #Addition Sign sdivide : "/" #Division Sign smultiply : "*" #Multiply Sign seq : "EQ" #Equal Call sne : "NE" #Not Equal To Call sgt : "GT" #Greater Than to Call slt : "LT" #Less Than Call sge : "GE" #Is Great than or Equal to Call sle : "LE" #Is Less than or Equal to Call sin : "SIN" #Sine Math scos : "COS" #Cosine Math stan : "TAN" #Tangent Math satan : "ATAN" #ArcTangent Math sacos : "ACOS" #ArcCosine Math sqrt : "SQRT" #Sqaure Root Math sabs : "ABS" #Absoulte Value sbin : "BIN" #Bin sbcd : "BCD" #Bcd sround : "ROUND" #Round to the Nearest Whole Number sfix : "FIX" #Use for Cutting away any Decimal Numbers sfup : "FUP" #Counting Decimal Digits as one's sln : "LN" #Natural Logarithm sexp : "EXP" #Exponent sbracketopen : "[" #Open Bracket sbracketclose : "]" #Close Bracket sif : "IF" #If Call sgoto : "GOTO" #Goto Call swhile : "WHILE" #While Call sdo : "DO" #Do Call sor : "OR" #Or Call sand : "AND" #And Call smod : "MOD" #Surplus Math sdprint : "DPRNT" #Data Output in from Probing Cycles sm100 : "100" #Macro Varaible 100 for Spindle Tranfer Operation sm150 : "150" #Macro Variable 150 for Math Functions in C Axis Aling Macro sm151 : "151" #Macro Variable 151 for Math Functions in C Axis Aling Macro sm152 : "152" #Macro Variable 152 Math Functions in C Axis Aling Macro sm5021 : "5021" #Machine Postion X Axis Variable sm5022 : "5022" #Machine Postion Y Axis Variable sm5023 : "5023" #Machine Postion Z Axis Variable sm5024 : "5024" #Machine Postion B Axis Variable sm5025 : "5025" #Machine Postion C Axis Varaible for Main Spindle sm5026 : "5026" #Machine Postion W Axis Varaible for Sub Spindle sm5027 : "5027" #Machine Postion U Axis Varaible for Sub Spindle sm5221 : "5221" #Workoffset Machine Postion X Axis Variable sm5222 : "5222" #Workoffset Machine Postion Y Axis Variable sm5223 : "5223" #Workoffset Machine Postion Z Axis Variable sm5224 : "5224" #Workoffset Machine Postion B Axis Variable sm5225 : "5225" #Workoffset Machine Postion C Axis Varaible for Main Spindle sm5226 : "5226" #Workoffset Machine Postion W Axis Varaible for Sub Spindle sm5227 : "5227" #Workoffset Machine Postion U Axis Varaible for Sub Spindle # -------------------------------------------------------------------------- # Probing String Varaibles Put here to keep post cleaner # -------------------------------------------------------------------------- strg659530 : "G65P9530" #Printing Macro Call for B90 strg659532 : "G65P9532" #Offset Update Macro for B90 strg659610 : "G65P9610" #Probe Protect Cycle for B90 strg659611 : "G65P9611" #XYZ Single Surface Measure B90 strg659612 : "G65P9612" #Web / Pocket Measure B90 strg659614 : "G65P9614" #Bore / Boss B90 strg659618 : "G65P9618" #C Axis Measure - Vertical B90 strg659619 : "G65P9619" #Bore / Boss on PCD B90 strg659621 : "G65P9621" #Angle Single Surface Measure B90 strg659622 : "G65P9622" #Angle Web / Pocket Measure B90 strg659623 : "G65P9623" #3-Point Bore / Boss Measure B90 strg659634 : "G65P9634" #Feature to Feature Measure B90 strg659650 : "G65P9650" #C-Axis Measure - Vertical B90 strg659730 : "G65P9730" #Printing Macro Call for B0 strg659732 : "G65P9732" #Offset Update Macro for B0 strg659810 : "G65P9810" #Probe Protect Cycle for B0 strg659811 : "G65P9811" #XYZ Single Surface Measure B0 strg659812 : "G65P9812" #Web / Pocket Measure B0 strg659814 : "G65P9814" #Bore / Boss B0 strg659818 : "G65P9818" #C Axis Measure - Horizontal B0 strg659819 : "G65P9819" #Bore / Boss on PCD B0 strg659821 : "G65P9821" #Angle Single Surface Measure B0 strg659822 : "G65P9822" #Angle Web / Pocket Measure B0 strg659823 : "G65P9823" #3-Point Bore / Boss Measure B0 strg659834 : "G65P9834" #Feature to Feature Measure B0 strg659850 : "G65P9850" #C-Axis Measure - Horizontal B0 zsinsurf : 0 #P9811 Z Axis Single Surface Use at B0,B90,B180 xsinsurf : 0 #P9811 X Axis Single Surface Use at B0,B90,B180 ysinsurf : 0 #P9811 Y Axis Single Surface Use At B0,B90,B180 drl_prm2$ : 0 drl_prm3$ : 0 drl_prm4$ : 0 # -------------------------------------------------------------------------- # Macro Force Start Amounts # -------------------------------------------------------------------------- m5225 : 5225 m5227 : 5227 # -------------------------------------------------------------------------- # Probe 90 deg Format Statements # -------------------------------------------------------------------------- fmt "X" 2 prorefht #B90 X clearence for Protect Cycle fmt "D" 2 diadwell #B90 P9614 Bore/Boss Measurement Dia call out fmt "Y" 2 cyspan #Used for Across Distance # -------------------------------------------------------------------------- # Probe 90 deg Varabiles # -------------------------------------------------------------------------- prorefht = refht$ #B90 X clearence for Protect Cycle diadwell = dwell$ #B90 P9614 Bore/Boss Measurement Dia call out cyspan = dwell$ #Used for Across Distance # -------------------------------------------------------------------------- # Probe 0 deg Format Statements # -------------------------------------------------------------------------- fmt "Z" 2 prnrefht #B0 X clearence for Protect Cycle fmt "D" 2 diedwell #B0 P9814 Bore/Boss Measurement # -------------------------------------------------------------------------- # Probe 0 deg Varabiles # -------------------------------------------------------------------------- prnrefht = refht$ #B0 Z clearence for Protect Cycle diedwell = dwell$ #B90 P9814 Bore/Boss Measurement Dia call out # -------------------------------------------------------------------------- # Probe Shared Index deg Format Statements # -------------------------------------------------------------------------- fmt "S" 4 offupdate #Used to Fixture Offsets fmt "H" 2 feattoler #Tolerance of Feature being Measured fmt "M" 2 trueposzone #True Position Tolerenance Zone fmt "B" 2 cangtoler #C axis Tolerance for C-Axis Align Cycle fmt "Q" 2 covertrav #C Axis Overtravel for Probe Amount fmt 2 drl_prm1$ #Tolerance Vaule for Repeat Loop in Post fmt "W" 4 drl_prm2$ #Print Variable for Increment or Reset fmt "N" 30 ngoto #GOTO statement Number to use in Header fmt 30 ngoto2 #GOTO statement Number to use in Probing Routine fmt 30 m5225 #Format for correct Number Values fmt 30 m5227 #Format for correct Number Values fmt "X" 2 xsinsurf #Single Surface for X fmt "Y" 2 ysinsurf #Single Surface for Y fmt "Z" 2 zsinsurf #Single Surface for Z # -------------------------------------------------------------------------- # Probe Shared Index deg Varabiles # -------------------------------------------------------------------------- offupdate = workofs$ #Used for Probing cycles to update workoffset fixed to used offset for operation. trueposzone = peck2$ #Used for the True Position amount cangtoler = peck1$ #Used for Angle Tolerance on C Axis Align Cycle covertrav = peck2$ #Used for Amount of Overtravel allowed for C Axis Align Cycle feattoler = peck1$ #Used for Tolerance of Feature being Measured ngoto = retr$ #Used for Goto Call in C Axis Align Macro in Header ngoto2 = retr$ #Used for Goto Call in C Axis Align Macro in Probing Routine zsinsurf = depth$ #P9811 Z Axis Single Surface Use at B0,B90,B180 xsinsurf = depth$ #P9811 X Axis Single Surface Use at B0,B90,B180 ysinsurf = depth$ #P9811 Y Axis Single Surface Use At B0,B90,B180 pdrlcst$ #Custom drill cycles 8 - 19 (user option) Then here is how I defined all the custom drill cycles with Logic to support B0, B90 and B180 probing. pdrlcst$ #Custom drill cycles 8 - 19 (user option) #Use this postblock to customize drilling cycles 8 - 19 if drillcyc$ = 8, #XYZ Single Surface Measure B0/B90/B180 [ pdrlcommonb if babs = 180, [ if drl_prm2$ <> 0 & drl_prm3$ = 0, #X Axis Single Surface Probing [ xsinsurf = (xabs + drl_prm2$) pbld, n$, *strg659810, *xsinsurf, e$ pbld, n$, *strg659810, *prnrefht, e$ pbld, n$, *strg659810, *zsinsurf, e$ pbld, n$, *strg659811, pfxout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *zsinsurf, e$ pbld, n$, *strg659810, *xsinsurf, e$ pbld, n$, *strg659810, *prnrefht, e$ ] if drl_prm3$ <> 0 & drl_prm2$ = 0, #Y Axis Single Surface Probing [ ysinsurf = (yabs + drl_prm3$) pbld, n$, *strg659810, *ysinsurf, e$ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659810, *zsinsurf, e$ pbld, n$, *strg659811, pfyout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *zsinsurf, e$ pbld, n$, *strg659810, *ysinsurf, e$ pbld, n$, *strg659810, *prnrefht, e$ ] if drl_prm2$ = 0 & drl_prm3$ = 0, #Z Axis Single Surface Probing [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659811, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] ] if babs = 90, #Single Surface B90 Probing with approach Logic using additonal Drill Parameters. [ if drl_prm4$ <> 0 & drl_prm3$ = 0, #Z Axis Single Surface Probing [ zsinsurf = (zabs + drl_prm2$) pbld, n$, *strg659610, *zsinsurf, e$ pbld, n$, *strg659610, *prorefht, e$ pbld, n$, *strg659610, *zsinsurf, e$ pbld, n$, *strg659611, pfxout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *zsinsurf, e$ pbld, n$, *strg659610, *xsinsurf, e$ pbld, n$, *strg659610, *prorefht, e$ ] if drl_prm3$ <> 0 & drl_prm4$ = 0, #Y Axis Single Surface Probing [ ysinsurf = (yabs + drl_prm3$) pbld, n$, *strg659610, *ysinsurf, e$ pbld, n$, *strg659610, prorefht, e$ pbld, n$, *strg659610, *zsinsurf, e$ pbld, n$, *strg659611, pfyout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *zsinsurf, e$ pbld, n$, *strg659610, *ysinsurf, e$ pbld, n$, *strg659610, *prorefht, e$ ] if drl_prm3$ = 0 & drl_prm4$ = 0, #X Axis Single Surface Probing [ pbld, n$, *strg659610, prorefht, e$ pbld, n$, *strg659611, pfxout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *prorefht, e$ ] ] if babs = 0, [ if drl_prm2$ <> 0 & drl_prm3$ = 0, #X Axis Single Surface Probing [ xsinsurf = (xabs + drl_prm2$) pbld, n$, *strg659810, *xsinsurf, e$ pbld, n$, *strg659810, *prnrefht, e$ pbld, n$, *strg659810, *zsinsurf, e$ pbld, n$, *strg659811, pfxout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *zsinsurf, e$ pbld, n$, *strg659810, *xsinsurf, e$ pbld, n$, *strg659810, *prnrefht, e$ ] if drl_prm3$ <> 0 & drl_prm2$ = 0, #Y Axis Single Surface Probing [ ysinsurf = (yabs + drl_prm3$) pbld, n$, *strg659810, *ysinsurf, e$ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659810, *zsinsurf, e$ pbld, n$, *strg659811, pfyout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *zsinsurf, e$ pbld, n$, *strg659810, *ysinsurf, e$ pbld, n$, *strg659810, *prnrefht, e$ ] if drl_prm2$ = 0 & drl_prm3$ = 0, #Z Axis Single Surface Probing [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659811, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] ] pcom_movea ] if drillcyc$ = 9, #Web/Pocket Measure B0/B90/B180 [ pdrlcommonb if babs = 180, [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659612, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *prnrefht, e$ ] if babs = 90, [ pbld, n$, *strg659610, prorefht, e$ pbld, n$, *strg659612, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659812, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] pcom_movea ] if drillcyc$ = 10, #Bore/Boss B0/B90/B180 [ pdrlcommonb if babs = 180, [ pbld, n$, *strg659810, *prnrefht, e$ pbld, n$, *strg659814, *diedwell, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] if babs = 90, [ pbld, n$, *strg659610, *prorefht, e$ pbld, n$, *strg659614, *diadwell, pfxout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, *strg659810, *prnrefht, e$ pbld, n$, *strg659814, *diedwell, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] pcom_movea ] if drillcyc$ = 11, #C Axis Measure - Vertical B0/B90/B180 [ pdrlcommonb if babs = 180, [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659818, *cyspan, pfxout, *offupdate,[if cangtoler > 0, *cangtoler], [if drl_prm2$ > 0, *drl_prm2$], e$ pbld, n$, *strg659810, *prnrefht, e$ ] if babs = 90, [ pbld, n$, *strg659610, prorefht, e$ pbld, n$, *strg659618, *cyspan, pfxout, *offupdate, [if cangtoler > 0, *cangtoler], [if drl_prm2$ > 0, *drl_prm2$], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659818, *cyspan, pfxout, *offupdate, [if cangtoler > 0, *cangtoler], [if drl_prm2$ > 0, *drl_prm2$], e$ pbld, n$, *strg659810, *prnrefht, e$ ] *sg00 ,*sg91, sg30_3, "X0", e$ *sg00, *sg90, [if workofs$ > 53, *g_wcs], [if workofs$ < 49 , "G54.1", *p_wcs],[if spindle_no$ = 0, "C20."],[if spindle_no$ = 1, "U20."],e$ *sg00, *sg90, [if spindle_no$ = 0, "C0"],[if spindle_no$ = 1, "U0"], e$ spaces$ = 0 sif,sbracketopen,spound,sm152,sgt,drl_prm1$,sbracketclose,sgoto,ngoto2, e$ spaces$ = 1 pcom_movea ] if drillcyc$ = 12, #Bore/Boss on PCD B0/B90/B180 [ pdrlcommonb if babs = 180, [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659819, diedwell, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] if babs = 90, [ pbld, n$, *strg659610, prorefht, e$ pbld, n$, *strg659619, diadwell, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659819, diedwell, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] pcom_movea ] if drillcyc$ = 13, [ pdrlcommonb if babs = 180, [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659818, diedwell, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] if babs = 90, [ pbld, n$, *strg659610, prorefht, e$ pbld, n$, *strg659818, diadwell, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, *strg659810, prnrefht, e$ pbld, n$, *strg659818, diedwell, pfyout, pfzout, [if peckclr$ > 0,*offupdate], [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] pcom_movea ] pdrlcst_2$ #Custom drill cycles 8 - 19 (user option) #Use this postblock to customize drilling cycles 8 - 19 if drillcyc$ = 8, [ pdrlcommonb if babs = 180, [ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, *strg659811, pfyout, pfzout, [if peck2$ > 0, *trueposzone], e$ pbld, n$, *strg659810, *prorefht, e$ ] if babs = 90, [ pbld, n$, `strg659610, `prnrefht, e$ pbld, n$, *strg659611, pfyout, pfzout, [if peck2$ > 0, *trueposzone], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, *strg659811, pfyout, pfzout, [if peck2$ > 0, *trueposzone], e$ pbld, n$, *strg659810, *prnrefht, e$ ] pcom_movea ] if drillcyc$ = 9, #Web/Pocket Measure B0/B90 [ pdrlcommonb if babs = 180, [ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, *strg659812, diadwell, pfyout, pfzout, [if peck2$ > 0, *trueposzone], e$ pbld, n$, *strg659810, *prnrefht, e$ ] if babs = 90, [ pbld, n$, `strg659610, `prorefht, e$ pbld, n$, *strg659612, diadwell, pfyout, pfzout, [if peck2$ > 0, *trueposzone], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, *strg659812, diedwell, pfyout, pfzout, [if peck2$ > 0, *trueposzone], e$ pbld, n$, *strg659810, *prnrefht, e$ ] pcom_movea ] if drillcyc$ = 10, #Bore/Boss B0/B90 [ pdrlcommonb if babs = 180, [ pbld, n$, *strg659810, pyout, pxout, e$ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, *strg659814, *diadwell, pfzout, [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] if babs = 90, [ pbld, n$, *strg659610, pyout, pxout, e$ pbld, n$, `strg659610, `prorefht, e$ pbld, n$, *strg659614, *diadwell, pfxout, [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, *strg659810, pyout, pxout, e$ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, *strg659814, *diedwell, pfzout, [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] pcom_movea ] if drillcyc$ = 11, [ result = mprint(sperror), exitpost$ ] if drillcyc$ = 12, [ pdrlcommonb if babs = 180, [ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, "G65P9618", diadwell, pfyout, pfzout, [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] if babs = 90, [ pbld, n$, `strg659610, `prorefht, e$ pbld, n$, "G65P9618", diadwell, pfyout, pfzout, [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, "G65P9818", diedwell, pfyout, pfzout, [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] pcom_movea ] if drillcyc$ = 13, [ pdrlcommonb if babs = 180, [ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, "G65P9618", diadwell, pfyout, pfzout, [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] if babs = 90, [ pbld, n$, `strg659610, `prorefht, e$ pbld, n$, "G65P9618", diadwell, pfyout, pfzout, [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659610, *prorefht, e$ ] if babs = 0, [ pbld, n$, `strg659810, `prnrefht, e$ pbld, n$, "G65P9818", diedwell, pfyout, pfzout, [if peck2$ > 0, *trueposzone], [if feattoler > 0, *feattoler], e$ pbld, n$, *strg659810, *prnrefht, e$ ] pcom_movea ] Here is how the text was defined to be used through the Mastercam Control Definition. This must be done through the Mastercam Control Definition not through just copying and pasting into a Post. This is extremely important since this section of the post is an XML format that can be corrupted very easily if someone goes hacking this section of a post. Why it is best to make these changes through the Mastercam Control Definition. [drill cycle 9 custom parameters] 1. "Additional Probing" 2. "Feat to Feat[0=N,1=Y]" 3. "X Axis App Amount +/-" 4. "Y Axis App Amount +/-" 5. "Z Axis App Amount +/-" 6. "" 7. "" 8. "" 9. "" 10. "" 11. "" [drill cycle 10 custom parameters] 1. "Additional Probing" 2. "Feat to Feat [0=No,1=Yes]" 3. "Z axis Distance to Measure" 4. "X axis Distance to Measure" 5. "Y axis Distance to Measure " 6. "Angle XY Plane " [drill cycle 11 custom parameters] 1. "Additional Probing" 2. "Feat to Feat [0=No,1=Yes]" 3. "Z axis Distance to Measure" 4. "X axis Distance to Measure" 5. "Y axis Distance to Measure " 6. "Angle XY Plane " [drill cycle 12 custom parameters] 1. "Additional Probing" 2. "Tolerance for Repeat " 3. "Data Print [1=Increm,2= Reset]" 4. "" 5. "" 6. "" 7. "" 8. "" 9. "" 10. "" 11. "" [drill cycle 13 custom parameters] 1. "Additional Probing" 2. "Feat to Feat [0=No,1=Yes]" 3. "Z axis Distance to Measure" 4. "X axis Distance to Measure" 5. "Y axis Distance to Measure " 6. "Angle XY Plane " [drill cycle 14 custom parameters] 1. "Additional Probing" 2. "Feat to Feat [0=No,1=Yes]" 3. "Z axis Distance to Measure" 4. "X axis Distance to Measure" 5. "Y axis Distance to Measure " 6. "Angle XY Plane " [drill cycle 15 custom parameters] 1. "Additional Probing" 2. "Feat to Feat [0=No,1=Yes]" 3. "Z axis Distance to Measure" 4. "X axis Distance to Measure" 5. "Y axis Distance to Measure " 6. "Angle XY Plane " [drill cycle 16 custom parameters] 1. "Custom Drill Parameters 16" [drill cycle 17 custom parameters] 1. "Custom Drill Parameters 17" [drill cycle 18 custom parameters] 1. "Custom Drill Parameters 18" [drill cycle 19 custom parameters] 1. "Custom Drill Parameters 19" [drill cycle 20 custom parameters] 1. "Custom Drill Parameters 20" [drill cycle descriptions] 1. "Standard Drill - G81/G82" 2. "Peck Drill - G83" 3. "Chip Break - G83" 4. "Tap - G84/G74" 5. "Reaming - G85" 6. "Gundrill - longhand" 9. "XYZ Single Face Probing" 10. "Web/Pocket Probing" 11. "Bore/Boss Probing" 12. "Angle Single Surface Probing" 13. "Angle Web/Pocket Probing" 14. "3-Point Bore/Boss Probing" Error Message if trying to use a probing cycle for repeated features: # -------------------------------------------------------------------------- # Error message strings # -------------------------------------------------------------------------- sperror :"ONLY USE THIS PROBING CYCLE ON ONE FEATURE AT A TIME"
- 1 reply
-
- 10
-
- probing
- renishaw probing cycle
-
(and 3 more)
Tagged with:
-
To all, I have visited this form many times learning a lot about editing my post and a few dif things However I am stumped now. I Have programmed with mastercam for over 20 yrs and our latest version of MC is X3 because my boss wont let me upgrade to the newest ver but we really dont need it cause what we have works and have not bought a new machine in yrs until a few months ago. We bought a new Haas VF3 and I know there is a lot of ppl out there that dont like them but I love it for now. Anyway to my point, I have a good working post and have been moding it to fit my needs. I added a custom drill cycle to peck tap and Have got that to work how I like but I also want to add a Programmable stop so I dont have to manually edit the Program every time. Right now I just do a normal drill cycle in the location I want my stop to get this code: G0 G17 G40 G49 G80 G90 ( 3/8 DOWELL | ) T19 M6 G0 G90 G54 X-1.3939 Y.1561 S0 M5 G43 H19 Z2. G98 G81 Z-.5 R0. F110. G80 M5 G91 G28 Z0. Then I edit it to look like this: G0 G17 G40 G49 G80 G90 ( 3/8 DOWELL | ) T19 M6 G0 G90 G54 X-1.3939 Y.1561 G43 H19 Z2. G1 Z-.5 F110. M00 G91 G28 Z0. How can I add a custom drill cycle to post out what I edit? Like I said before I did add a peck tap cycle to the post like this: pdrlcst$ #Custom drill cycles 8 - 19 (user option) if drillcyc$ = 9, [ numpeck = peck2$, [ peck_cnt = numpeck initial_calc = (depth$ - tosz$) / peck_cnt strt_depth = (tosz$ + initial_calc) calc_depth = (depth$ - tosz$) calc_peck = calc_depth / numpeck #"(PECK tapping CYCLE)", e$ pcan1, pbld, n$, *sgdrlref, *sg84, pdrlxy, *strt_depth, pcout, prdrlout, *feed, strcantext, e$ count = peck_cnt ] pass = 1 WHILE count > 1, [ sub_depth = strt_depth + (calc_peck * pass) pbld, n$, *sg84, *sub_depth, *refht_a, e$ pass = pass + 1 count = count - 1 ] #pbld, n$, sg84, pfzout, *refht_a, e$ pcom_movea ] and it works like I want thanks to the sample of John Paris post I just had to change a little to get to work for me. My question is what would I use to output the code I need as shown above in my edited code, also where and how would I add it to the PST file to still use my peck tap and also a stop under the custom drill cycle section? Any Ideas? Thanks, Brian Pugh Mastercam x3
- 26 replies
-
- programable stop
- post processor
-
(and 1 more)
Tagged with:
-
I recently had a customer that needed to drill some deep holes with multiple drills and needed a full retract. Typically this is a good solution for a macro, except, that they know zero about macros and are not even sure that they have Macro B. So I needed a Mastercam solution....so here is a custom cycle for anyone who can use it I created a new fs statement for rounding, if you already have an fs22 change it to something you don't have, just make sure you set the variable for the new fs statement fs2 22 3 09 3 09 #Output for rounding peck values variables to be defined fmt 2 drill_dist #calulate drilling distance fmt 2 pck_amt # Peck amount fmt 22 pck_no # Calculate no. OF PECKS fmt Z 2 drl_depth # Calculate Z drill depth fmt Z 2 z_return # Rapid Z dpeth fmt Z 2 rtr_hgt fmt 2 z_calc #calulated Z doeth fmt 2 prv_zdrill # Capture previousl drilled depth fmt Z 2 z_clear # Z clearance return value fmt 2 z_clear_val # Clearance distance to previous peck fmt Z 2 z_start_pos pass :-9999 # Calculate number of pecks remaining Define the custom call pdrlcst$ #Custom drill cycles 8 - 19 (user option) #Use this postblock to customize drilling cycles 8 - 19 if drillcyc$ = 8, pdrilldeep if drillcyc$ > 8, pdrlcst8 The actual cycle pdrilldeep pdrlcommonb pck_amt = peck1$ drill_dist = (-depth$ + tosz$) pck_no = (drill_dist/ pck_amt) pck_no = fmtrnd(pck_no) pass = pck_no rtr_hgt = peckclr$ z_calc = 0 z_clear_val = peck2$ z_clear = (tosz$ + z_clear_val) z_start_pos = initht$ pbld, n$, pxout, pyout, e$ pbld, n$, sg00, *rtr_hgt, e$ while pass > 0, [ drl_depth = ((tosz$-(pck_amt)) + (-z_calc)) pbld, n$, sg00, z_clear, e$ pbld, n$, *sg01, *drl_depth, *feed, e$ pbld, n$, sg00, *rtr_hgt, e$ prv_zdrill = drl_depth z_calc = z_calc + pck_amt z_clear = (prv_zdrill + z_clear_val) pass = pass - 1 ] z_clear = (prv_zdrill + z_clear_val) pbld, n$, sg00, z_clear, e$ pbld, n$, sg01, pfzout, *feed, e$ pbld, n$, sg00, z_start_pos, e$ pbld, n$, "(", "HOLE COMPLETE", ")", e$ pbld, n$, "(" ")", e$ pcom_movea The field changes [drill cycle 9] 1. "PECK SPECIAL" 2. "" 3. "" 4. "" 5. "" 6. "" 7. "Peck" 8. "Clearance Distance" 9. "Clearance Height" 10. "" 11. "" Peck = Amount of Drill Peck Clearance Distance = Distance away to rapid down from previous drilled depth Clearance Height = Height to retract to clear hole. and if you want to setup to do multiple holes pdrlcst_2$ #Custom drill cycles 8 - 19, additional points (user option) #Use this postblock to customize drilling cycles 8 - 19 if drillcyc$ = 8, pdrilldeep if drillcyc$ <> 8, pdrlcst8_2
- 8 replies
-
- Custom Drill Cycle
- Full Retract
-
(and 1 more)
Tagged with:
-
I've been working on a custom drill cycle for my post and I've almost got it but I can't get it to input the feed with the value I have given it in my custom drill parameters. I can get a post of this: T21 M06 (.385 GO DRILL KENNAMETAL# 4149277) M11 (UNLOCK) G90 G80 G49 G40 G17 G00 G54 B0. X0. Y.818 S2650 M03 M10 (LOCK) G43 H21 Z8.3 M88 (DRILL PISTON BORE) G94 G01 Z0. F0. <---------- custom line Z7. F25. <---------- custom line Z8.3 F0. <---------- custom line M89 G91 G28 Z0. M05 With this in my post: pdrlcst$ #Custom drill cycles 8 - 19 (user option) #Use this postblock to customize drilling cycles 8 - 19 pdrlcommonb #if drillcyc = 8, pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl, # prdrlout, dwell, *feed, strcantext, e$ if drillcyc$ = 8, [ sub_prg_call = peck1$ pcan1, pbld, n$, *sg00, *sgabsinc, pfxout, pfyout, pfcout, pindexdrl, strcantext, e$ pbld, n$, "M98", *sub_prg_call, e$ ] if drillcyc$ = 9, [ refht_z = refht$ pdrlcommonb pcan1, pbld, n$, *sg01, *drl_prm1, *drl_prm2, e$ pbld, n$, pfzout, *feed, e$ pbld, n$, *refht_z, *drl_prm3, e$ pcom_movea ] else, "CUSTOMIZABLE DRILL CYCLE ", pfxout, pfyout, pfzout, pfcout, pindexdrl, e$ pcom_movea pdrlcst_2$ #Custom drill cycles 8 - 19, additional points (user option) #Use this postblock to customize drilling cycles 8 - 19 pdrlcommonb #if drillcyc = 8, pcan1, pbld, n$, pdrlxy, pzout, pcout, pindexdrl, prdrlout, dwell, # feed, strcantext, e$ if drillcyc$ = 8, [ sub_prg_call = peck1$ pcan1, pbld, n$, *sg00, *sgabsinc, pfxout, pfyout, pfcout, pindexdrl, strcantext, e$ pbld, n$, "M98", *sub_prg_call, e$ ] if drillcyc$ = 9, [ refht_z = refht$ pdrlcommonb pcan1, pbld, n$, *sg01, *drl_prm1, *drl_prm2, e$ pbld, n$, pfzout, *feed, e$ pbld, n$, *refht_z, *drl_prm3, e$ pcom_movea ] else, "CUSTOMIZABLE DRILL CYCLE ", pfxout, pfyout, pfzout, pfcout, pindexdrl, e$ pcom_movea Or I can get this: T21 M06 (.385 GO DRILL KENNAMETAL# 4149277) M11 (UNLOCK) G90 G80 G49 G40 G17 G00 G54 B0. X0. Y.818 S2650 M03 M10 (LOCK) G43 H21 Z8.3 M88 (DRILL PISTON BORE) G94 G01 drl_prm1$ 8. drl_prm2$ 10. Z7. F25. Z8.3 drl_prm3$ 60. M89 G91 G28 Z0. M05 With this in my post: pdrlcst$ #Custom drill cycles 8 - 19 (user option) #Use this postblock to customize drilling cycles 8 - 19 pdrlcommonb #if drillcyc = 8, pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl, # prdrlout, dwell, *feed, strcantext, e$ if drillcyc$ = 8, [ sub_prg_call = peck1$ pcan1, pbld, n$, *sg00, *sgabsinc, pfxout, pfyout, pfcout, pindexdrl, strcantext, e$ pbld, n$, "M98", *sub_prg_call, e$ ] if drillcyc$ = 9, [ refht_z = refht$ pdrlcommonb pcan1, pbld, n$, *sg01, *drl_prm1$, *drl_prm2$, e$ pbld, n$, pfzout, *feed, e$ pbld, n$, *refht_z, *drl_prm3$, e$ pcom_movea ] else, "CUSTOMIZABLE DRILL CYCLE ", pfxout, pfyout, pfzout, pfcout, pindexdrl, e$ pcom_movea pdrlcst_2$ #Custom drill cycles 8 - 19, additional points (user option) #Use this postblock to customize drilling cycles 8 - 19 pdrlcommonb #if drillcyc = 8, pcan1, pbld, n$, pdrlxy, pzout, pcout, pindexdrl, prdrlout, dwell, # feed, strcantext, e$ if drillcyc$ = 8, [ sub_prg_call = peck1$ pcan1, pbld, n$, *sg00, *sgabsinc, pfxout, pfyout, pfcout, pindexdrl, strcantext, e$ pbld, n$, "M98", *sub_prg_call, e$ ] if drillcyc$ = 9, [ refht_z = refht$ pdrlcommonb pcan1, pbld, n$, *sg01, *drl_prm1$, *drl_prm2$, e$ pbld, n$, pfzout, *feed, e$ pbld, n$, *refht_z, *drl_prm3$, e$ pcom_movea I have my custom drill parameters set as follows: # -------------------------------------------------------------------------- # Custom drilling cycle 9, carbide drill drilling cycle # -------------------------------------------------------------------------- fmt "Z" 2 drl_prm1 #starting Z depth fmt "F" 2 drl_prm2 #starting feed rate fmt "F" 2 drl_prm3 #retract feed rate fmt "Z" 2 refht_z #for Z retract height output # -------------------------------------------------------------------------- Seems like I can get it to either post the F or Z code I have assigned or post the numbers I have for my custom parameters in Mastercam. What am I doing wrong??
Join us!
eMastercam - your online source for all things Mastercam.
Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.