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:

Number of holes in canned cycle


Recommended Posts

Hello,

 

My boss would like me to modify the post to retract every 5 holes so we could do a check for some of our custom defined canned cycle.  To do this, I need mastercam to pass to the post processor the number of holes the canned cycle wil machine.

 

After opening the NCI, I could not find anything that contained the information for the number of holes.  I did see that each hole is defined by nci gcode 100.  I would like to know if there is a way for the post to count the number of Gcode 100 and put that value in a variable.  How would I go by to count the number of Gcode 100 in the operation?

 

Regards,

Link to comment
Share on other sites

Nope. There is no mechanism in the MP Language that would let you scan the NCI to "count" the number of holes. The best option would be to either use the "custom drill parameters", or the "Misc Values", and manually type in the number of holes in your cycle. The issue will of course be that you have to manually edit the parameter, any time you change the number of holes used in the cycle.

Link to comment
Share on other sites

You are going to need to define 5 holes for each operation. We have customers who have these requirements and best to have 500 to 1000 operations for the parts that have 2500 to 5000 holes. You could make a macro for the machine that would loop and call a sub program that would retract, but the problem will be it has to have the cancel drill cycle logic applied to it. It will then have to have the call back logic applied to it for the canned cycle and keep track of where it is running the program in the event someone hits reset you don't have to start over. The simple thing your boss is asking for is a recipe for disaster if not handled correctly. I would use a machine with tool life management and set a time for each tool. Now the machine is the one in control and does all of this for you.

  • Like 1
Link to comment
Share on other sites

You are going to need to define 5 holes for each operation. We have customers who have these requirements and best to have 500 to 1000 operations for the parts that have 2500 to 5000 holes. You could make a macro for the machine that would loop and call a sub program that would retract, but the problem will be it has to have the cancel drill cycle logic applied to it. It will then have to have the call back logic applied to it for the canned cycle and keep track of where it is running the program in the event someone hits reset you don't have to start over. The simple thing your boss is asking for is a recipe for disaster if not handled correctly. I would use a machine with tool life management and set a time for each tool. Now the machine is the one in control and does all of this for you.

 

 

Like it or not, this is the safest way.  I do this with force TC and ref points to move it where ever it needs to be.

Link to comment
Share on other sites

If your machine doesn't have tool management there are fairly simple options. Here is one option you can do without a binch of macro code or post edits:

 

1. Call a sub at each location. Mpmasrer has a sub call drill cycle.

 

2. In your sub build a counter, once it gets to 5 "GOTO" a line that retracts the tool and resets the counter.

 

3. "Resume" the .nc file.

 

4. If your controller doesn't have a resume function build anorher counter into your sub to keep track of total locations so you can restart at a line #. Edit post to only output line #'s on sub callout lines.

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

Hello all,

 

After struggling for many days, I have managed to have mastercam do what I want by using a counter in the post and use dill parameters to know the retract position for inspection.  Works as expected.

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