Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: leaddennis on March 29, 2023, 04:39:14 PM

Title: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: leaddennis on March 29, 2023, 04:39:14 PM
Thank you for taking the time to read. I am new to mach3 and my new to me 6040. It seems that I have my machine running mostly other than this issue. When running my first code. A facing operation, my machine moves from 0,0,0 (Top face center) to the corner of my workpiece. Then the tool lifts about 3 mm to do the rest of the operation. The DRO shows z is at 0 still though. IDK I am coming from GRBL and never had this issue, also I was able to run the same gcode in Drufel with out this issue. It is probably simple but I just have no idea.
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: TPS on March 30, 2023, 02:30:58 AM
maybe your code uses a work piece offset G54 ..
or a M6 is included and it activates tool length offset.

without seeing the G-code it is hard to say.
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: leaddennis on March 30, 2023, 09:23:15 AM
Yep it includes a g54. Looks like I need to learn what that does. Am I safe to just remove it from my code?
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: TPS on March 30, 2023, 10:04:15 AM
open Config -> Fixtures an have look what offset's are in there for G54
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: leaddennis on March 31, 2023, 02:47:50 PM
you are correct, it was not 0,0,0, in my g54 fixture. Thank you.
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: leaddennis on March 31, 2023, 03:11:02 PM
After setting my g54 to 0 0 0 then taking g54 out of my gcode I still get the same issue. I am new thank you for teaching me. I think it has something to do with my tool length not being set idk though.
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: leaddennis on March 31, 2023, 03:49:17 PM
I took out my T1 line also my G54 line but get the same results :(
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: TPS on April 01, 2023, 02:36:17 AM
pls post your G-code
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: leaddennis on April 02, 2023, 10:51:42 AM
(OP1)
(T1  D=3 CR=0 - ZMIN=-6.25 - flat end mill)
G90 G94
G17
G21
(When using Fusion 360 for Personal Use, the feedrate of)
(rapid moves is reduced to match the feedrate of cutting)
(moves, which can increase machining time. Unrestricted rapid)
(moves are available with a Fusion 360 Subscription.)
G28 G91 Z0
G90

(Face2)
S1000 M3
G0 X31.95 Y-39.743
Z15
G1 Z5 F175
Z0.3 F33.3
G18 G3 X31.65 Z0 I-0.3 K0 F175
G1 X31.51
X-31.51
G17 G2 X-31.51 Y-38.002 I0 J0.87
G1 X31.51
G3 X31.51 Y-36.263 I0 J0.87
G1 X-31.51
G2 X-31.51 Y-34.522 I0 J0.87
G1 X31.51
G3 X31.51 Y-32.783 I0 J0.87
G1 X-31.51
G2 X-31.51 Y-31.042 I0 J0.87
G1 X31.51
G3 X31.51 Y-29.302 I0 J0.87
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: TPS on April 03, 2023, 03:12:59 AM
i am not the G-Code spezialist, but the begin of your code look's a bit courious for me:

(Face2)
S1000 M3
G0 X31.95 Y-39.743
Z15
G1 Z5 F175
Z0.3 F33.3
G18 G3 X31.65 Z0 I-0.3 K0 F175
G1 X31.51
X-31.51
G17 G2 X-31.51 Y-38.002 I0 J0.87
...

i would do this in this way:

(Face2)
S1000 M3
G0 Z15
G0 X31.51 Y-39.743
G1 Z0 F175
G1 X-31.51
G2 X-31.51 Y-38.002 I0 J0.87
...


first lift Z-axis then go to startpoint then lower Z-Axis ...
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: leaddennis on April 03, 2023, 09:12:57 AM
Thank you, I am still not sure what the issue is. I also have a demo of drufelcnc that seems to run this program with out issue. But mach3 gets through the first few lines. Moves to the corner lifts tool but then does not come back all the way down to the work.
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: TPS on April 03, 2023, 09:19:00 AM
it may depend on the G17 G18 plane selection.
those make IMHO only sense in combination with G40-G42.
but as sayed, i am a G-code specialist.
i never used somthing else than G17.
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: leaddennis on April 03, 2023, 09:20:18 AM
I may have to rewrite the code, It works in grbl on my other machine. This code was written in F360, I am no expert at f360 though. Thank you so much for your help.
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: TPS on April 03, 2023, 09:24:19 AM
had a quick look to the GRBL G-Code list. G17/G18 are not included, so they are ignored i think.
Title: Re: Mach3 is tool z lifts when running code. Tool does not touch work.
Post by: leaddennis on April 03, 2023, 10:11:13 AM
That makes more sense, thank you. Probably going to have to rewrite unless I take the g17 / 18 out right?