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:

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 

Link to comment
Share on other sites

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


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


add this or similar to your ptoolcomment section:


output will look like this:


This is the post I used:


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



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


  • Like 2
Link to comment
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
Link to comment
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

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

    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
Link to comment
Share on other sites
  • 2 weeks later...

Join the conversation

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

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.


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