Hello Professor:
Sounds to me like this is a job for a PLC, but then I am just a beginner myself with the Brains. I would like to suggest you have a look at the Cubloc PLC,
www.cubloc.com. Pretty nice hardware for a very reasonable cost, as compared to Automation Direct.
I am using one to actuate panel buttons, Led's, and Mach screen buttons on my own mill retrofit. You still need to write Brains for the final input to Mach. The Cubloc PLC can run any kind of Basic, and/or ladder logic program you can dream up to tweak a Mach brain, plus turn a lot of stuff on and off; feedrate override Potentiometer (something I consider a necessity on a CNC mill), outputting to a LCD, or Mini touch screen, and more.
Regards,
John