Search the Community
Showing results for tags 'Peck Cycle'.
-
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:
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.