Hi

I am a newbiie at this CNC lark, and have a Cheap Chinese CNC 300 x 400 Router.

I am using it with LinuxCNC, and I have followed the instructions on this site to set-up auto tool length adjustment using a probe.

This works fine when tested. I can st an initial tool length, move the head to a G54 start point, change the tool update the tool length, move to the G54 start point, and it is correct.

The problem comes when I run a file after setting the initial tool length. It cuts fine, but after it finishes, and LinuxCNC stops and I select tool change the head drives down!

The code I am using is:
(probe_tool.ngc)

O <probe_tool> sub

G49 ( clear tool length compensation)
G30 Z0 ( to probe switch)
G30 ( to probe switch)
T0 M6 ( to probe switch)

Which I understand should home the Z axis first then home the X and Y axes.

Does anyone have any idea what the problem is?
Thanks