My dust extractor is located outside my workshop and switched manually from inside the workshop. For a long time now I have considered switching it on/off from within a GCode file in a similar manner to the spindle.
By using a simple HID, USB, relay I can override the manual switch and control the extractor from my PC’s, USB port, from Mach3, without any direct connection to my CNC machine electronics.
Although I have only tried this using Mach3 I am sure the same thing can be done using Mach4.
The USB relay I have used cost less than $7 (inc. postage from China) and woks like a charm.
For greater things, these HID configured relay boards are available with up to 8 relays and of course, more than one board can be used (including with a USB hub).
Tweakie.