Thanks, you were spot on. I tried to lower the sensor so it was closer to the plate but it made no difference. I then put a thin washer on the plate and as the sensor passed over it worked! the motor stopped. Obviously its not a micro switch do you know how this sensor works e.g. magnetic read switch or some other?

Thanks for your help I'm back up and running.

Now to work out how to fit a fourth axis.