I need both M7 and M8, not just one

I wish to turn on M7 and M8 before the cutting starts, and a few second delay after both would be nice too. I found the M8 or M7 switch in LightBurn, but it will not let me select both. M8 is standard for turning on the air, and I have an M7 relay for turning on the vacuum (and will turn on the fans after I build the cover).

Perhaps add M7 to Start Gcode field of Edit->Device Settings->Gcode tab.

Else create a macro in Console window to trigger this manually.

Great, I’ll try that once the software update finishes.
I see in another thread the line
G4 P9
to delay after the laser turns on. What is the gcode for just a brief delay before the laser turns on to allow the M7 switched vacuum system to get up to speed?

You could potentially use G4 for any delay. It doesn’t need to be after a laser on event.

Great, I’ll use that.

I’ve spent the evening poking about the internet looking for a good guide to programming in gcode. Do you have a suggestion?

In general, the LinuxCNC content is a great resource.

G-code Overview (linuxcnc.org)
G-Codes (linuxcnc.org)
LinuxCNC “G-code” Quick Reference

GRBL generally follows LinuxCNC conventions about g-code behavior so that’s a plus.

Thanks much for all of your rapid help
Be Well

At least in this case, you can’t use the automatic air assist control of LightBurn. M7 and M8 can separately turn on a relay, but there is only one command to turn BOTH off at the same time, M9. When you use the AA control of LightBurn, it sends an M9 after each layer, turning both off. And for the next layer, only one of them is sent again to turn the air on.
I think, even if you don’t use it, LightBurn always sends M9 at the end of each file. So you could try with start and end gcodes, but I guess those are useless because LightBurn will kind of overwrite those.

There is no chance of an easy solution to have the relays running longer than the project, I think.
You could alter each gcode file before sending it to the laser. But I think, the best solution would be a relay that is self-controlled that stays active a defined time after it has been turned off.

Thanks.
I don’t have multi-layer projects running just yet, so I’m OK for now. Learning where to write the gcode for things I want done prior to starting the laser has been a good step forward in learning LightBurn. I notice that the air does not turn off for a PAUSE, so it seems a strange choice to turn the relays off between layers. Is there a way around that?

Right now there’s very little control of g-code generation. So if it’s not exposed as a toggle or setting then you get the default behavior for that device type.

This would be a delay-off relay. I added one to my salt water pool timer.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.