Need to see your switch and other settings.
If this system is using a smoothstepper, there are also smoothstepper plugin settings you need to setup.
Disable the Z axis home switch in ports and pins.Also, I can't for the life of me figure out how to set the machine Z zero. on my old PC when I hit refallhome it would zero Z at the current location, but I cannot figure out how I got it do that before...