Jump to content

Welcome to eMastercam

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:

Rotary axis need help


TODD944
 Share

Recommended Posts

I am trying to drill holes around a rotary. When I center drill the holes backplot shows the tool moving around the part. When I do my drill toolpath it shows the part moving. When I post this the center drill path cancel the drill cycle between each rotation and the drill cycle does not. Does anyone have a solution for this?

Link to comment
Share on other sites

If the holes are equally spaced, I would only center and drill the top one and then use transform rotate to get around the part.

 

How is your toolpath set up to actaully go around the part?

Link to comment
Share on other sites
  • 1 year later...

Can anyone think of a way to stop Mastercam from cancelling a drill cycle on a plane change.

 

I am trying to output a drill cycle similar to a C axis face drill cycle, wiht only the A rotational moves.

 

A0.

G81 Z-.5 R.05 F12.

A60.

A120.

A180.

A240.

A300.

G80

 

Right now I get canceling G80 between all points.

Link to comment
Share on other sites

exactly Phil

 

In lathe you can get the c axis rotation with no cancels in between but in mill you can not.

 

I am trying to come up with something that will let mill generate the A rotation with no cancels in between.

Link to comment
Share on other sites

You would handle it like so.

 

code:

pcanceldc$       #Cancel canned drill cycle

result = newfs (three, zinc)

if tap_feed = one & drillcyc$ = three, result = newfs (15, feed) #Cancel tap feeds with 4/3 decimal places

if drillref = 0, z$ = initht$

else, z$ = refht$

!z$

if cuttype = one, prv_zia = initht$ + (rotdia$/two)

#else, prv_zia = initht$ #G91 Z depth from initial height

else, prv_zia = refht$ #Fanuc style - G91 Z depth from R level

pxyzcout

!zabs, !zinc

prv_gcode$ = zero

if cool_zmove = yes$ & (nextop$=1003 | (nextop$=1011 & t$<>abs(nexttool))), coolant$ = zero

pcan

if mi8$ = 0, if drillcyc$ <> 8, pcan1, pbld, n$, "G80", scoolant, strcantext, e$

if use_pitch & tapflg = 1, pbld, n$, "G94", e$

pcan2

tapflg = 0

I then went here:

code:

pdrill$          #Canned Drill Cycle

pdrlcommonb

pcan1, pbld, n$, `sgdrlref, `sgdrill, pdrlxy, [if sav_mi8 > 1,`pzout], pcout, pindexdrl,

[if sav_mi8 > 1,`prdrlout], dwell$, `feed, strcantext, e$

if mi8$ = 1, sav_mi8 = sav_mi8 = 1

pcom_movea

 

pdrlcommonb #Canned Drill Cycle common call, before

if sav_dgcode = 81,

[

result = newfs (two, zinc)

if tap_feed = one & drillcyc$ = three, result = newfs (two, feed) #Tap feeds with 4/3 decimal places

if drillcyc$ = three, drlgsel = fsg1(-ss$) + drillcyc$ * two

else, drlgsel = fsg2(dwell$) + drillcyc$ * two

#if initht$ <> refht$, drillref = zero

#else, drillref = one

if clearflg = one & clearstrt = zero, drillref = zero

else, drillref = one

prv_refht_a = c9k

prv_refht_i = c9k

prv_dwell$ = zero

]

if cuttype = three, sav_dgcode = gcode$

else, z$ = depth$

if cuttype = one, prv_zia = initht$ + (rotdia$/two)

else, prv_zia = refht$ #Fanuc style - G91 Z depth from R level

#else, prv_zia = initht #G91 Z depth from initial height

pcom_moveb

feed = fr_pos$

comment$

pcan

#5 axis must map the true Z, correct Z calculation here

if cuttype = three,

[

prv_zia = zabs + (-depth$) + initht$

zia = fmtrnd(zabs)

zinc = zia - prv_zia

]

if mi8$ = 0, pbld, n$, sgabsinc, e$

 

ptlchg0$ #Call from NCI null tool change (tool number repeats)

if op_id$ <> last_op_id,

[

rd_params$ # Read parameters - pparameter

pmisccheck

]

pcuttype

toolcount = toolcount + 1

prvtp = rbuf(3,toolcountp)

if toolcountn <= tooltotal, nexttool = rbuf(4,toolcountn)

else, nexttool = first_tool$

if (mi10$=one & (op_id$ <> last_op_id | (op_id$ = last_op_id & xform_op_id$ <> op_id$)))

| ((tlplnno$ <> prvtp | rotary_type$ <> last_rotary_type) & ret_on_indx), pstop

pcom_moveb

pcheckaxis #Check for valid rotary axis

c_mmlt$ #Multiple tool subprogram call

comment$

if op_id$ <> last_op_id,

[

spaces$=0

#if swcsplname <> snull, n$, pspc, scomm_str, "WCS NAME - ", swcsplname, scomm_end, e$

#if swcsplcomm <> snull, n$, pspc, scomm_str, "WCS COMMENT - ", swcsplcomm, scomm_end, e$

#if rot_on_x & stoolplname <> snull, n$, pspc, scomm_str, "TOOLPLANE NAME - ", stoolplname, scomm_end, e$

#if rot_on_x & stoolplcomm <> snull, n$, pspc, scomm_str, "TOOLPLANE COMMENT - ", stoolplcomm, scomm_end, e$

#if rot_on_x & sconstplname <> snull, n$, pspc, scomm_str, "CPLANE NAME - ", sconstplname, scomm_end, e$

#if rot_on_x & sconstplcomm <> snull, n$, pspc, scomm_str, "CPLANE COMMENT - ", sconstplcomm, scomm_end, e$

#if stpgrpname <> snull, n$, pspc, scomm_str, "TOOLPATH GROUP - ", stpgrpname, scomm_end, e$

#n$, pspc, scomm_str, "COMPENSATION TYPE - ", *scomp_type, scomm_end, e$

spaces$=sav_spc

]

pcan

if plane$ < 0, plane$ = 0

pbld, n$, sgplane, e$

pspindchng

if coolant$ <> 0 & coolant$ <> sav_coolant & sav_coolant, pbld, n$, sm09, e$

pbld, n$, scoolant, e$

sav_coolant = coolant$

if coolant$ = 1, sm09 = sm09_0

if coolant$ = 2, sm09 = sm09_1

if coolant$ = 3, sm09 = sm09_2

if op_id$<>last_op_id, pstock

if sav_mi9 = 1, workofs$ = sav_workofs

if (wcstype > one & workofs$ <> prv_workofs$) | (tlplnno$ <> prvtp),

[

if convert_rpd$ = 1 & gcode$ = 0,

[

gcode$ = 1

feed = maxfeedpm

ipr_type = 0

]

sav_absinc = absinc$

absinc$ = zero

pindex

if fmtrnd(prv_cabs) <> fmtrnd(cabs),

[

if lock_codes = one & not(index) & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$

if mi8$ =0, pbld, n$, [if not(index), sgabsinc, pwcs], pfxout, pfyout, pfzout, pfcout, e$

if lock_codes = one & not(index) & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$

 

prapidout #Output to NC of linear movement - rapid

sav_gcode = gcode$

if convert_rpd$ = 1,

[

feed = maxfeedpm

gcode$ = 1

ipr_type = 0

]

pcan1, pbld, n$, sgplane, `sgcode, [if mi8$ = 0, sgabsinc], pccdia,

pxout, pyout, pzout, pcout, [if gcode$ = 1, `feed], strcantext, scoolant, e$

gcode$ = sav_gcode

 

pindex #Index output

if mi8$ = 0, if index, pbld, n$, sgabsinc, pwcs, e$

if index & rot_on_x,

[

if (prv_indx_out <> fmtrnd(indx_out)) | (prv_cabs <> fmtrnd(cabs)),

[

if lock_codes = 1 & rotretflg = 0, pbld, n$, *sunlock, sunlockcomm, e$

pbld, n$, [if use_rotmcode, *sindx_mc], *indx_out, e$

if lock_codes = 1 & cuttype = 0 & rotretflg = 0, pbld, n$, *slock, slockcomm, e$

!cabs, !cinc

]

]

That was as far as I got during lunch and had to get back to work. Not tested thoroughly, but I think that will make mpmaster do what you are after.

 

Oh yeah I defined sav_mi8 as 1 in the post as well.

 

HTH

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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.

Follow us

×
×
  • Create New...