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:

Check For Multiple Calls of Same Tool


Jake L
 Share

Recommended Posts

I am currently modifying a MPFAN post to reformat the sub programs output. I would like the subprogram number to be 4 digits. Digit 2-4 = tool number, and digit 1 = call number. "Call number" meaning if T2 is called 3 times in the same program I'd like the first call sub number to be 1002 the second sub to be 2002 and third to be 3002. 

Is there a simple way to do this? My c++ brain is saying just make an array of all the tool numbers as you use them and loop thru the array every time you need to output a subprogram number to check how many times the tool has been previously used. But not sure if that code would be a pain to write into a post.

I also see that I could use pwrtt$ to pre-read all the tool numbers. So I could track how many times each tool is used and then somehow use that when I'm ready to output sub numbers?

Any info is appreciated! MC2023 TIA

Link to comment
Share on other sites
48 minutes ago, Jake L said:

Quick follow up, ended up using a buffer. Intimidating at first but not too crazy once I got into it.

For anyone with the same issue down the road:

 

Glad this Post of mine from 2016 found a willing audience! I can't tell you how rewarding it is to see people still benefiting from work I did 7 years ago...

3 hours ago, Jake L said:

I am currently modifying a MPFAN post to reformat the sub programs output. I would like the subprogram number to be 4 digits. Digit 2-4 = tool number, and digit 1 = call number. "Call number" meaning if T2 is called 3 times in the same program I'd like the first call sub number to be 1002 the second sub to be 2002 and third to be 3002. 

Is there a simple way to do this? My c++ brain is saying just make an array of all the tool numbers as you use them and loop thru the array every time you need to output a subprogram number to check how many times the tool has been previously used. But not sure if that code would be a pain to write into a post.

I also see that I could use pwrtt$ to pre-read all the tool numbers. So I could track how many times each tool is used and then somehow use that when I'm ready to output sub numbers?

Any info is appreciated! MC2023 TIA

C++, Posts, Buffers ???

We should talk. Do you like where you work and what you do? Opportunities abound.

Where in Western Mass? Springfield area?

  • Like 3
Link to comment
Share on other sites
11 minutes ago, Colin Gilchrist said:

C++, Posts, Buffers ???

We should talk. Do you like where you work and what you do? Opportunities abound.

Where in Western Mass? Springfield area?

Yes Springfield area.

I do enjoy where I'm at and what I do. The two biggest things I like:

1. I work side by side with my dad. I program everything he runs, we make a real kick butt team.

2. management gives me a LOT of freedom to do what I want. 

Because of this freedom I can program and run machines, write simple c-hooks, do a bit of post editing, and our hottest jobs usually hit my desk.

With that being said, I'll never turn down a conversation. Always looking to learn more and widen my horizons.

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