Have you searched over on the Mach forums for code?

It's not something I've ever done in Mach 3, but standard macros only run at a 10Hz refresh rate, so if you're relying on the macro to start/stop motion depending on the touchplate/probe input, then it won't work. You have to use the specific probing commands, but I'm not sure how they work where macros are involved.