Sign in to follow this  
LMcFadden

Adding Lathe Tool Radius Comment In Post Processor

Recommended Posts

I am making some modifications to my lathe post processor and would like the post to output the tool nose radius in a comment so I do not need to manually type the radius. I am using a MPLFanuc post with some basic modifications to it. Is there a command I can call to get this information from Mastercam? I would like to have a similar comment for grooving tool width as well if this is possible.  Any help here would be greatly appreciated. Thank youimage.png.429386de45ddc99ccdca45e814caefb7.png 

Share this post


Link to post
Share on other sites

You can hit your  dealer up for the MP docs.  This value is contained in NCI 20104:

image.thumb.png.ac91bdf5b0d5bd9b2dbd144e4140831c.png

image.png.ec798047ae810ca4c2d78a1ea134cd88.png

20103 is the insert name, for your "Tool Insert" line.

 

  • Like 1

Share this post


Link to post
Share on other sites

Thank you for the help. I am still a bit lost on how to output NCI 20104 as a comment. What should I be adding here in the post?

Thanks

Screenshot (15).png

Share this post


Link to post
Share on other sites

first, in your post search for "fmt" and create the following variable:

image.png.98d00dadcadab2d17da72442b2b96545.png

then in pparameter add the following to parse the 4th piece of nci parameter 20104 to the noserad variable you just created:

image.png.6c9c35809970948c9149d98e73a3f041.png

add this or similar to your ptoolcomment section:

image.png.fb3a9bfc44af3e60b4fdc2c4f7589b43.png

output will look like this:

image.png.056f242d0f888f0c6b973a36b7d24a81.png

This is the post I used:

image.png.8ed08878d18c70c9fe9d735ad772f7b3.png

It's a little easier if you're using a Postability post and will be done here:

image.png.3ba4145ad6efc95404e07497f032ddf7.png

 

I did this in a hurry to make you an example.  Let me know if you need more help.  Hope that helps!

 

  • Like 2

Share this post


Link to post
Share on other sites

redundant

Share this post


Link to post
Share on other sites
15 minutes ago, jlw™ said:

TBH, there may be a way in the tool table or pwrtt section that is easier considering all the new stuff in there but I haven't dug into that.  Maybe Dale or some one will chime in.

pnci20000$ is the preferred way to access the 20xxx and 30xxx range of parameters with the enhanced tool table.

You can also use opinfo and parse the returned string, but that method isn’t quite as efficient.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for bringing that up Zack.  I've used opinfo a lot but to get nose radius I have that method memorized.  Can you show either of the other two methods?

 

Share this post


Link to post
Share on other sites
50 minutes ago, jlw™ said:

Thanks for bringing that up Zack.  I've used opinfo a lot but to get nose radius I have that method memorized.  Can you show either of the other two methods?

 

The docs cover this pretty well, but here is an example of both methods being used.

insert_cr_pnci20000 : 0

pnci20000$
    if prmcode$ = 20104,
        [
        insert_cr_pnci20000 = rparsngl(sparameter$, 4)
        ]
        
insert_cr_opinfo    : 0

lsof$
    sparameter$ = opinfo(20104, 0)
    insert_cr_opinfo = rparsngl(sparameter$, 4)

    ~insert_cr_opinfo, e$
    ~insert_cr_pnci20000, e$

    #// Output ->
    #// insert_cr_opinfo .03125
    #// insert_cr_pnci20000 .03125

 

On thing to note; pnci20000$ will not run if the pparameter$ postblock is present in the post.  

  • Like 3

Share this post


Link to post
Share on other sites
4 hours ago, Zaffin_D said:

The docs cover this pretty well, but here is an example of both methods being used.

They certainly do, thanks for taking a moment to help out though.

  • Like 1

Share this post


Link to post
Share on other sites

jlw and Zaffin_D thank you both for taking the time to help. I followed your instructions and got the post working this morning.

Share this post


Link to post
Share on other sites
On 7/3/2020 at 2:05 AM, Zaffin_D said:

On thing to note; pnci20000$ will not run if the pparameter$ postblock is present in the post.  

I didn't even know about pnci20000$ :D Learning is an endless curve... ;) THX Zaffin!

  • Like 1

Share this post


Link to post
Share on other sites
On 7/6/2020 at 7:43 AM, LMcFadden said:

jlw and Zaffin_D thank you both for taking the time to help. I followed your instructions and got the post working this morning.

Did you go with pparameter or pnci?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 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