Can you try to reset the factory settings by going to MENU->Configuration. Then click on “Factory settings”, then “Save” and restart the machine.
Then try the Home Z to see if everything is working properly.
Please note that, depending on the series, some axis directions may be reversed after a “factory setting”. So keep your finger on the “Stop” button to stop immediately in case of a technical error.
If this happens, go to MENU->Configuration->Motors and you will find the buttons to reverse the axes in question. Don’t forget to save and restart after that.