Laser Pause While Changing Power

Ooooo… Thank you MrWorf.

Thank you for your reply. I have learnt a lot from it.

I don’t have a Lightburn forum account but the initial replies to your thread don’t sound promising. Have fun keeping the record straight.

The next version of LightBurn will disregard lines starting with echo:, will be altering the logging function here as well to make sure all debug.log... calls prefix with echo: when applicable (errors will use error: since I feel they should stop you cold).

1 Like

Let me know if you find something where the response doesn’t start with echo. There was a standard reporting function that I believe always responds with error for the thing that was crashing for me. specifically when an invalid gcode is presented the fall through handler always responds with error or echo.

Maybe that next version of lightburn is enough.

I just caught up on the thread on the lightburn forum and while he added enclosure and echo is prefixes would you please ask him to add error as a prefix as well or was that already added. My initial takeaway was that it was not a recognized prefix.

Right now I pushed the change to debug.cpp which makes anything but LOG_E do echo:

And looking at the code, it would seem that Unknown command message is prefixed with echo: since it calls serial echo start:

void GCodeParser::unknown_command_error() {
  SERIAL_ECHO_START();
  SERIAL_ECHOLNPAIR(MSG_UNKNOWN_COMMAND, command_ptr, "\"");
}

@MrWorf was there anything else you have to do to enable inline laser power? I tried updating my firmware through your repo but the controller still seems to just stop the movement of the head to update laser power then continue.

You have to use a generic marlin driver with SM2.0, once you do, you’ll get access to change how the laser power is adjusted. Unfortunately my demo license expired and I haven’t had time to tinker more with this. But this should hopefully get you going.

1 Like

I figured out that my problem was not using the appropriate GCode for power inline. I found a workaround on the lightburn forum for post-processing GCode through using find and replace in notepad++ so that it uses the inline command, though that thread was from a year ago. Is there a button I’m missing in lightburn that outputs GCode compatible with power inline without using this workaround?

Yes, like @MrWorf said, you create a new laser device using Marlin and not Snapmaker. In the device settings then change the M3 power to Inline.

1 Like

Gotcha, I misunderstood @MrWorf 's reply, reading it as a firmware modification suggestion rather than lightburn instructions, my mistake. Thank you both for the information and clarification!

1 Like