Missing line in gcode causes Snapmaker to double boundary/frame size

Hello, I have the Snapmaker 2.0 A350 and found some setup guides to get this machine working with LightBurn. I have everything set up and it works! However, rather than dealing with Z offsets/material thicknesses, I prefer to export the Gcode and load it up into the machine (since the Snapmaker asks for material thickness during the start wizard and automatically adjust the Z height to the proper focal height above the material thickness (also prefer this method so that the machine doesn’t stop if communication is disrupted).

However, I’ve noticed that when doing it this way, the boundary/frame is actually doubling in size when I run it, so I can’t get things to line up quite the way they should. After comparing the file to one generated via Snapmaker’s software, I found that one line of the gcode doesn’t generate via LightBurn that causes this. The gcode from the snapmaker has a line called “;file_total_lines: ###” within the “;Header Start” section. When I add this line in and replace ### with the total number of lines of code, everything works perfectly. Is there any possible way to get this to to generate in the code without having to add it manually for each file?

@LightBurn I saw the update that came out for Lightburn today and am very grateful you guys included the total line count in the Gcode for Snapmaker. However, I was running into issues running boundaries/frames again and noticed that the gcode is missing the semicolon preceding the new line which is causing it to calculate incorrectly. The new line should be “;file_total_lines:” I apologize that I missed that in my original request.

I also noticed one more line that could be added that would be beneficial to others with Snapmakers just so they don’t have to edit the gcode file. I know time remaining isn’t always accurate, but Snapmaker includes the line “;estimated_time(s):” in their header as well and I know Lightburn can provide the estimated time in the preview. So, if at all possible, it would be great if this could be converted to time measured in seconds, and then have that line also generate in the gcode header. As an example, if the print was supposed to take an hour, the gcode header would contain this line: ;estimated_time(s): 3600

Regardless, thank you for all your hard work. Lightburn is really making my Snapmaker come alive!

I don’t have the system set up to compute a preview time for jobs, but I can make the header change easily. We’re going to have to do a patch fix release for some connectivity issues with Ruida, so this will go in there too.

No worries about the preview time for jobs; the total line count is what is more important to me as that fix will allow me to run the boundary/frame from the machine directly and accurately without the need to edit the file. I really appreciate you getting this into the hotfix. I saw from browsing through the forums that you didn’t have a Snapmaker which is why I really appreciate you helping us Snapmaker owners out! I’m still new to the software and working with lasers in general, but if you ever need anyone to test something on the snapmaker, feel free to reach out!

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