Quote Originally Posted by brainscan View Post
The first M114 shows z -0.77 and after M48 z 9.23 which is much closer to what it should be even though it's in the same position when I issue the command.

I have no idea what the custom m code point thing is, I've tried raising it as a question on a few forums and no one has got back to me. I noticed it's in the main marlin code and was added a few months ago with absolutely no explanation as to what it does or how it affects the printer. I didn't want to comment it out incase it switched something vital off. I thought if it's in there with no explanation the developers must have felt it to be important. I will try what you've suggested and get back to you.
I edited out that comment about the CUSTOM_M_CODE. But I guess you saw the post before I did that. That code is benign if you don't send your printer an M851. I think it was in there to help the developer doing the bed leveling. It is in my code base (and everybody elses) too.

I think we want to concentrate on the G28 and the M114. That is the minimum code to cause the problem and we should be able to figure out what is causing your problem.