So, I'd like to head down to the shop to make a few fretboards for a customer but, we've got thunderstorms with plenty of lightning and wind coming through - conditions which have lead to brownouts and short blackouts in the past.
What I'm wondering is if anyone has any ideas on how to integrate a UPS into a CNC system.
My spindle is run from a VFD which runs for about 15 to 20 seconds after you un-plug it so I imagine it might run for a second or so under load.
When power is removed from the driver, the Z axis usually drops a bit. In case of a black out or an e-stop, the part is typically ruined due to the Z-drop.
So, I think the solution to protection from brown/black outs would be to run the system from a UPS. Upon power failure, or perhaps 500ms of total power failure, the system would immediately feed hold, retract to safe Z and shut off the spindle and then sit until the juice runs out.
If power returns before the computer shuts off, it would just be a matter of hitting stop, re-starting the spindle and doing a "run from here" to finish the piece.
Does anyone know how hard it would be to get the message to Mach 3 that there is a power failure and for that message to run a macro that would perform those tasks?
UPS's with USB connections are pretty common these days, I just bought one for my computer for I think about $65 or something like that. I haven't written a lick of code in about 15 years so I have no idea how one would go about writing a plug in for Mach to read the UPS status over USB.
Thoughts?