Layer by layer relay control

i have total of 6 relay controls
i use the following with projects -
relay for lights on/off
relay for circulating fan on/off
relay for exhaust fan on/off

i would like to know if there is a way to control relays per layer setting.

i do not want to always have the exhaust fan running if doing small vector/engraving projects but instead turning the exaust fan on when the cutting layer starts only.


Meet another electronics (industrial + consumer) dude. The short answer is no, pending verification by a Lightburn Guru. Those relays are controlled by “M” codes, and layers have nothing to do with the machine operation. They are more a drawing thing. IMHO, not having the ventilation ON for any burn is not a good idea. Notice I said “burn” and not “engrave”? By the way, pretty impressive setup for a DIY machine.

I kinda figured as much.
I submitted a feature request for such idea

I got an Ebay 40W and then built the frame and case with 20x20 extrusion.
I aslo have the bed raise and lower for rotary and thicker wood project.

I use the Grbl Edge version for 6 axis and modified to get 4 additional relays.
I have the same board on my 5 axis cnc machine and the additional relays are a great thing to have.

1 Like

In practicality Lightburn is a 2d laser control program. There are lots of grbl machines and many have non-standard uses. It has a ‘grayscale’ mode, that might bump it to 2.5d :face_with_spiral_eyes:

Lightburn does have the ability to control air assist depending on the controller that’s used. Even with grbl there are air assist code. I don’t think there is any area that you can embed control codes for separate layers. I’m not a developer, but do have a couple years in soft/hardware…

You can use this to enter control codes for start and end…

If you’ve posted it on feature suggestions then it will be read and voted on …

You should post some photos of it, there are lots of diy types here…


Power, speed, air assist settings and more are stored in those layers, so I’d wholeheartedly disagree with you.

Since GRBL itself has no specific / generic way to control anything external aside from the air assist (flood coolant) commands, LightBurn doesn’t either.

DIY 40W CO2 build (still in process) - external relay controls
post i made with pics

here is the suggestion i posted in “Feature Suggestion”
see at bottom of layer dialogue where ‘could’ enter “layer start/stop” commands
just like the tabs for start and end g-code commands but these would be for layers, not full job

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