Gcode parser problem

Hi, I am trying to use gcode generated by LightBurn to control a laser engraver attached to my Creality Ender pro. I realise that his is not a standard use for OctoPi/OctoPrint. The problem is with gcode lines such as
G0X20.547 Y50.299 F0
where ther is no space between the command and the parameters, this throws an error. Editing it to
G0 X20.547 Y50.299 F0
works okay. Reading gcode documentation, there is no requirement for the space (it just makes it more "wetware" friendly). I can fix the code with a text editor macro (or maybe a Python script), but it would be nice if there is a fix available within OctoPi/OctoPrint. Does anyone know of a plugin or similar to make this work?

Hello Alan,

Would you mind adding some details about the error, what throws it, does it have a text or number?

1 Like

LightBurn is not free software and they should offer a setting to output gcode with a space between the commands and the parameters.

That being said, this is most likely another Creality firmware anomaly (bug) and it could be fixed with a yet another Creality bug fixing plugin or it could be fixed by flashing a non-Creality version of the firmware.

To successfully write a plugin will require more than just one line of "bad" gcode. A complete file of gcode output (and the LightBurn input file) at least. Since I don't have (and will never have) a Creality printer and don't have a laser module for my LulzBot TAZ 6. Debugging of a plugin would require close cooperation.

If you put the failing gcode file on an SD card and (attempt to) print from that, does it work? Are you willing to try alternate firmware in your printer? Are you comfortable with using SSH on your OctoPi system?

This is certainly a Creality firmware issue. I've used Lightburn gcode via OctoPrint on many occasions.

Thanks to all for helpful comments. I too think it's a Creality problem. So far I haven't actually tried to print (burn) anything using LightBurn, I have been trying to see how much improvement it offers over the various free bits of software suggested. To date, I have only had it move the printhead around (or not). I think my best course is to write a preprocessor to put in the spaces the printer wants, I can then check that I can make it work before my trial period runs out.