Custom G code after laser ON but before any movement

Could you please add an option to be able to add custom G code right AFTER the laser ON / OFF command. In addition to the delay problems for diode lasers and plasma it would also make it possible to perform other routines such as probing Z, lift Z up before rapid and lower it after, etc. . Similar feature as currently the “Start GCode” as “End GCode” at the start and end on each job output, but this NEW FEATURE would be right after M106 / M107 and M03 / M05.
Currently, this has to be done by saving GCode → editing GCode → run which isn’t practical nor fast.
I would support this financially too, because I love your software. Please let me know if I can assist with this further (Gcode samples, etc)

I could see how this could be useful. But the way grbl works it could be a nightmare for a software developer. It would next to impossible to ‘debug’ something a user put in the stream in no telling how many places. Just supporting the original code would be problematic.

Gcode send a code for on and another for off for every ‘dot’, generates megabytes of data. You want to insert code in between these.

Sounds like a major bottleneck, but @LightBurn will have to comment.

Good luck :slight_smile:


Gcode is not rocket science. Lightburn already has the feature “Start GCode” in this case in could be called “Start Laser GCode” and would be inserted after the Laser ON command.

In my case (Marlin 2.0) when they call writeln(“M106”).

To have a editable Gcode post processor option in Lightburn would be even better, as different machines have different “taste” of Gcode.

From our ‘Feature Suggestion Site’ for Need to be able to Add Post Processors · LightBurn

Oz: LightBurn communicates with controllers in a way that’s pretty tightly coupled to the way the controller works. We’re planning to add a generic GCode generator, but it would not allow “live” connection to the machine the way LightBurn typically works.

Hi Rick,
Making a generic post processor capability doesn’t sound easy. That is why I suggested that in Lightburn to “copy” the “StartGCode” feature and “apply” it ideally before and after the “laser ON” command (M106 on Marlin) would be so much easier.

This would solve the laser/plasma delay problem with anyone with Marlin firmware (MPCNC, 3D printer with diode laser, etc).
I believe with this mod Lightburn would be the best software for 2D cut processes (laser, plasma or Dknife) in the huge Marlin community. Which would also mean more potential sales for you.

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