Hi Craig,
Its not that complicated actually, arduino is C based programming and i can do it (as long as its not too complicated) and as u know it has a wide resources for projects of all kind including communication with Mach4 via Ethernet. I will use arduino mega, ethernet and usb host board connected and its peripherals because i already start the machine with a fingerprint reader and arduino is controlling the power up procedure with relays. So it is already installed and later, through usb host i will add 3dconnexion 3d mouse to control the machine by wireless 3d mouse in all axis.
Arduino will watch the ac line with a voltage sensor so it will know the value of the voltage because in here sometimes it fall below 220V which is bad for electronics. Installed UPS will balance the voltage but if it takes too long to return to normal state arduino will interfere in that case too.
As u know some gcodes takes 9-10 hours to finish, with this setup i will be able to leave the machine on its own at nights so if lights out it will park and wait, when AC line comes back it will go on from the point which it stopped. In case of flickering in AC line or phase lost installed UPS take care of that. Its some kind of helpful automation ;-) installed UPS and batteries have enough power for running the machine about 10minutes with full functionality so it will give more than enough time to arduino for parking and recording the states of DROs, machine coordinates, gcode file, gcode line, etc. Arduino has external separate ups which holds it on for 1-2 days, so it will park the machine and shut down the power and wait for AC line to come back by itself.
Related with the signal glitch problem,
In this Delta VFD there is 2 outputs, 1 is a relay and 1 is an output signal(not relay), i connected the spindle at speed to relay output which is making that glitch so today i will change it with signal output and connect the relay to spindle at zero i think it will solve the problem because signal output does not make that glitch.
Regards,
Hakan