I’m new to the forum, and new to LightBurn, so maybe I’m just doing something wrong here, but…
I’m using Marlin firmware, and the Trial version of LB. I’m noticing some errors with the gcode output, specifically when creating a Material Test in Inline Mode.
Issue #1: The first G1 command after a G0 command has the F segment running into the Y segment, with no space in between the segments
G0 X91.529 Y95.055 F0
G1 X91.605 Y94.473F1800 I S76.5
should be
G0 X91.529 Y95.055 F0
G1 X91.605 Y94.473 F1800 I S76.5
This is consistent throughout the file. I don’t know if it actually affects the movement, but it is somewhat annoying when trying to parse the file.
Issue #2: Inline mode doesn’t provide the correct syntax to actually turn on the laser in Marlin (v2.1.1)
Marlin requires a M03 I (or M04 I) command to enable the laser and put it into Inline Mode (M03 I = Continuous, M04 I = Dynamic). M05 I is used to exit Inline mode. LB does not include these commands in the gcode file. I was forced to manually include them in the User Start and End Code in order to make the LB output work properly.
Also, LB includes an I command in each line of G1 (and presumably G2 & G3) commands. Once the laser is in Inline Mode, these I commands are superfluous. The S commands in each line appear correct.
Issue #3 (probably not a bug, more I just don’t understand why this is the way it is): All G0 commands have a F0 command included.
G0 X91.529 Y95.055 F0
How does the machine move to the desired location when the feedrate is 0 mm/min? Or is this something to do with Fast Whitespace? (Note: Fast Whitespace was disabled when I created the gcode file)
Spacing does not play a role in gcode. You can remove all spaces, and it should be the exact same output. Spaces are ignored in parsing. It’s only made for better readability; maybe there is one space missing in the gcode generator.
This, and the other issues you describe, are most likely caused by the fact that there is no single Marlin variant available. There are so many, and especially laser control is handled differently in each. As such, LB supports one or a few flavors, but maybe doesn’t support yours correctly.
The best way is to create a “custom gcode” machine; then you can define the desired gcodes yourself.
When I said “parse”, I meant my poor brain being able to process the different parts of the command. Apparently the controller does a better job at that!
I’m not sure I fully understand.
Please correct me if I’m wrong, but if I create a custom gcode machine, wouldn’t I still have to define the “Gcode Flavor” as Marlin (same as selecting a Marlin machine), and wouldn’t I still have to add the proper M03 I/M05 I user defined start/end codes?
I’m not sure how this would be any different than what I have already done to make the Marlin machine work properly..
I never needed to deal with a Marlin machine and custom gcode options, but in general, you can overwrite commands with custom commands using this mode. So you can change how commands are handled / executed.