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:

Generic Fanuc I/J Tap feeds


Recommended Posts

Hey guys,

We are currently using a generic Fanuc 4x mill post for our Brother machines. Currently it is setup to put out both an I and a J when we use a tap and we need to hand edit every time we post anything with a tap which we are trying to get away from. Here's an example of a posted program:

N110 T11 G100 G0 G90 G54 X-1.3225 Y-.0214 A0. S4000 M3 (  1/4-20 TAPRH +.003   )
N120 G43 H11 D11 Z7. M8
N130 M400
N140 M406
N150 G98 G77 Z3.93 R4.8381 J=IMP,PITCH? I=MET,PITCH?
N160 X1.3225 F200.
N170 G80
N180 M9
N190 G91 G28 Z0. A0.
N200 G49
N210 T11 M6
N220 M98P7999
N230 M30

We aren't really sure where to start, whether the post, machine definition, control definition or tool definition. Hopefully not something too difficult to fix for a novice post editor like myself.

TIA

Link to comment
Share on other sites

Thanks for the reply.

Hmm well it's not really "wrong" but we would like to not have to fill in the J or I every time.

Here's the canned tap cycle in the post:

ptap$            #Canned Tap Cycle
      pdrlcommonb
      result = newfs(17, feed)  # Set for tapping Feedrate format
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,
        prdrlout, "J=IMPERIAL I=METRIC", strcantext, e$
      pcom_movea

As far as I can tell there's not any misc drill parameters being used. We're kind of trying to use/edit what they've been using for years before we were here, so they likely edited things in the past. 

Link to comment
Share on other sites

Are you aware that there are multiple 'Tapping Cycles' listed in the Cut Parameters? There should be "Tap" and/or "Rigid Tap" options.

'Tap' outputs through 'ptap$' Post Block. Rigid Tap outputs through 'pmisc1$'.

--------------

First off, the very first thing you should do is make a backup copy of your Post. (Make 2, in different locations, for safety.)

Now that your Post File is backed up, open the Mastercam Code Expert Editor:

C:\Program Files\Mastercam 2020\Mastercam\Extensions\CodeExpert.exe

With Code Expert Open, press the 'Open' (folder) command button.

When the Open dialog box appears, change the "file type" drop down menu (should show .machine file), and change that to 'Post File'. (*.pst; *.set; *.psm….)

Navigate to the folder where your Post Processor is located. That is typically:

C:\Users\Public\Documents\Shared Mastercam 2020\mill\Posts

Select your Post, and it will open in the Text Editor.

--------------

Start by reading all of the comment lines at the top of the Post.

The MP Post Language is a 'column dependent language'. The Post File is essentially a "script", that is read from "Top to Bottom", when the Post is initialized.

The Pound Sign (Hash Tag) [#] is the "Comment Marker". Anything to the right of a # sign will be ignored.

The top of the Post File will have many comments. Most of these comments are instructions to you, the user, on how the Post works.

There are typically "switches" in the Post. These are variables, which control formatting, and enable/disable/switch between different output options.

For example, here is a 'switch' from 'MPFAN.PST', which controls the formatting of Tapping Output:

tap_feedtype       : 1     #0 = Units Per Minute (G94)
                           #1 = Units Per Revolution (G95)

-----------

So you may just need to select a different "Cycle" in the Cut Parameters of your Mastercam Drill Operation.

-----------

You may be able to configure the output of your Tap Cycle by just changing 'variable switches' in your Post.

------------

The last option would be "make edits to the Tapping Cycle Output', by editing the correct Post Block inside your Post.

But before I embark on that quest, I would make sure you've familiarized yourself with how the Post works, and make sure you've got it correctly configured, and you are using the correct tapping cycle.

Ok, so you're already familiar with the Post, and the Cycle output. That is a good start.

Are you just trying to hook up the Parameters in the Drill Cycle, so that you get the proper customized output? That is fairly simple to do.

Link to comment
Share on other sites

For that post, we just have the normal "Tap" cycle, which we have already edited above to have the I and J. We also have a "Rigid Tapping Cycle" which has this:

pmisc2$          #Canned Rigid Tapping Cycle
      pdrlcommonb
      #RH/LH based on spindle direction
      pbld, n$, sg95, e$
      pbld, n$, sm29, *speed, e$
      if met_tool$, pitch = n_tap_thds$  #Tap pitch (mm  per thread)
      else, pitch = 1/n_tap_thds$        #Tap pitch (inches per thread)
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,
        prdrlout, *pitch, !feed, strcantext, e$
      pcom_movea

So we always use the "Tap" cycle, and just fill in the pitch after I or J and delete the other. What we want it to do is just post out J=13 for 1/2-13 or I=1 for M6x1.... I would guess part of the problem is using a Fanuc post for a Brother control.. but everything else seems to work fine minus the tapping. But if we just aren't filling in a parameter correctly, that is definitely a possibility.

My coworker has been working to fix all of our posts so he knows more than I do, but neither of us are experts. All of our other posts are now configured properly but we haven't been able to figure this one out. 

Link to comment
Share on other sites

You would be making  a new address for the I or j.  

So instead of F.05 it would say I.05.

I would have to mess around in there to figure it out but someone here can probably remember it off the top of their head

It might look something like one of these it's probably not right where it says pitch whatever the code for feed or threads for inches.

result = nwadrs( "I", !pitch)
result = nwadrs( "I", feed)
  • Like 1
Link to comment
Share on other sites
4 hours ago, jwvt88 said:

For that post, we just have the normal "Tap" cycle, which we have already edited above to have the I and J. We also have a "Rigid Tapping Cycle" which has this:


pmisc2$          #Canned Rigid Tapping Cycle
      pdrlcommonb
      #RH/LH based on spindle direction
      pbld, n$, sg95, e$
      pbld, n$, sm29, *speed, e$
      if met_tool$, pitch = n_tap_thds$  #Tap pitch (mm  per thread)
      else, pitch = 1/n_tap_thds$        #Tap pitch (inches per thread)
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,
        prdrlout, *pitch, !feed, strcantext, e$
      pcom_movea

So we always use the "Tap" cycle, and just fill in the pitch after I or J and delete the other. What we want it to do is just post out J=13 for 1/2-13 or I=1 for M6x1.... I would guess part of the problem is using a Fanuc post for a Brother control.. but everything else seems to work fine minus the tapping. But if we just aren't filling in a parameter correctly, that is definitely a possibility.

My coworker has been working to fix all of our posts so he knows more than I do, but neither of us are experts. All of our other posts are now configured properly but we haven't been able to figure this one out. 

Are you using Mastercam 2018 or later?  If so you cannot output a metric pitch in an inch file or vice versa.  The only workaround I'm aware of involves using the API to query the tool to determine if it's inch or metric.

From the docs...

Quote

The meaning of this parameter changed in Mastercam 2018. Before Mastercam 2018, it indicated the units in which the tool was dimensioned. Beginning with Mastercam 2018, it indicates the system units as determined by the .config file. Tool dimensions are output in the units in which the part was programmed. For example, if you have a 12mm endmill and you are posting out an inch part, the value that is output to the NCI file (for example, parameter 20004.5) will be 0.4724.

Many pre-2018 posts use a statement of the following form to determine if a tool is dimensioned in inch or metric units:


if prmcode$ = 20007, is_my_tool_metric = rparsngl(sparameter$, 11)

This logic no longer works in Mastercam 2018 and later versions.

 

  • Like 1
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...