Jobs stop after a short time (20sec - 1 min)

I’m trying to get Lightburn to work with K40/MarlinKimbra, but all the jobs stop after a short time. There’s nothing in the G-Code to tell it to stop as far as I can tell, it just says “stream completed in 0:21” (or however long it takes) in the console and the job just stops uncompleted. This happens if I select the design or not.

This sounds like a USB disconnection. Which version of Marlin are you using? (Is “MarlinKimbra” different than regular Marlin?)

It’s a Marlin Variant. You can find it at USB doesn’t disconnect. Or at least, there’s nothing that says it does. Just “stream completed”. The console really doesn’t give much info. I’ve had no disconnection issues with this board before. Also, the laser now fires when I move it via Lightburn, but not when moving between cuts during a job. Even just putting G28 into console has it fire when moving, then slowly decrease firing after it stops.

LightBurn uses a very specialized way of streaming GCode to the target machine to maximize throughput, so if Kimbra has a different serial buffer size than normal Marlin that could be an issue, or if it has a different way of responding to GCode commands, that would be an issue as well.

I can’t find anything on the site you’ve linked to that describes the inner workings of their serial protocol, so I would have to actually dig into the code to find this. I don’t currently have a way to disable this specialized sending in LightBurn.

So, what is the correct serial buffer size? I’m pretty sure I can change it.

For Marlin devices it’s set to 127 characters in LightBurn. If the MarlinKimbra firmware uses a larger buffer it should be fine, but a smaller one would cause problems.

When Lightburn connects Marlin sends this: echo:Free Memory: 4746 PlannerBufferBytes: 1472. Since 1742/8 = 184, it should be fine. I also tried slowing down the connection to 115200, but I’m still getting the same problem.

Planner buffer memory isn’t the same as the RX buffer. Plan buffer is GCode commands that have been parsed already. The RX buffer is for raw serial data - LightBurn keeps that full so the controller never has to wait for the next command to insert into the plan buffer when room opens up.

All Arduino based boards have a Rx buffer of 64 Bytes. There are ways to increase it to 256, which I’m looking into.

Edited to add: Upon further investigation the MarlinKimbra firmware has its own hardwareserial.h which sets the buffer at 128bytes. So, that may not be the problem. I’ll increase it to 256 and see if that helps.

I hadn’t been able to work on the laser for a bit, but tonight I tried saving the g-code and uploading it to the laser using Pronterface. That worked fine and the job continued until it was done. So, it looks like the problem may be on your end.

Marlin is officially supported; MarlinKimbra is not - I’m not familiar with it, and in general Marlin is pretty terrible for laser work - is there a reason not to use GRBL, which has specific laser support in the firmware?

Almost all the Marlin users I’m aware of are “stuck with it” because they’ve added a laser diode to a 3D printer. With a 40w CO2 machine, Marlin won’t handle corner engraving well because it doesn’t ramp the power with velocity like GRBL will, and Marlin’s GCode is really verbose.

I’m not stuck with it per se. It’s that we started with the Turnkey Tyranny Marlin variant w/ the Inkscape plugin. Mostly because there’s a good website that shows you how to hook it up to a 2 pin controlled laser power supply using a Ramps 1.4 board. Given I have no real experience building a CNC device, that seemed like a good place to start. But, there were issues with it combined with how you were basically locked into using both which seemed to defeat the purpose of having it open source.

GRBL may be an option. I’ll have to look into it.

Hi I have the same problem with standard marlin on creality board .vectors working fine but job is stoped after 20 second when I try engraving a image .There is any way to fix this? thanks

Which version of Marlin are you running?

Marlin 1.1.9 and I can resize buffer up to 64 from 16 but still stop the job in few second.

“Buffer”? do you mean the plan buffer, or the serial receive buffer? LightBurn assumes the serial receive buffer is 128 characters, but the plan buffer can be any length.

What is the default? We had a decent number of Marlin users, but I’ve never heard of it stopping after a few seconds when streaming. LightBurn’s serial comms attempt to keep the target RX buffer full at all times, so it keeps sending, even before it gets an ok, up to the known size of the target RX buffer. Yours is commented out, so what does that mean?

0 is default but 128 and 256 dosent change nothing keep stopping.I thimk is time for arduino now