• Scam Alert. Members are reminded to NOT send money to buy anything. Don't buy things remote and have it shipped - go get it yourself, pay in person, and take your equipment with you. Scammers have burned people on this forum. Urgency, secrecy, excuses, selling for friend, newish members, FUD, are RED FLAGS. A video conference call is not adequate assurance. Face to face interactions are required. Please report suspicions to the forum admins. Stay Safe - anyone can get scammed.
  • Several Regions have held meetups already, but others are being planned or are evaluating the interest. The Calgary Area Meetup is set for Saturday July 12th at 10am. The signup thread is here! Arbutus has also explored interest in a Fraser Valley meetup but it seems members either missed his thread or had other plans. Let him know if you are interested in a meetup later in the year by posting here! Slowpoke is trying to pull together an Ottawa area meetup later this summer. No date has been selected yet, so let him know if you are interested here! We are not aware of any other meetups being planned this year. If you are interested in doing something in your area, let everyone know and make it happen! Meetups are a great way to make new machining friends and get hands on help in your area. Don’t be shy, sign up and come, or plan your own meetup!

Tips/Techniques CNC crash prevention

Tips/Techniques

Janger

(John)
Vendor
Premium Member
Argh. I've crashed my machine, shattered my carbide spot drill and bent my part all to heck, I then wasted an hour trying to straighten and face it flat again. I just need to start over with new material. I've done this a few times, or more, over the years and in each case I'm restarting the machine at an operation where the previous op used the same tool. Here are the two ops in Fusion using tool 4, first a chamfer, then an engrave op.


1755296315506.png


Since the second op is the same tool Fusion very unhelpfully and efficiently does not put a tool length compensation command into the start of the second op code. ie. no command like like line N835 below which is in the top of the first op.

N835 G43 Z0.6006 H4. <- tool length comp

Instead the second op looks like this with no preparatory steps, tool changes, tool length compensation, nothing. It's not needed after all...

(Engrave1) <-- I restarted the program here
N900 G0 X7.8029 Y-2.145
N905 Z0.6006 <-- here it crashed -
N910 Z0.2069
N915 G1 Z0.0394 F13.333
N920 X7.8047 Y-2.1573 F20.

I had the rapid at 5%, and I still couldn't hit stop in time. I think what happens is while I'm mucking about fixing something else then I lose the G43 mode somewhere - this time I was adjusting the G54 Z height as the spot drill was missing the part during the engraving. I used the probe and that probably cleared G43. I then restarted the op at line N900 and boom.

I can't come up with a fool proof way to prevent this. I don't see anything in Fusion for options to force tool change and tool length comp even if the tool is the same. I could edit the code to put those commands in, either in the text, or insert manually a step between the two opts, or rearrange the operations so it always changes tools. Or try to live and learn and remember next time, I did remember, I was being careful but impatient, and I still crashed it. These tricks are not foolproof and while I might do this for a while, in a year I'll make the same mistake since I've done this a couple times.

Thoughts?
 
Last edited:
So you could write the cycle to ensure the second operation uses a new tool. In your tool table there would be two entries for the same tool. T4 and its copy T5. This forces the machine to change tools and recalculate the offset. If theres a third operation, change back to T4, etc.
 
I must admit I haven't solved my tool length probing problem but how Fusion does things to me seems a bit confusing. Likely you can fix things so it doesn't screw up this way.

In the AlibreCAM (MecsoftCAM) each new operation results in a tool change and a separate file for each operation. There might be a way to combine files in one operation. I'll check into that.
In either case if I do this:

T04 M06 G43
The offset for Tool #4 stored in the tool table is combined with the current Zero Position and the Z value changes to reflect the new zero.

Now if I do a
G49
to remove offsets I see Z change even though I still have T04 loaded.
I then move in all three directions say also Z-1.0 to have a nice round number for math in my head.

Then I do another
T04 M06 G43

The system doesn't physically move since it remembers what tool is loaded so no need to go to the tool change position. What does change is the Z-1.00 position changes to -3.710 because the tool length is 2.710 in the tool table. ie. The spindle nose is now closer to whatever by -2.710 added to that -1.00 position.

Inside the MecsoftCAM configuration is the post processor code. A tool change is independent from the CAM side as it's machine CAM specific. Here's the EMC-Inch (LinuxCNC Inch) dialog. The variables like {SEQ_PRECHARGE] is blank so it doesn't contribute. [SEQNUM] starts at 0. [DELIMITER] is also blank. Finally we have T [TOOL_NUM] which starts at -1 but is set by the G-Code generation. The M06 and G43 are always part of a tool change.
1755308272844.png


So here's an excerpt example of a CNC program to create holes and face with three tools. The spelling mistake "Roughter" is not mine. Came that way.

%
N1 G17 G20 G40 G90
( BEGIN TOOL LIST )
( TOOL 2 - .250 Wood Roughter (1.040 Loc ) - DESC: 0.2500 DIA, 4 FLUTE, CARBIDE MAT )
( TOOL 4 - .750 Wood Roughter - DESC: 0.7500 DIA, 4 FLUTE, CARBIDE MAT )
( TOOL 3 - .250 4 FL ( 1.150 Loc ) - DESC: 0.2500 DIA, 4 FLUTE, CARBIDE MAT )
( ENDOF TOOL LIST )
(Setup 1)
(Surface Top)
N2 T2 M06 G43
N3 S20000 M3

Here's the CNC instruction menu.

1755309317845.png


This type of interface is what I would expect from Fusion.
 
So you could write the cycle to ensure the second operation uses a new tool. In your tool table there would be two entries for the same tool. T4 and its copy T5. This forces the machine to change tools and recalculate the offset. If theres a third operation, change back to T4, etc.
So put in a second physical tool of the same type in T5 and switch to that if I understand you?
 
So put in a second physical tool of the same type in T5 and switch to that if I understand you?
Yes, T4 and T5 are the same physical tool.

F360 has some odd behaviours - usually though theres a section in post somewhere that can be changed. In my post theres an M6 function, and a toolChange() function.

This ghost tool trick woks every time though.
 
Its in the post processor somewhere. Which one are you using?
Well the Fusion supplied one for HAAS TM1P, which is a general purpose one apparently for HAAS next generation controls. I've attached it for reference. I guess I need to try going through this file and see what could be adjusted.
 

Attachments

Yes, T4 and T5 are the same physical tool.

F360 has some odd behaviours - usually though theres a section in post somewhere that can be changed. In my post theres an M6 function, and a toolChange() function.

This ghost tool trick woks every time though.
no I don't follow how to apply this 'ghost tool' idea. So the first op uses T4, then the second op uses T5 with the same parameters as T4. What do I have in the machine in slot T5?
 
The same old T4. No need to change it. In F360 you select T4 for operation 1. Operation 2 uses the same cutter, but this time call it T5. T4 and T5 are identical in the tool table.

The cycle will run: Load T4; Run Operation 1; Load T5; Run Operation 2; Load T4; Run Operation 3; ... etc.
But you dont need to physically change the tool since it is unchanged, but the machine is told to load a new tool so it goes through the tool change as it normally would.

edit:
Ah - you have an ATC. So if you dont move the tool into position 5 you would need a second tool. That sucks. You would need to add a pause at the tool change to allow you to physically move the tool. My machine uses a collet system where every toolchange involves an M6 operation so every tool is measured after it is loaded.

In your case the only other option is a second physical tool.
 
The same old T4. No need to change it. In F360 you select T4 for operation 1. Operation 2 uses the same cutter, but this time call it T5. T4 and T5 are identical in the tool table.

The cycle will run: Load T4; Run Operation 1; Load T5; Run Operation 2; Load T4; Run Operation 3; ... etc.
But you dont need to physically change the tool since it is unchanged, but the machine is told to load a new tool so it goes through the tool change as it normally would.

edit:
Ah - you have an ATC. So if you dont move the tool into position 5 you would need a second tool. That sucks. You would need to add a pause at the tool change to allow you to physically move the tool. My machine uses a collet system where every toolchange involves an M6 operation so every tool is measured after it is loaded.

In your case the only other option is a second physical tool.
Oh ok I see what you mean. There is another way to do that. I can create another identical or 'ghost' tool in the Fusion library which might kick out the right code when it 'switches' to it on the next op. I'll try that...Thanks Arbutus with discussion on the forum problems get solved! well hopefully... I'll report back.
 
Or in your post add a pause (M0) in the toolchange function:

if ((tool.number > 200 && tool.number < 1000) || tool.number > 9999) {
warning(localize("Tool number out of range."));
}
skipBlock = !insertToolCall;
writeToolBlock(
"T" + toolFormat.format(tool.number),
mFormat.format(6)
);
// >>>>> ADD THIS LINE TO PAUSE AFTER TOOL CHANGE ---
writeBlock(mFormat.format(0), formatComment("Pause for tool change"));

This just writes M0 and a console message and waits for your button press to continue the cycle.
 
#solution

ok I got it figured out. It is not anything we discussed. The ghost second tool definition at the same tool slot number in Fusion tool library did not help. The post I think just ignored the second tool as it had the same tool slot number. But I found another option in the post set up in fusion, a check box. "Safe start all operations". That put additional code in the second operation block to change to the tool and reapply G43. I think that should do it. Hopefully I won't crash it again. Anyone running a HAAS or possibly any machine with a tool changer?... @Tom O


(2D Chamfer1)
/ N800 G90 G53 G0 Z0.
N805 M1
N810 T4 M6
N815 S5000 M3
N820 G17 G90 G94
N825 G54
N830 G0 X1.5258 Y-6.8129
N835 G43 Z0.6006 H4
N840 G0 Z0.2069
N845 G1 Z0.0887 F13.333
N850 Z-0.0512
N855 Y-6.8379 F20.
N860 X12.862
N865 Y-5.8339
N870 X1.0238
N875 Y-6.8379
N880 X1.5258
N885 X1.6045
N890 Y-6.8129
N895 G0 Z0.6006

(Engrave1)
/ N900 G90 G53 G0 Z0.
/ N905 T4 M6
/ N910 S5000 M3
N915 G17 G90 G94
/ N920 G54
/ N925 G0 X7.8029 Y-2.145
/ N930 G0 G43 Z0.6006 H4. <- extra G43 added
N935 G0 X7.8029 Y-2.145

The option is here on the machine and post setup
1755363621982.png

1755363574583.png
 
Last edited:
Back
Top