Carving Self Destruct

Recently I built a MPCNC Router design from V1 Eng. And currently, use Easel and write the GCode file to an SD Card, everything works great till the end of the carving when the cutter returns to its home position. The only problem is that the cutter remains at carving depth and cuts a channel through whatever I have carved. When I run the simulation on Easel it shows the cutter lifting and returning to its home point. Below is a copy of the last few lines of GCode from a recent file. Hopefully, someone on the forum may be able to see a fault or has come across a similar fault to this.G1 Z-4.600 F508.0
G1 X105.644 Y132.512 F1000.0
G1 Z-3.525 F508.0
G1 X105.627 Y132.469 F1000.0
G1 Z-4.600 F508.0
G1 X105.508 Y132.158 F1000.0
G1 X105.490 Y132.104 F1000.0
G1 X105.483 Y132.084 F1000.0
G21
G90
G1 Z3.810 F508.0
G0 X0.000 Y0.000
G4 P0.1

Thank you and Regards
Graham

I’m no gcode expert, but what I read is (please anyone correct me, if I’m writing nonsense):
G21 – set unit to mm
G90 – set to absolute positioning
G1 Z3.810 F508.0 – make z axis go to absolute 3.81mm
G0 X0.000 Y0.000 – go to home
G4 P0.1 – pause

Your z axis is pointing upwards (regarding the 0,0,0 point), so here the z-axis is told: go to 3.81mm above your zero and that most likely is not enough.

I too am no gcode expert, but I will throw in my $.02 so maybe I will learn something also.
I see the Z at 3.81.
Its not much, but its a positive number and it should clear.
I personally go .5" (12.7mm) above
If he is still cutting a trench when the machine is moving to home, then it seams to me that there is a problem with where his Z zero is set.
Hoping I’ll learn something too.

I don’t know Easel, as I use UGS. I’d ask whether your machine handle a feed rate of 1000? GRBL will ignore gcode it doesn’t like in UGS. Also I put G20 and G 90 as my first lines of code. I also raise my Z up above my work and clamps. Lately about 2". Maybe put the G21 and G90 in first, change you Z to a higher number and cut some air…see what happens.

Also check that no lines contain a letter O when they should be a zero 0

I don’t use Easel either.
And yes, why isn’t the G21 and G90 at the beginning?
However, G21 is metric, so 1000mm is 40 inches per minute, which is rather slow.
But speed is not his problem.
I still question where his Z zero comes from.

Waiting to hear from a gcode expert.

1 Like

Have a look at my annotations regarding the gcode commands. I’m quite sure I got it right (at least f my Google search regarding the commands was correct) . Setting the mode to absolute and then making z axis go to 3.xmm will result in the described behaviour.

Suggestions for solving :
Set the 3.81mm of the last g1 command for the z axis to a value large enough it’s above your workpiece top.

Ps:
Now I get it, I misread the absolute value. I think you’re right. If his 0,0,0 is on top of his workpiece he should be fine.

The gcode looks good to clear your workpiece before returning to 0,0 assuming you zeroed Z at the top surface of your stock.
Because the gcode looks good, my first check would be that you’re not losing steps on your Z axis during the carve. If your Z axis is pulled into the stock when cutting, or, more likely, not retracting fully (due to lost steps) you’ll see what you’re seeing.

That’s an interesting point Neil.
Also, If his bit is not tight enough in the collet, it could “suck” down into the work.

1 Like

Thankyou Guys for your comments. I have tried carvings with 5 mm lift height, Tool is zeroed on top of the timber, collets are tight. The gcode in my original post is only a portion of the whole gcode file which is 3000 odd lines. all works great till the 3rd last line.
The machine/ Software does a great job right through the carving process except at the finish were it fails to lift clear of the work piece it remains at full carving depth and returns home. it is like that the G1 line does not exist.
I have tried open Open Builds Cam from the net with pretty much the same settings and it works fine. At the end of the carve it lifts the tool clear of the work piece and parks at that point. I may have to find another software package that is as user friendly as Easel

Hey @GrahamDuck, is the issue with Easel repeatable? When it plowed through your work, did you note the work Z height? If the machine “thought” it was at your retract height, you lost steps.
In general, gcode is gcode. There’s no reason that G1 would work any differently with one CAM software over another. Your controller will interpret it the same. Are you using Marlin?
You can always manually modify the gcode to ensure it clears your work and/or eliminate the return to XY zero.

Neil thank you for your time with this question. I have just done another carve eliminating the return to X Y as per your suggestion and all worked well. the carving finished the tool lifted the 3.8mm as in the code and remained parked at that point. As a point i took note of the final cut height (z axis -4.6mm) and it remained constant through the whole job.
So it looks like i just eliminate the last 2 lines of code and all is good.
Thankyou all again
Graham

Glad you had success. I’m still thinking you must’ve lost Z steps when you had it plow through your stock.
It might’ve just been a one time thing.
It’s your Z axis a leadscrew or just threaded rod? Nema 17?

Threaded rod on a Nema 17

Sorry no a lead screw

Do you know there torque rating for the motor? Or have a data sheet or link? Some Nema 17s work well for 3D printing, but struggle with the forces in carving.

Not sure Neil i purchased the items through Banggood in a set of 5 same with the router motor they are not big on info but just on another note just completed another small carving and all went well cutter lifted and parked. Originally the other carvings i had done all 3 carvings were destroyed by the cutter plowing through the finished items. Also all the carvings have been done with same cutter and feed rates. A mystery but all works with those last 2 lines removed from gcode.

Keep an eye on that Z lift at the end just in case, but, as you know now, it’s nothing to modify the gcode.

What controller are you using? Rambo? Smoothie? Or Grbl?

Neil Im using an MKS Gen 1.4 board Marlin firmware 1.1.9 and no way an expert at any of this but we are getting there

1 Like