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:

Tool Change Macro- Tool Breakage Detection


cincy k
 Share

Recommended Posts

I'm trying to create a tool change macro that will pass a tool through my NC4 laser before a tool is used and after a tool is used, checking for proper gage length first and breakage second. I have the before setup on block skip /2 and after setup on block skip /3. Here is what I have so far and am encountering 2 problems. 

 

1) When a tool not used in the program was in the spindle the machine tried to run a breakage detection cycle instead of changing the current spindle tool out to the one needed in the program.

 

2) When is swapped spindle tools in MDI the machine no longer runs any of the cycles.

 

Any thoughts?

%O9006(TK CUSTOM M6-MACRO)#3003=1 IF[#3010LT0]GOTO1000 G53N10(PLC INTERFACE)#1114=1IF[#1014NE1]GOTO10(WAIT PLC ANSER) IF[#1015EQ1]GOTO300(SKIP M6 MACRO)  #1=#4003 #2=#4001 G91G28Z0 G49(TOOL BREAKAGE AT END OF TOOL)/2GOTO100G65P9301D.01N100G91G28Z0G91G30X0P2 G91G30Y0Z0P2 M29M6 M110 G#1G#2(TOOL BREAKAGE NEW TOOL)IF[#[10000+#4120]GT0]GOTO201GOTO202N201#3003=0G65P9301D.01#[10000+#4120]=0.#3003=1GOTO400(TOOL BREAKAGE EXISTING TOOL)N202/3GOTO400G65P9301D.01 GOTO400 N300 G91G28Z0 G49N400 #1114=0 N1000 #3003=0M99%
Link to comment
Share on other sites

What make of machine?  Also, why do you want to do it in the tool change macro?  You'll end up checking breakage on all types of tools that don't necessarily need to be checked because there is no chance of them breaking (chamfer mills, spot drills, reamers, etc...).  I built these routines into the misc integers of Mastercam so I can specify them for the individual operations and it has worked great.

 

Anyways, have you tried running the tool change macro in single block and checked exactly how the machine is reacting as it is executed, line by line?  I'm no expert in this area but that is what I would try first.

Link to comment
Share on other sites

Matsuura mx 520. Wanting to do it on the macro side because I believe I cannot pass the misc integers through camplete. Ideally I'd like to do it that way but don't think I can. I think I need to change a parameter to be able to single block through a macro call as is pass through the whole macro currently.

  • Like 1
Link to comment
Share on other sites

Matsuura mx 520. Wanting to do it on the macro side because I believe I cannot pass the misc integers through camplete. Ideally I'd like to do it that way but don't think I can. I think I need to change a parameter to be able to single block through a macro call as is pass through the whole macro currently.

 

If you use the 'manual entry' toolpath in mcx and then set that up as output as code, won't that 'operation' be read into camplete? I used camplete with x7 a few years ago on a robodrill, but I have probably forgotten most of what I knew. I have my haas (yes yes nowhere close to your mx520  :unworthy:) setup using an M45 for the toolbreak check. Could you not just do something like -

 

manual entry (M45, or whatever your control would need here)

toolpath

toolpath

manual entry (M45, etc)

?

 

edit: I see you want to check (actually measure, yes?) the length first, then do a break check after you run. I would think you could do the same thing, but you would use 2 different spare m codes... Like Bob said, building into the macro is going to do every single tool (which I imagine is not what you really want), but I could see by what I propose has you kind of jumping through hoops a little bit too.

Link to comment
Share on other sites

I'll have to get ahold of Camplete and see what I can pass through MC and into their software. 

 

What I am trying to accomplish is check a tool length prior to use to know that the proper offset was loaded from a presetter and then check a tool after usage for breakage. I would like to check every tool before it's used the first time to know it's been setup properly and then check most if not all tools for breakage. What I was thinking of doing is setting up the post from the tool presetter to output a .0001" in the height wear column and this would then get loaded when the offsets are downloaded. If the tool change macro sees a .0001" in the wear column it will run that tool through the laser and the put a 0 in the column. If the column is a 0 the cycle will not run to check for gage length first. I just need to take a baby step at this point which is why I'm trying to get this first part implemented with /2 and /3 for now.

Link to comment
Share on other sites

I am sure most of you are aware already, but Mastercam can program for your Renishaw probes using Renishaws productivity Plus. We have supported quite a few customers with this product so far and although there can be some setup process it works very well and is worth checking out if you don't want to deal with Macro language or the problems involved with writing code by hand.http://www.mastercam.com/en-us/Communities/Blog/postid/200/Introducing-Mastercams-New-Productivity​

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