Problem with Z limit switch when trying to set up machine to Home

Check this these threads: