On my EC400 I have a pallet pool, so in that case if a tool is broken I can just reject the whole pallet or skip to the next part on that tombstone/fixture/whatever.
I'm running a series of sub programs. Main program controls which pallets to run (reads from pallet pool schedule), from there it calls up a sub for each pallet, and the pallet program says which parts to run. If a tool is broken I just say M99 and it is back to the pallet program and the next part program runs, or if only one program on the pallet it goes to the cleaning cycle at the end, then on to next pallet.
Typing this out now, realizing this is not the best way to do it, but currently I'm using this in my tool break subprogram:
G65 P9853 B1. T#3026 H0.005 M200
If a tool is broken, length for tool 200 is set to 1. (#2200) Next line in my part program decides what to do.
IF[#2200EQ1]M99 to reject the part/pallet. Or if I want to rerun the next tool on that same toolpath:
IF[#2200EQ1]GOTO whatever N is the previous toolpath. (my post sets this # automatically)
(btw every toolchange the #2200 var is reset back to 0)
After typing this all out, I should do it a better way. The #8000-vars are used to manually expire a tool. Set to 1 and the tool is expired, no matter what the counts, limits, etc.
In the past I've used this:
G65 P9853 B1. T#3026 H0.005 M[6000+#3026]
This way the Renishaw program directly sets the correct 8000-var to expire the tool if it is indeed broken. (it adds 2000 to whatever value you specify for M, and sets that variable... M1 = #2001 for tool #1 length, or in my example, 6000+2000+tool-in-spindle = correct 8000-var) No messing around with tool offset variables. I'll probably change the rest to match this later, like:
IF[#[8000+#3026]EQ1]M99
I take it this is on your verticals? If running multiple parts on the table, or even trunnion, if you are using sub programs this helps. I've done this once in the past, where I dedicated a variable for each part which I could use to "flag" the part as bad, if a tool was broken on it.
I used M97 subs, so it's all in one program. In the beginning of each sub, if that part's dedicated variable was set to 1, it would M99 to jump back to the main/top and go to next offset+toolpath. At the end of each sub, I'd run a toolbreak check. If the tool is not broken, it calls M99 to continue on and go to next offset/part. If the tool was broken, it would flag the part bad, call a duplicate toolchange to grab next good tool, then M99 to the next part.
Here's a some code from an old program:
Code:
N1020
G40 G80 G90 G98
(FINISH BIG SURFACE AROUND OBROUND FIRST)
T1020 M6 (Tool # 1020: .125 Ball)
T19
G0 G90 G154 P1 X0.8501 Y-2.3949
S4278 M3
G43 H[#3026] Z2.23 /M8
#520= 1.
G0 G90 G154 P1 X0.8501 Y-2.3949
M97 P7007
/ #520= 2.
/ G0 G90 G154 P2 X0.8501 Y-2.3949
/ M97 P7007
/ #520= 3.
/ G0 G90 G154 P3 X0.8501 Y-2.3949
/ M97 P7007
etc.
then the subs:
N7007
S4278
(IF PART IS FLAGGED AS BAD, SKIP IT)
IF [#[500+#520] EQ 1] THEN M99
G103
M8
M3
G0 X0.8501 Y-2.3949
G43 H[#3026] Z2.23
<toolpath>
M9
M5
G0 G90 G53 Z0
G49 (CANCEL TLO BEFORE BREAK CHECK)
G65 P9853 B1. T#3026 S0.125 H0.01 M[6000+#3026]
G103 P1
(IF TOOL NOT BROKEN, THEN M99 EXIT)
IF [#[8000+#3026] NE 1] THEN M99(EXIT)
(IF TOOL IS BROKEN, FLAG PART AS BAD)
(AND SELECT NEXT TOOL FROM GROUP)
#[500+#520]= 1
T1020 M6
G103
M99
In this case I was using #520 to keep track of which offset I was on, vars #501-#510 were the flags if a part had a broken tool
Also, if you're clearing out a lot of stock, where a tool break early on might cause a collision with tool holder & stock, you might want a break check between Z-levels. Easy enough to overlook something like that.