Quick update:
I have bidirectional communication over Modbus working between Arduino and MACH. Also macros in MACH reading commanded speed and sending that data to the Arduino which in turn generates a PWM signal to create a 0 to 5V ref which is converted to 0 to 10V thru an opto-isolator to provide the follow voltage for speed control using a VFD or equiv. motor control. All sorts of on/off relays can also be controlled via direct command from Mach or semi autonomously thru program logic in the Arduino.
Mach can read the registers in the Arduino, and then apply that data to any normal MACH use (control, DRO, etc). The Arduino can fill the registers based on data from any number of sources (MACH, sensors of all kinds, signals from drives, etc). I looked at the frequency generators mentioned earlier in this thread, but they would only be useful in running a spindle continuously and would not be useful in positioning , so for my purposes (hard tapping capability), that rout is a dead end (unless I am missing something).
During my research on this topic, I finally watched all of the MACH tutorial videos and also discovered a bunch of new/updated products. I have ordered a new programable digital accelerometer, the new Arduino mega board and a 4 line LCD to play with. I have had the idea for a long time to put a plc between some devices and Mach to supplement the capabilities of the system. An example is to monitor the spindle load and automatically slow the feed rate slightly to prevent a stall (hopefully with an e-stop) or overheating of the spindle motor. Also, since I cut a lot of aluminum and have broken many, many endmills when they clog up, spindle monitoring would save me a lot of money . . . .
I will need to do some testing to determine how fast a square wave the Arduino can generate . . unless someone has already done this and will post the info . .