I use a limit switch that is lowered via an air solenoid and it works well. I have a macro in Mach to do the required move, fire solenoid, move axis etc. I then have my post processor (Fusion) call an M code to do the deed.