Well I think the best thing for you to do is to take a look at the videos. there is a macropump video that I think would help to tell you how we could get the controle to stop a program if an input changed. After that take a look in the customization manual for Mach2 (It is about the same as Mach3). And if you would like to post the flow of what you are looking for here I will give you a hand.
Welcome and have FUN!