I had to dig WAY back in the OLD notebook for this one(;-). In theory yes you can look at DRO(19) (GcodeMode) and IF = 1,2or3 then DO a TOM routine and then fire the torch (DospinCW) . AND if Dro(19) = 0 then DoSpinStop() (shut off torch), IN THEORY. THe problem is in real life MAch3 does not update that dro reliably and MOST times it never changes state. It will in single block mode running 1 line at a time but NOT in run mode processing 1000's of blocks.
SO you loose control over the process.
NEXT problem the Torchmate files DO NOT have any Z axis motion code in them. That part was handled by the Torchmate Z controller based on THC values and Homed to Z when the torch was off. You could do some fancy code in the M5 macro to send the torch up to the Zhome (Top of stroke) every time it turns off or to a safe Z value POSITION + SafeZ incremental.
BUT you still have the dro update problem. AS that info was NEVER important to users of Mill/router/Turn that update has a very LOW priority and updates when it has time (maybe) I have seen it run 100s of lines of code and never update.
NOW the answer for them is not in hardware but in Cam software. If I remember correctly it IS possible in SheetCam to do an auto import/export Plugin that can convert a BATCH of files to the Mach3 plasma post of choice. THEN you NEVER have to worry about MAch3 failing a script again.
(;-) TP
(;-) TP