Torch control g-code: need deactivated torch to activate and deactivate automatically

#torch control #g-code

My torch has a long lag time for cutting of the air before it will reignite torch. I am looking for an option to trigger torch at the end of each cut. I have tapped into a hand torch so normally you double trigger after a cut to disable the air flow. Is it possible for sheet cam to do this? I know the g-code commands are m3 and m5.

What control software? If you’re using mach 3, you can edit your m3 macro & add an extra torch off & torch on command in there.

I’m running openbuilds control on an arduino with v1.1

@Mike7 ,
I’ll add that normally the post flow air is intended to cool the torch tip so consider that aspect before making the change.

based on your controller, you should be using ‘GRBL plasma.scpost’ or ‘GRBL plasma no Z.scpost’. In either case, if you desire to ‘double trigger’ the torch at end of cut, then make this change to the post processor…

in OnPenUP() function…
change:
function OnPenUp()
post.Text (“M5\n”)
to:
function OnPenUp()
post.Text (“M5\nM3 S1000\nM5\nM3 S1000\nM5\n”)

btw…
Since you are using an Arduino board, IF it is Uno model and IF you have XYZ limit switches, then pin D11 is likely firing the torch. D11 is a PWM signal which is controlled by ‘M3’ AND ‘S’ (spindle speed or laser power) gcode word, so you should also make the following change…

in OnPenDown() function…
change:
post.Text (“G0”)
post.NonModalNumber (“Z”, pierceHeight * scale, format)
post.Text (“\nM3\n”)
to:
post.Text (“G0”)
post.NonModalNumber (“Z”, pierceHeight * scale, format)
post.Text (“\nM3 S1000\n”)

Thanks Lou for your help. Yes you are correct on everything for my setup. I have not done anything with post processor as I am slowly learning all this. I pretty much just lucked up and selected GRBL no z. I will definitely see if I can figure it out .