What is the exact error message? Go to the Mach4 "Machine Diagnostics" tab and look at the limit switch indicators for the motor(s) on your Z axis. Do they turn on/off (green/red) when you press and release the limit switch (or jog the machine to where the limit switch SHOULD trip)? If not, can you move that limit switch to a different input on the SmartBOB? And which model of SmartBOB are you using?