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:

Editing Post: Trying to output Overall tool length in Comment


Recommended Posts

Hey everyone,

 

I've been playing around with my MPFAN post and now I'm stumped. I've gotten as far as getting my post to output this comment on Tool Changes.

 

"( 1/2" ENDMILL W/ .06 RAD | SET TOOL LENGTH TO - 8 )"

 

But the problem is I'm using that 'tlngnote = tlngno$' as a guide and I've been trying to find the code for the tool overall length so it automatically posts out my Tool overall length to help my guys know how far to stick out their tools. We have setup sheets but you know people get lazy and tend not to look at them sometimes.

 

Could you guys possibly help me out and let me know what I'm doing wrong or if it's even possible?

 

Thanks in advanced guys!

Link to comment
Share on other sites

Hi,

 

Try this....

find this section and add the last line...(format new variable)

 

fmt "TOOL - "      4   tnote    #Note format
fmt "DIA. OFF. - " 4   toffnote #Note format
fmt "LEN. - "      4   tlngnote #Note format
fmt "TOOL DIA. - " 1   tldia$   #Note format
fmt "XY STOCK TO LEAVE - " 2  xy_stock #Note format 
fmt "Z STOCK TO LEAVE - "  2  z_stock  #Note format 
fmt "TOOL STICK OUT - "    2  oa_len   # k2csq7

 

 

Now find this section and add the "sdelimeter, *oa_len, " that you see at the end of the last line. (this is where it's output from)

 

ptoolcomment    #Comment for tool
     tnote = t$, toffnote = tloffno$, tlngnote = tlngno$
     if tool_info = 1 | tool_info = 3,
       sopen_prn, pstrtool, sdelimiter, *tnote, sdelimiter, *toffnote, sdelimiter, *tlngnote, sdelimiter, *tldia$, sdelimiter, *oa_len, sclose_prn, e$      #k2csq7

 

 

And finally find this section and add the last line. (This will actually capture the value for the tool being used)

 

pparameter$     #Read operation parameters
     #rd_params is used to call pparameter postblock and read the parameters of the operation specified in rd_param_op_no
     #"pparameter", ~prmcode$, ~sparameter$, e$
     if prmcode$ = 12025, rotary_axis2 = rpar(sparameter$, 1) #Capture the axis of rotation in Multiaxis Drill and Curve 5 Axis
     if prmcode$ = 20007, oa_len = rparsngl(sparameter$, 3)    #Capture overall tool length K2csq7

 

 

Use at your own risk rambo.gif

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