If I wanted to fire a relay to fire a torch out of Mach3, how would I do that?

Let me explain. I have a 4x8 table I built. It's a Precision Plasma gantry machine, PM45, with CandCNC electronics.

The trouble is it won't stay fired while cutting. The signal that fires the torch flickers on on off during a cut. I've been through the whole lamp test thing (and yes, the lamp flickers when the torch cuts out). I don't really want to launch into a trouble shooting thing again. And I'm not going to keep replacing computer systems until one of them hopefully replaces something that fixes the problem.

The way I eventually worked around the problem was I wired up a hand-held momentary switch. When the torch fires, I press the switch and hold it down during the cut to keep it fired. All I'm doing is manually bridging the gap in signal.

I would like to replace me and my switch with a relay. That's all I want. I want to figure out how to fire a relay in Mach3. If I have to assign an M code, then fine. If I need to install another serial port, then that would be cool. I just want to fire a relay completely isolated from the CandCNC control box and it's outputs. But I don't know how to do that. And I was hoping someone could tell me how to do that. And I'm open to all kinds of solutions. I'll use a USB port or serial port ....or whatever, but I just want to turn a relay on and turn it off and I want it totally isolated from the CandCNC box.