Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.
Use your display name or email address to sign in:
This is what I came up with :
pdrlcst #Custom drill cycles 8 - 19 (user option)
#Use this postblock to customize drilling cycles 8 - 19
#
# custom vars ****************************************
fmt Z 15 depth_1
fmt Z 15 depth_2
fmt Z 15 depth_3
fmt Z 15 depth_4
fmt I 15 rad_1
fmt I 15 rad_2
fmt I 15 rad_3
fmt I 15 rad_4
fmt F 15 plunge_fr
fmt F 15 rough_fr
fmt F 15 finish_fr
fmt D 15 comp_1
fmt D 15 comp_2
fmt D 15 comp_3
fmt Z 15 clear_hgt
fmt Z 15 feed_hgt
#
depth_1 = drl_prm1 # depths and radii are in drl_prm 1-8
rad_1 = drl_prm2
depth_2 = drl_prm3
rad_2 = drl_prm4
depth_3 = drl_prm5
rad_3 = drl_prm6
depth_4 = drl_prm7
rad_4 = drl_prm8
#
#
plunge_fr = mr1 # feedrates are in ------- mr 1-3
rough_fr = mr2
finish_fr = mr3
#
#
comp_1 = mi3 # cutter comps are in ---- mi 3-5
comp_2 = mi4
comp_3 = mi5
#
#
clear_hgt = refht_a
feed_hgt = refht_i
# *******************************************************
#
pdrlcommonb
if drillcyc = 8,
[
sub_prg_call = peck1
pbld, n, "M98", *sub_prg_call, e
]
if drillcyc = 9, # G13 - Standard Feedthru
[
#psub_call_s
#psub_st_s
pbld, n, feed_hgt,
pbld, n, "G1", depth_1, plunge_fr, e
pbld, n, "G13", rad_1, rough_fr, comp_1, e # solder well depth
pbld, n, "G13", rad_1, finish_fr, comp_1, e # spring pass
pbld, n, "G1", depth_2, plunge_fr, e
pbld, n, "G13", rad_2, rough_fr, comp_2, e # rough @1/2 depth
pbld, n, "G1", depth_3, plunge_fr, e
pbld, n, "G13", rad_2, rough_fr, comp_2, e # rough at finish depth
pbld, n, "G13", rad_3, finish_fr, comp_2, e # finish feedthru diameter
pbld, n, "G13", rad_3, finish_fr, comp_2, e # spring pass
pbld, n, "G1", depth_1,finish_fr, e
pbld, n, "G13", rad_1, finish_fr, comp_1, e # cut burr at solder well depth
pbld, n, clear_hgt, e
#psub_end_s
]
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,
[
sub_prg_call = peck1
pcan1, pbld, n, pxout, pyout, strcantext, e
pbld, n, "M98", *sub_prg_call, e
]
if drillcyc = 9, # G13 - Standard Feedthru Additional Points
[
pcan1, pbld, n, pxout, pyout, strcantext, e
]
pcom_movea
Post crashed and reported duplicate pdrlcommonb and posted a few G13's, two place decimals for feedrates, and a long line of G1's and G13's without any x-y moves. Not as easy as it looks. LOL
I was thinking about something like this:
if drillcyc = 10, # G13 - Standard Feedthru
[
psub_call_s
psub_st_s
pbld, n, pdrlxy, e # depths and radii are in drl_prm 1-10
pbld, n, refht, e # feedrates and ccomp assignment are in mi 3-8
pbld, n, "G1 Z", drl_prm1, "F", mi3, e #
pbld, n, "G13", "I", drl_prm2, "F", mi4, "D", mi5, e # solder well depth
pbld, n, "G13", "I", drl_prm2, "F", mi4, "D", mi5, e # spring pass
pbld, n, "G1 Z", drl_prm3, "F", mi3, e
pbld, n, "G13", "I", drl_prm4, "F", mi6, "D", mi7 e # rough @1/2 depth
pbld, n, "G1 Z", drl_prm5, "F", mi3, e
pbld, n, "G13", "I", drl_prm4, "F", mi6, "D", mi7 e # rough at finish depth
pbld, n, "G13", "I", drl_prm5, "F", mi6, "D", mi7, e # finish feedthru diameter
pbld, n, "G13", "I", drl_prm5, "F", mi6, "D", mi7, e # spring pass
pbld, n, "G1 Z", drl_prm1, "F", mi8, e
pbld, n, "G13", "I", drl_prm2, "F", mi4, "D", mi5 e # cut burr at solder well depth
pbld, n, refht, e
psub_end_s
pcom_movea
]
I,m using Mpmaster v9.1post. The concept of how to code a custom drill cycle is getting clearer to me, but how
do I push code into a sub, and return???
The additional point part is no prob.
Am I even in the ballpark???
[ 10-13-2008, 11:02 AM: Message edited by: mastercamguru ]
Ok I've set up cycle defs and custom parms in mill9.txt and have some luck getting G13's posted just fine as custom 10 - 15. I would like to force a subprogram call as in custom 9 of Mpmaster post and send my drill code to the sub I called. How do I make a sub from my custom cycle?
Thanks. So can I use them in a canned cycle directly? Like#
#***************
# Subprogram Call
# ***************
#
ifdrillcyc=8,
[
sub_prg_call=drl_parm1$
pcan1,pbld,n,strcantext,e
pbld,n,"M98",*sub_prg_call,e
]
isn't the $ for mcx?
I am using 9.1 at work and X2mr2 at home
That's right, but I have altered mill.txt to name my new cycles(which I will code later).I am still deciding how to label the custom parameters for each new cycle.
My main problem right now is passing these custom 1-10 parameters to my post. What variables are used? eg. as peck1 is for 1st peck - what variable represents custom drill parameters 1-10?
Any examples of a custom drill cycle out there ?
Does any one have any tricks up their sleeves to get G13's out of Mcam Mpmaster post? My solution so far is to use custom drill cycle 9 to post subprogram calls(prog # is passed through peck1)variable. I write the G13's manually into a sub. I know I could use another custom cycle to post simple G13 routines, but I need something more like this:
00216 (CC35542.216..SP)
(.060 EM-.1016 FEEDTHRU)
G90
Z.01
G1Z-.012F3.
G13I.0702D26F3.
G13I.0702D26F4.
G1Z-.057F3.
G13I.0503D27F3.
G1Z-.067
G13I.0507D27F3.
G13I.0507D27F4.
G1Z-.012F20.
G13I.0702D26F5.
G0Z.05
M99
Any ides would be appreciated.
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.