Auto leveling grid error
I have a cartesian printer with an inductive sensor for z probing. I use an z max endstop as well. The whole auto-leveling procedure upon sending m32 Sx works. The sensor probes at 5x5 points and a transformation matrix appears in the log. Afterwards the z axis moves with x and y movements. But when I start printing sometimes the nozzle still hits the bed. I am pretty sure this has something to do with a wrong matrix which is the result of an error in the probing procedure.
After probing the last point of the grid, the carriage moves an extra amount away from xmin. The x location reported in repetier host does not change however (sometimes is even becomes a couple decimals lower). So when I move the carriage back to xmin it hits zero (in repetier host) before hitting the actual endstop. Why is this extra x move made after the probing? And why is the x location wrong after the probing? I have checked for mechanical causes but there is no slipping, blocking etc. Furthermore the extra distance is always the same. The extra move does not occur in y direction.
I suspect is has something to do with the probe xy offset. There is no y offset. There is only a x offset of +31.5 (the probe is located 31.5mm to the right of the extruder with xmin at the left of the bed).
What is going wrong here? I hope someone can help.