Issue with Custom G-Code in LightBurn - Missing S{power} in M3 Command

Hello,

I’ve encountered an issue when using the custom G-Code mode in LightBurn. In my custom start G-Code, I have configured it to execute the following sequence:

  1. M5 (Turn off the laser)
  2. G0 X{x} Y{y} (Move to position)
  3. M3 S{power} (Turn on the laser with the specified power)

However, when LightBurn generates the actual G-code, it does not include the S{power} parameter after M3 at the beginning of a cut. Instead, it sends:

M5
G0 X20.423Y12.728
M3 ; Missing S{power}
;Layer C19
G1 X19.954Y13.075F780

Since the S parameter is missing, my CO2 laser does not turn on properly and fails to cut. However, when moving between objects, LightBurn correctly follows the pattern (M5 → G0 → M3 S{power}).

Is there a way to ensure that LightBurn always includes the S{power} value in the first M3 command?

Thank you for your help!

Best regards,

maxime

Hello Maxime

By Definition, M3 command does not have a Svalue as is a On/off state command.

To use Svalue on M command you need a Laser mode enabled on firmware - and use M4 Sxxx command.

1 Like

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