Excellent, I was going to post today to say:

Sorry for the delay, after looking at my homing code I realised I was getting my scripts mixed up and thinking of the auto tool zero script rather than the homing, the homing by default is very basic and probably what you already have for that button code. So I was going to suggest my first post still apply, hardware/software issue.

Out of interest what control board do you use, also have you just installed/reinstalled Mach3 and that's why your card wasn't selected or something else?