This forum is about the PathPilot software.
One supported add-on for the PathPilot software is "the USB I/O module."
This is not "any USB I/O module," it's this particular part:
www.tormach.com/store/index.php?app=ecom&ns=prodshow&ref=32616
It is enabled through the "USB I/O Module" checkbox on the Settings page.
The part uses M64 Px and M65 Pn codes to turn on/off relays "n"
Unfortunately, once "on," a relay will not turn "off" even if the program reaches M30, or if the Estop is pressed on the controlled machine.
What's extra dumb about this, btw, is that when Estop is pressed, the relay control button in the GUI stops working -- the relay stays on until I type a manual off command, or bring the machine out of estop and reset the controller.
I'd like to make it so that, when Estop is pressed or the machine reaches M30, the M65 Pn codes are sent to turn the relays off.
In the best of worlds, I can make this change without editing any files that PathPilot will overwrite when it updates, because I do install updates when they are available, and I do not like the idea of forgetting to apply some local change and then the relay-stop not happening.
However, if that can't be done, then a "minimally invasive" method would be better than a "maximally invasive" method. For example, if I could start a new Python module that polls the machine state, and if it finds the machine in Estop or not-running after being running, it issues the appropriate commands.