Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on September 09, 2016, 02:07:24 PM

Title: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 02:07:24 PM
Ok, so yesterday i had a great run on the mill, one part, 6 tool changes, perfect result.

Tonight was a simple part - face, spot, drill 3 holes.

So, I set the ref's with my Haimer, the face cut works nicely, good finish, requests the spotting drill, drill fitted, Z drops to below the vice and then proceeds to snap my nice new bit off by ramming it into the back of said vise :( Much language and head scratching follows. I did hit the big red button but was too late to save the bit.

Ok, new bit fitted, ref'd the machine again, reset my co-ordinates, run the part again, facing cut took nothing off of course, just a whisper, spot drill requested again, fitted, this time i had my fist over the stop button, watched and yes it drops the Z way too low for the tool, stop pressed, give up for the night.

Now, had a glass of wine with me tea, and looking at the code (fusion 360 CAM) I see it is asking for a Z30 move BEFORE applying the tool offset !

Surely that is a crap error - the previous tool was shorter than the spot drill and the height it was heading for was correct for that tool of course but put the longer spot drill in and - snap.

Just so i know where to head, is this a Fusion 360CAM error, post error or just me being a twat ( I doubt it this time though )

Surely it MUST apply tool offset before commanding ANY Z axis move?
Title: Re: Code wrong?? Broken tool :(
Post by: garyhlucas on September 09, 2016, 02:22:40 PM
On other CNCs the H word called tool length offset, not to T word. I see an H word after the XY moves. Just grasping here.
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 02:34:18 PM
This might help, its the raw code, first op works, second op fails. The placing and format of the G43 seems wrong in 2nd op??

Code: [Select]
(FACE3)
N20 M5
N25 M9
N30 T12 M6
N35 S3000 M3
N40 G54
N45 M7
N55 G0 X136. Y7.5
N60 G43 Z22.5 H12
N65 Z2.
N70 G1 Z-1. F900.
N75 X-20. F1400.
N80 Z-2.5
N85 X136.
N90 G0 Z22.5

(DRILL1)
N100 M5
N105 M9
N110 M1
N115 T3 M6
N120 S3000 M3
N125 G54
N130 M7
N135 G0 Z30.
N145 G0 X15. Y7.5
N150 G43 H3
N160 Z5.
N165 G98 G81 X15. Y7.5 Z-4.5 R-0.5 F535.
N170 X58.
N175 X101.
N180 G80
N185 Z30.

Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 02:38:52 PM
Just read through a much larger job i did yesterday and the G43 line is ALWAYS G43 Z30.0 Hxx

SO something is upsetting the post it seems.??
Title: Re: Code wrong?? Broken tool :(
Post by: Stuart on September 09, 2016, 03:10:36 PM
Hi

If it helps I had the same problem with Mach 4 and fusion360

It's the z move in the g43 line

It should not be there so Mach support told me

The code should be
G43 H12
Z22.5




Its based on a tormach post with the root from a haas one

Stuart
Let me get on the iMac and I will post it

stupid forum software
change the .txt to .cps
put it in your personal post folder ( don't know where it is on windows )

Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 03:16:21 PM
So your'e saying all the other code is wrong and this one is right, but backwards?

All the posted code i have has G43 Zxx Hxx format and works ok, this one has the Z before the G43 so must be wrong?
Title: Re: Code wrong?? Broken tool :(
Post by: Stuart on September 09, 2016, 03:19:32 PM
mine was failing after two tool changes , two was ok
ran a job today with 5 tool changes and all was OK

Stuart
Title: Re: Code wrong?? Broken tool :(
Post by: Stuart on September 09, 2016, 03:22:49 PM
sample code only a two too job

Title: Re: Code wrong?? Broken tool :(
Post by: Hood on September 09, 2016, 03:27:44 PM
After a tool change you should not have any Z movements until you have called the tool height offset.
Not sure whether it matters if there is a Z call on the G43H line  but my BobCAD post puts a move there and there are no probs, for example
N01 T75 M6
S1400 M3
G0 G90 G54 X26.678 Y24.157
G43 H75 Z25.4 M8
Z5.08


Hood
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 03:28:58 PM
Its odd, i have other code that uses the same tool and it works ok, i have messed with just about all the settings in this part and just cant make it get that line correct.
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 03:30:01 PM
After a tool change you should not have any Z movements until you have called the tool height offset.
Not sure whether it matters if there is a Z call on the G43H line  but my BobCAD post puts a move there and there are no probs, for example
N01 T75 M6
S1400 M3
G0 G90 G54 X26.678 Y24.157
G43 H75 Z25.4 M8
Z5.08


Hood

That is exactly what my meagre G-code knowledge is telling me too, but Fusion has other ideas and I have less tools now :(
Title: Re: Code wrong?? Broken tool :(
Post by: Stuart on September 09, 2016, 03:37:12 PM
Mach support told me the same about the z move , when I sent in a bug report for 3155 ver mach4
That's why I got into the post code and made it do as I wanted , fusion also was not putting a m5 in yo stop the spindle before the tool change that was also put in to the cps file I posted

But as always test cutting air

Stuart
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 03:42:58 PM
I have posted it on the Fusion forum, I cant see anything that can be edited in the post - it seems tool-specific for some reason it does not like my spot drill anymore but did a day or so ago :)

Pisses me off because it a was a new tool too.

Air-cutting probably would not show much as the error was only about 15mm - difficult to see with not toolholder mounted.

Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 03:46:13 PM
Just spotted another possible error -

in the first segment - the one that works, the code rapids to X & Y then drops the Z

In the second segment - the crap one, the code drops the Z then rapids to X & Y - just right to make a nonsense out of the clearance plane and mach into your clamps and fixtures :(
Title: Re: Code wrong?? Broken tool :(
Post by: Stuart on September 09, 2016, 03:49:00 PM
Dave

I have edited the script for the actual cps file you do not have to change anything it's in the JavaScript

There are non user editable selections
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 03:57:12 PM
Is that the Mach4.txt posted earlier?

What do i do with it?

I'm still new to Fusion, and is it ok with Mach3??
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 09, 2016, 04:57:23 PM
I changed the file extension to .cps and tried putting it in various places but Fusion does not seem to want to load it??
Title: Re: Code wrong?? Broken tool :(
Post by: Stuart on September 10, 2016, 02:03:53 AM
You need to put it in your personal post folder on your pc , do a search for autodesk , in there is a folder called post, then when you create your code select personal post in the top drop down

As I said I do not use only Mac
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 10, 2016, 03:16:52 AM
Im on a MAC too, I put it in the Autodesk-Fusion 360 CAM-Posts folder but no luck, i cant see any personal post folder anywhere.

Yes heights are good, I have cut several complex parts with many tool changes and all have worked ok.

If i post each step as a single file it works perfectly, if i post this step and the one after it - it works, if i post this one and the step before it it fails???

Can you explain the Mach Bug please??

When i touch off I use a Haimer probe, I type 100 in the "current tool" DRO and the Z axis adjusts so i know it read the height from the table, then i read the ref points and zero each axis then run the code, the code always starts off with a tool change.
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 10, 2016, 03:32:25 AM
The guys on the Autodesk forum are on the case - its a post issue :)

There is an option in the post to use G28 or not, I chose not to use this as it homes the machine at the end of every job - this is pointless and if a long tool is mounted can even be dangerous as i have a large vise mounted at that end.

The problem is, it uses the G28 elsewhere in the post to know if the Z is up or not :(

They recommend a post edit for this and i have asked for it but don't know how long that takes?

I guess i could turn G28 back on and just press "stop" at the end of each part before it shoots the table way over to one side!

And yes I DO know there is a custom G28 park option in Mach BUT when you have stuff bolted down, studs and clamps sticking up etc, having the table shoot off anywhere at all at the end is dangerous - It just needs to sit there and wait for me.

And yes, turn it back on and it all seems to make sense, its the highlighted part that needs stopping....

Code: [Select]
(1001)
(T3  D=6. CR=0. TAPER=90DEG - ZMIN=-4.5 - SPOT DRILL)
(T7  D=7. CR=0. TAPER=118DEG - ZMIN=-22.5 - DRILL)
(T12  D=25. CR=0. - ZMIN=-2.5 - FLAT END MILL)
N10 G90 G94 G91.1 G40 G49 G17
N15 G21
N20 G28 G91 Z0.
N25 G90

(FACE3)
N30 M5
N35 M9
N40 T12 M6
N45 S3000 M3
N50 G54
N55 M7
N65 G0 X136. Y7.5
N70 G43 Z22.5 H12
N75 Z2.
N80 G1 Z-1. F900.
N85 X-20. F1400.
N90 Z-2.5
N95 X136.
N100 G0 Z22.5
N110 G28 G91 Z0.
N115 G90

(DRILL1)
N120 M5
N125 M9
N130 M1
N135 T3 M6
N140 S3000 M3
N145 G54
N150 M7
N160 G0 X15. Y7.5
N165 G43 Z30. H3
N175 Z5.
N180 G98 G81 X15. Y7.5 Z-4.5 R-0.5 F535.
N185 X58.
N190 X101.
N195 G80
N200 Z30.
N210 G28 G91 Z0.
N215 G90

(DRILL3)
N220 M5
N225 M9
N230 M1
N235 T7 M6
N240 S3000 M3
N245 G54
N250 M7
N260 G0 X15. Y7.5
N265 G43 Z30. H7
N275 Z5.
N280 G83 X15. Y7.5 Z-22.5 R-0.5 Q2.05 F454.
N285 X58.
N290 X101.
N295 G80
N300 Z30.

N310 M9
N315 G28 G91 Z0.
[color=purple][b]N320 G28 X0. Y0.[/b][/color]
N325 M30
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 10, 2016, 04:55:42 AM
Sorted - custom post installed, no more G28 at the end and the rest of the code looks much happier.

Will go and finish my part hopefully now :)
Title: Re: Code wrong?? Broken tool :(
Post by: Stuart on September 10, 2016, 05:48:47 AM
Dave
Pity you did not say Mac I could have pointed you to the location

For others
From finder

Your name
Autodesk
Posts
Title: Re: Code wrong?? Broken tool :(
Post by: Davek0974 on September 10, 2016, 06:15:13 AM
Thanks, a quick folder search found it, all working now, just tested and code works well.