M665 problems

We are having a few problems trying to set our build height using the M665 command. The values we enter are not what are showing up on the screen. For example: We will do an M665 Z100 but when we look at the z height on the screen it will say z 25 or some other value (it changes each time we do it). When we go into the config override file and check the build height it is set at the 100 that we wanted. When we go to print it will just try and print up in the air. Has anyone else had problems with this? solutions?

Thanks

Imported from wikidot

I guess you have a Delta printer?
M665 is used to set delta configuration (diagonal rod, delta radius) and max z-height

There is a special line in the config for max z. I am not at my smoothie now so i can’t check.

What happens if you manually jog z to 0 and at the same time check height in whatever program you use?
Does the endstops work correctly?

From smoothie config:
;M665 allows you to set the diagonal rod length L, the delta_radius R, and Max Z all in mm. The L and R values are optional if you don’t want/need to override the config settings.
;Example: M665 L220.0 R113.8 Z244.0
M665