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:

Output stock to leave with toolchange


Recommended Posts

Good morning,

 

I am trying to output the stock to leave values whenever there is a tool change. If stock to leave = 0 then no comment should be output. I have the place in the post to mess with but I cannot figure out how to add these parameters into the tool change comment section....because this is a Boolean statement I am not sure what to do.

Any ideas? It makes sense to me to have the stock to leave values output with the tool change comment and NOT in the header as it currently is. I have tried copy pasting the "if then" logic into the ptoolcomment lines and it outputs Stock to Leave comments, but not the correct stock to leave values.

image.png.918b8b247d2a0d8948b3c55c1c2ed9b5.pngimage.thumb.png.5602aac006f72f4974d8e62cb4070190.png

Link to comment
Share on other sites
  • 3 months later...

You will need to add the logic in 'ptlchg$', and in 'ptlchg0$'. Don't try to do that output in 'pcomment', or those other blocks.

You're best bet is to download a copy of 'MPMaster' Post, and check out the 'pstock' Post Block.

The 'stock to leave value' would actually be captured in 'pparameter$'

           if prmcode$ = 10010, stock = rpar(sparameter$,1)     # Stock to leave in Z
           if prmcode$ = 10068, stock1 = rpar(sparameter$,1)   # Stock to leave in XY
           if prmcode$ = 12068, stock2 = rpar(sparameter$,1)    # Stock to leave in Z facing

I don't have time today to whip up the sample code, but check out MPMaster for some ideas. If you're still stuck tomorrow, I can whip something up...

 

      if stock > zero, "(", *stock, ")", e$

You'll need to add a Format Assignment (FMT Statement) for the 'stock' variable...

  • Like 1
Link to comment
Share on other sites

Look for this switch in MPMaster: (make sure it is on!)

stockleft    : 0    #Output stock to leave information on 2d contour/pocket/facing (0 = No, 1 = Yes)

like this:

stockleft    : 1    #Output stock to leave information on 2d contour/pocket/facing (0 = No, 1 = Yes)

or this:

stockleft    : yes$    #Output stock to leave information on 2d contour/pocket/facing (0 = No, 1 = Yes)

Variable Format Assignment: (change string if needed)

fmt  "STOCK LEFT: " 2 stock      # Amount of Stock left on drive surfs
fmt    2 check      # Amount of Stock left on check surfs
fmt  "STOCK LEFT: "  2 stock1     # stock to leave
fmt  "STOCK LEFT: "  2 stock2     # stock to leave
fmt    2 stock_walls       # Amount of Stock left on walls
fmt    2 stock_floors      # Amount of Stock left on floors

 

Link to comment
Share on other sites
2 hours ago, Colin Gilchrist said:

You're best bet is to download a copy of 'MPMaster' Post, and check out the 'pstock' Post Block.

That explains it....

If you can incorporate it into your post it is easy to use.

Federal Applications Manager, very impressive C, congrats.

  • Thanks 1
Link to comment
Share on other sites
15 hours ago, nickbe10 said:

That explains it....

If you can incorporate it into your post it is easy to use.

Federal Applications Manager, very impressive C, congrats.

Thanks Nick! It is the best job I've ever had, and I've worked at quite a few places...

It can be stressful, with long hours, but I've never felt so empowered or engaged. I'll look down at the clock, and hours have passed by. It is the polar opposite of many of the jobs I've had in the past, where you have no freedom or decision-making authority.

I noticed that the original post in this thread was back in October, 2021. Not sure if Metallic is going to respond to this one...

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