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:

Help with MPMaster, mod to support tapmatic head


Recommended Posts

Hey guys

 

Running X8 with MPMaster for post.

 

Im trying to setup a simple approach to using a Tapmatic auto-reversing tap head for an older mill.

 

There are a couple of challenges-

  1. the reverse federate is 1.75x that of the forward federate
  2. To engage the reversing gear/mode, you need to retract some distance (specific the head- in my case, 0.15’) as a rapid, and then revert to the reverse feederate  above.
  3. Needs to be some pause in the process- so that the tap can have time to retract in the case there is some clutch slipping on retract.

 

I setup a new drill cycle as cycle 9, and did my best to figure this out. Looks fine in the GUI, but having strange problems with output- for example, user variables showing up as both a label and also as a value sequentially (i.e. a variable created called drl_exitfeed is defined, and then assigned a value of feed*1.75 in cycle 9. When I include a line like “G1”, drl_exitfeed,E$ just as a test, I get “G1 drl_exitfeed x.xx”, where x.xx is the correct retract value, but the label name is oddly showing up as if it were quoted text…)

 

I don’t know if this is best done as long code, or canned. Likewise, not clear if Im better off with a variation of a tap cycle or drill/bore, where perhaps the tap feed/speed calcs help on the entry side but complicate things on the retract side.

 

I have looked at some sample codes some of the gurus have posted here, but still pretty blurry-eyed.

 

Any help in the form of links or code would be truly appreciated-

 

Regards

Rob

Link to comment
Share on other sites

Hi Clarence-

Thanks for the tip- that helped a great deal.

As Im not familiar with the rules of inline functions with the postprocessor, I put together some fairly brutish code that seems to do what I need. If you get a spare moment, could you have a gander and let me know if I have missed something terrible? I dont expect to use incremental mode for this system- so I didnt even look into the 'if' aspect for this. Obviously, I hard-coded the rapid retract for the reversal gear, and maybe that is better done with some logic (a minimum value of X or retract value *1.2, whichever is greater)- I dont want to have to pass in additional variables/parameters, as they are too easy to omit . Likewise for the distance to rapid retract- but perhaps that could fit in using a peck cycle with that value as the 'peck' distance; Im less likely to forget that!

#Use this postblock to customize drilling cycles 8 - 19
pdrlcommonb
#if drillcyc = 8, pcan1, pbld, n$, pdrlxy, pzout, pcout, pindexdrl, prdrlout, dwell,
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,
  [
     #Define tap position 
      n$, *sg00, *sgabsinc, pfxout, pfyout, pfcout, pindexdrl, strcantext, e$
      # calculate the exit feed required for the 1.75x reverse RPM
     drl_exitfeed = feed*1.75
     # define tap depth and feed rate 
     n$,*sg01, pzout, *feed, e$ 
    #command a rapid reversal to Z-.15" to engage reversing gear
    zabs=zabs+.15
    n$,*sg01,*zabs,"F20",e$
   # feed out at 175% of cut feedrate to reference height, and pause if defined in Dwell
   zabs=refht_a
   n$,*sg01,*zabs, *drl_exitfeed, e$
  if dwell$,
  [
    N$,sg04,*dwell$,e$ 
  ]	
]	
else, "CUSTOMIZABLE DRILL CYCLE ", pfxout, pfyout, pfzout, pfcout, pindexdrl, e$
pcom_movea
  • Like 1
Link to comment
Share on other sites

It looks like you've got something that will work for what you need. That's always the first step. You can refine it from here.

 

The only thing that really jumps out at me is that you should add a decimal point on your "F20" parameter. Some controls will read the F20 without a decimal, and interpret that value as the "lowest unit of measure". For feed, that might be 3 or 4 decimal places.

 

For an Inch system, with four digits of feed, F20 would result in a feedrate of .0020!

Link to comment
Share on other sites

 

Hi Clarence-

Thanks for the tip- that helped a great deal.

As Im not familiar with the rules of inline functions with the postprocessor, I put together some fairly brutish code that seems to do what I need. If you get a spare moment, could you have a gander and let me know if I have missed something terrible? I dont expect to use incremental mode for this system- so I didnt even look into the 'if' aspect for this. Obviously, I hard-coded the rapid retract for the reversal gear, and maybe that is better done with some logic (a minimum value of X or retract value *1.2, whichever is greater)- I dont want to have to pass in additional variables/parameters, as they are too easy to omit . Likewise for the distance to rapid retract- but perhaps that could fit in using a peck cycle with that value as the 'peck' distance; Im less likely to forget that!

#Use this postblock to customize drilling cycles 8 - 19
pdrlcommonb
#if drillcyc = 8, pcan1, pbld, n$, pdrlxy, pzout, pcout, pindexdrl, prdrlout, dwell,
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,
  [
     #Define tap position 
      n$, *sg00, *sgabsinc, pfxout, pfyout, pfcout, pindexdrl, strcantext, e$
      # calculate the exit feed required for the 1.75x reverse RPM
     drl_exitfeed = feed*1.75
     # define tap depth and feed rate 
     n$,*sg01, pzout, *feed, e$ 
    #command a rapid reversal to Z-.15" to engage reversing gear
    zabs=zabs+.15
    n$,*sg01,*zabs,"F20",e$
   # feed out at 175% of cut feedrate to reference height, and pause if defined in Dwell
   zabs=refht_a
   n$,*sg01,*zabs, *drl_exitfeed, e$
  if dwell$,
  [
    N$,sg04,*dwell$,e$ 
  ]	
]	
else, "CUSTOMIZABLE DRILL CYCLE ", pfxout, pfyout, pfzout, pfcout, pindexdrl, e$
pcom_movea

 

Good work and I like how you defined your steps and methods for your process. Amazing how many don't take the time to document things in their posts. Yes it takes time, but when you need to come back to something years later you can get it sorted out pretty easily.

Link to comment
Share on other sites

Coming at this from a software-engineering background, I think it is a mixed blessing. Commenting code is indispensible, especially if you are collaborating. Formatting helps also. But the way this language is structured, with some strangeness with formatting variables and managing inline functions, the paradigm takes some getting used to.

 

The code works- I revised the retract speed to a minimum value or a factor based on federate, whichever is higher- to permit increases in the process speed. Ran the code on a 6061 aluminum plate 0.75” thick with a form tap at 10-12 full-depth tap ops/minute, 240 holes total, with zero problems. No dwell was needed given the retract height, but because of the clutch in the tap head, never hurts to have a little buffer there in case the back-out takes a little longer than normal.

 

The only FYI I might suggest for anyone using this approach is to slightly decrease the feed to RPM ratio (maybe 1-2%), so that you have some margin if the tap doesn’t engage smoothly. This will allow the mechanism a little extension- well within the Tapmatic range before the reversal, in the case you have a slight imbalance in your head travel vs RPM process.

 

Appreciate the feedback guys- if anyone sees errors or has ideas for improvements, Im happy to make the changes/test/post the updated code.

Link to comment
Share on other sites

Coming at this from a software-engineering background, I think it is a mixed blessing. Commenting code is indispensible, especially if you are collaborating. Formatting helps also. But the way this language is structured, with some strangeness with formatting variables and managing inline functions, the paradigm takes some getting used to.

 

The code works- I revised the retract speed to a minimum value or a factor based on federate, whichever is higher- to permit increases in the process speed. Ran the code on a 6061 aluminum plate 0.75” thick with a form tap at 10-12 full-depth tap ops/minute, 240 holes total, with zero problems. No dwell was needed given the retract height, but because of the clutch in the tap head, never hurts to have a little buffer there in case the back-out takes a little longer than normal.

 

The only FYI I might suggest for anyone using this approach is to slightly decrease the feed to RPM ratio (maybe 1-2%), so that you have some margin if the tap doesn’t engage smoothly. This will allow the mechanism a little extension- well within the Tapmatic range before the reversal, in the case you have a slight imbalance in your head travel vs RPM process.

 

Appreciate the feedback guys- if anyone sees errors or has ideas for improvements, Im happy to make the changes/test/post the updated code.

 

Yes been over 20 years since I needed to worry about tapmatic heads so good to see you learn lessons I learned back then. You are correct in your thinking and thought process on them and hopefully your shop gets a machine that has sync tapping since I was not even aware they still sold machine that didn't have that as standard. When I was coming up your only choice was a tapmatic then came sync tapping and peck tapping. Then the threadmills started being developed and made. Keep on learning and growing your craft.

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...