Gcode from offline controller crash

hi,

i have a 15w laser led with grbl 1.1f.
In lightburn i have set my laser with GRBL supporting M4.
i save the gcode on SD card and when i want to launch this file with the offline controller, it crash, need to reboot arduino board.

haven’t tried yet to plug arduino board directly on computer.

any idea ?

thx

here is the gcode created :

G21         ; Set units to mm
G90         ; Absolute positioning


G90
M4
; Cut @ 1000 mm/min, 50% power

G0X25Y0
; Layer C00
G1X23.71Y0.03 S500 F1000
G1X22.44Y0.13
G1X21.19Y0.29
G1X19.96Y0.51
G1X18.75Y0.79
G1X17.57Y1.12
G1X16.4Y1.52
G1X15.27Y1.96
G1X14.16Y2.47
G1X13.08Y3.02
G1X12.04Y3.62
G1X11.02Y4.27
G1X10.04Y4.97
G1X9.1Y5.71
G1X8.19Y6.49
G1X7.32Y7.32
G1X6.49Y8.19
G1X5.71Y9.1
G1X4.97Y10.04
G1X4.27Y11.02
G1X3.62Y12.04
G1X3.02Y13.08
G1X2.47Y14.16
G1X1.96Y15.27
G1X1.52Y16.4
G1X1.12Y17.57
G1X0.79Y18.75
G1X0.51Y19.96
G1X0.29Y21.19
G1X0.13Y22.44
G1X0.03Y23.71
G1X0Y25
G1X0.03Y26.29
G1X0.13Y27.56
G1X0.29Y28.81
G1X0.51Y30.04
G1X0.79Y31.25
G1X1.12Y32.43
G1X1.52Y33.6
G1X1.96Y34.73
G1X2.47Y35.84
G1X3.02Y36.92
G1X3.62Y37.96
G1X4.27Y38.98
G1X4.97Y39.96
G1X5.71Y40.9
G1X6.49Y41.81
G1X7.32Y42.68
G1X8.19Y43.51
G1X9.1Y44.29
G1X10.04Y45.03
G1X11.02Y45.73
G1X12.04Y46.38
G1X13.08Y46.98
G1X14.16Y47.53
G1X15.27Y48.04
G1X16.4Y48.48
G1X17.57Y48.88
G1X18.75Y49.21
G1X19.96Y49.49
G1X21.19Y49.71
G1X22.44Y49.87
G1X23.71Y49.97
G1X25Y50
G0X25Y212.57
; Layer C00
G1X23.71Y212.6
G1X22.44Y212.7
G1X21.19Y212.86
G1X19.96Y213.08
G1X18.75Y213.36
G1X17.57Y213.69
G1X16.4Y214.09
G1X15.27Y214.53
G1X14.16Y215.04
G1X13.08Y215.59
G1X12.04Y216.19
G1X11.02Y216.84
G1X10.04Y217.54
G1X9.1Y218.28
G1X8.19Y219.06
G1X7.32Y219.89
G1X6.49Y220.76
G1X5.71Y221.67
G1X4.97Y222.61
G1X4.27Y223.59
G1X3.62Y224.61
G1X3.02Y225.65
G1X2.47Y226.73
G1X1.96Y227.84
G1X1.52Y228.97
G1X1.12Y230.14
G1X0.79Y231.32
G1X0.51Y232.53
G1X0.29Y233.76
G1X0.13Y235.01
G1X0.03Y236.28
G1X0Y237.57
G1X0.03Y238.86
G1X0.13Y240.13
G1X0.29Y241.38
G1X0.51Y242.61
G1X0.79Y243.82
G1X1.12Y245
G1X1.52Y246.17
G1X1.96Y247.3
G1X2.47Y248.41
G1X3.02Y249.49
G1X3.62Y250.53
G1X4.27Y251.55
G1X4.97Y252.53
G1X5.71Y253.47
G1X6.49Y254.38
G1X7.32Y255.25
G1X8.19Y256.08
G1X9.1Y256.86
G1X10.04Y257.6
G1X11.02Y258.3
G1X12.04Y258.95
G1X13.08Y259.55
G1X14.16Y260.11
G1X15.27Y260.61
G1X16.4Y261.05
G1X17.57Y261.45
G1X18.75Y261.78
G1X19.96Y262.06
G1X21.19Y262.28
G1X22.44Y262.44
G1X23.71Y262.54
G1X25Y262.57
G0X25Y50
; Layer C00
G1X26.29Y49.97
G1X27.56Y49.87
G1X28.81Y49.71
G1X30.04Y49.49
G1X31.25Y49.21
G1X32.43Y48.88
G1X33.6Y48.48
G1X34.73Y48.04
G1X35.84Y47.53
G1X36.92Y46.98
G1X37.96Y46.38
G1X38.98Y45.73
G1X39.96Y45.03
G1X40.9Y44.29
G1X41.81Y43.51
G1X42.68Y42.68
G1X43.51Y41.81
G1X44.29Y40.9
G1X45.03Y39.96
G1X45.73Y38.98
G1X46.38Y37.96
G1X46.98Y36.92
G1X47.53Y35.84
G1X48.04Y34.73
G1X48.48Y33.6
G1X48.88Y32.43
G1X49.21Y31.25
G1X49.49Y30.04
G1X49.71Y28.81
G1X49.87Y27.56
G1X49.97Y26.29
G1X50Y25
G1X49.97Y23.71
G1X49.87Y22.44
G1X49.71Y21.19
G1X49.49Y19.96
G1X49.21Y18.75
G1X48.88Y17.57
G1X48.48Y16.4
G1X48.04Y15.27
G1X47.53Y14.16
G1X46.98Y13.08
G1X46.38Y12.04
G1X45.73Y11.02
G1X45.03Y10.04
G1X44.29Y9.1
G1X43.51Y8.19
G1X42.68Y7.32
G1X41.81Y6.49
G1X40.9Y5.71
G1X39.96Y4.97
G1X38.98Y4.27
G1X37.96Y3.62
G1X36.92Y3.02
G1X35.84Y2.47
G1X34.73Y1.96
G1X33.6Y1.52
G1X32.43Y1.12
G1X31.25Y0.79
G1X30.04Y0.51
G1X28.81Y0.29
G1X27.56Y0.13
G1X26.29Y0.03
G1X25Y0
G0X25Y262.57
; Layer C00
G1X26.29Y262.54
G1X27.56Y262.44
G1X28.81Y262.28
G1X30.04Y262.06
G1X31.25Y261.78
G1X32.43Y261.45
G1X33.6Y261.05
G1X34.73Y260.61
G1X35.84Y260.11
G1X36.92Y259.55
G1X37.96Y258.95
G1X38.98Y258.3
G1X39.96Y257.6
G1X40.9Y256.86
G1X41.81Y256.08
G1X42.68Y255.25
G1X43.51Y254.38
G1X44.29Y253.47
G1X45.03Y252.53
G1X45.73Y251.55
G1X46.38Y250.53
G1X46.98Y249.49
G1X47.53Y248.41
G1X48.04Y247.3
G1X48.48Y246.17
G1X48.88Y245
G1X49.21Y243.82
G1X49.49Y242.61
G1X49.71Y241.38
G1X49.87Y240.13
G1X49.97Y238.86
G1X50Y237.57
G1X49.97Y236.28
G1X49.87Y235.01
G1X49.71Y233.76
G1X49.49Y232.53
G1X49.21Y231.32
G1X48.88Y230.14
G1X48.48Y228.97
G1X48.04Y227.84
G1X47.53Y226.73
G1X46.98Y225.65
G1X46.38Y224.61
G1X45.73Y223.59
G1X45.03Y222.61
G1X44.29Y221.67
G1X43.51Y220.76
G1X42.68Y219.89
G1X41.81Y219.07
G1X40.9Y218.28
G1X39.96Y217.54
G1X38.98Y216.84
G1X37.96Y216.19
G1X36.92Y215.59
G1X35.84Y215.04
G1X34.73Y214.54
G1X33.6Y214.09
G1X32.43Y213.69
G1X31.25Y213.36
G1X30.04Y213.08
G1X28.81Y212.86
G1X27.56Y212.7
G1X26.29Y212.6
G1X25Y212.57

You can run this in a simulator to check that it is doing what you’d expect.

https://nraynaud.github.io/webgcode/

The offline controllers that I’ve seen so far are really sensitive to how the code is formatted. They require CR/LF line endings (Windows style, not Unix), and won’t accept comments. I have a task on my list to allow saving GCode for this format, but it will take a bit of time to add the plumbing required for this.

it draw what i expect

here is the code generated with laserweb, there are comments but it works with offline controller, i don’t really seen differents between 2 gcodes

laserweb.txt (294.5 KB)

The difference that stands out to me is that LightBurn doesn’t include spaces between the G1 commands and the X Y coords, but LaserWeb does. You could try search / replace of X with ‘space followed by X’ and the same with Y, and see if that helps. You’re also missing the M5 and M2 commands from the end.

i have forgotten to tell you, i tried to remove space (much easier) in the laserweb file, and it works even without space
i really don’t know why lightburn’s code doesn’t work :thinking:

Unfortunately, without some kind of error message from the controller, or document about what kind of GCode it requires, I can’t say why it isn’t working. I looked at the file and it’s not the line endings - those are the same as LightBurn too.

got it !!!
i just opened the notepad / copy-past the gcode generated with lightburn wihout any change) and it works !!

i have tried with an other file … and it didn’t work

the only difference was the operating system. It seems to work with windows 10 64bit and don’t with windows 7 32bit

i tried once more windows 10 and it works one more time.

Perhaps it will work directly with lightburn installed on windows 10, but my trial period has expired on the windows 10 computer

@LightBurn
Does the informations help to fix this issue for future updates?
your software is really good, gcode really optimized, but it’s a little bit anoying when you have to do this for many files.

That suggests that the line endings are the difference. It’s not hard to change that.

1 Like

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