EDIT YOUR PROFILE HERE

Please or Register to create posts and topics.

LightBurn Software?

What's the trick to get the LightBurn software working properly with our boards? I tried it out tonight and the laser was kept on the entire time the design was cut (i.e. the laser did not turn off during travel moves). Apparently LightBurn is supporting >= GRBL 1.1e (which it looks like our boards firmware uses based on the github repo - v1.1e).  In their implementation,  M4 is used to enable the laser and then G0 is used to actually turn the laser OFF and G1 is used to turn the laser ON during cutting. Here are snippits of gcode from each:

Inkscape-generated gcode (controlled by CNCjs):

M3 S0
G90
G21
G1 F3000
G1  X25.6312 Y23.18
G4 P0
M4 S25
G4 P0
G1 F2000.000000
G2 X27.1004 Y22.5909 I0.5231 J-0.822
G2 X26.9541 Y21.1012 I-2.1839 J-0.5376
G2 X24.2921 Y19.4631 I-2.5756 J1.2036

LightBurn-generated gcode (controlled by LightBurn):

G00 G21 G17 G40
G54
G90
M4
; Cut @ 100 mm/sec, 20% power
G0X41.92Y46.57
G1X41.63Y46.96S200F6000
G1Y50.82
G1X35.46
G1Y53.82

Followed by videos of each:

Inkscape: https://photos.app.goo.gl/EjieEGcXreeQpRyC3

LightBurn:  https://photos.app.goo.gl/SioKU6YViqDXagxK2

The Inkscape-generated gcode works perfectly fine.  The LightBurn gcode turns the laser ON as soon as M4 is issued (or our GRBL fork doesn't respect the G0 gcode command per the official GRBL v1.1e release).  From https://github.com/gnea/grbl/wiki/Grbl-v1.1-Laser-Mode:

"M4 Dynamic Laser Power Mode:
...

The laser will only turn on when Grbl is in a G1, G2, or G3 motion mode.

In other words, a G0 rapid motion mode or G38.x probe cycle will never turn on and always disable the laser, but will still update the running modal state. When changed to a G1 G2 G3 modal state, Grbl will immediately enable the laser based on the current running state.

Please remember that G0 is the default motion mode upon power up and reset. You will need to alter it to G1, G2, or G3 if you want to manually turn on your laser. This is strictly a safety measure."

So it appears as though our version of GRBL doesn't conform to v.1.1e?  Or did our boards ship with a version of GRBL less than v1.1e?

Any help or insight would be appreciated.  Thank you!

Hi, our boards do use a modified version of the v1.1e. The modifications are: usb0 is swapped with usb2. The 8bits pwm variable is modified into a 16bits variable. The pwm code has been modified to implement 16bits with various pwm frequencies . The config bit has been extended with $28 to let you choose the pwm freq and mode. The rest is identical. I have send a gerbil to  the creators of LightBurn. Maybe the m3 and m5 codes have been swapped? Try to modify the Lightburn gcode and change the m5 codes and stream it via cncjs to gerbil. Let me know what you find. Cheers, Paul

Cheers, Paul awesome.tech

Would you have done anything to change the behavior of G0 and G1?  That is, according to the official GRBL v1.1e documentation, G0 movements should have the laser OFF whereas G1 should have the laser ON.  One thing I do need to verify is that $32=1 in my config.

Yes, Go is just movement without the laser switched on and you can easily test this to do a cut or engraving without any patterns/pictures but with a relative home (g0 X0 Y0) or edit a text file with G0 xy coordinates. Also the laser can not turn on when the motors don't run and the power adjusts when the machine runs slowly (cornering sharp corners) so you don't get burnt corners.  $31 is set to 1 by default. You can play around with pwm settings in $28 (default 0)

Cheers, Paul awesome.tech

Ok Paul:  I have verified that I'm running v.1.1e and I reflashed the grblUpload.ino.with_bootloader.hex from https://github.com/paulusjacobus/grbl/tree/master/build onto my board (.hex upload date September 2017).  I'm using stock $$ settings with a K40 and for some reason G0 is not being respected per the v.1.1e docs.  G0 moves are to have the laser OFF and G1 moves are to have the laser ON.  M4 should not turn the laser light ON per the 1.1e docs (it should only enable laser control) but it does turn the laser light ON in my case.  I would really like to diagnose why my controller is not working properly with the Lightburn software but everyone else's apparently works with Lightburn.  Is there by chance a newer .hex file that I should be using instead of the one up on github?  Could you by chance send me your .hex file?  My email is sgraber@gmail.com.  Thank you!

FYI it took a bit to figure out how to compile the grbl source code on your repository, but I finally got it to compile using your instructions:  https://github.com/paulusjacobus/grbl/wiki/Compiling-Grbl.  The key was that I had to install the latest Arduino IDE, add the 328PB boards using https://github.com/watterott/ATmega328PB-Testing, and then select ATmega328PB (not sure if I should use Crystal Clock, External Clock, or Internal Clock tho), and it finally compiled.  I have not uploaded and tested yet though as I am away from my laser cutter for the  next several days.

Any help would be appreciated.  Thank you!

 

Hi Sgaber, I have send you the hex file and for those after this, here is the download file

Cheers, Paul awesome.tech

I have Lightburn and LOVE IT! when i installed and setup lightburn for the first time (windows) it had a option for pre-configured drivers/boards and in the list of manufactures/makers there IS an option for Paul's GERBIL. I selected it and my K40 has worked great since. however when i try to get a grey-scale image from lightburn (streaming or saved gcode) the k40 seems to lag out and run VERY slow, i am not sure what is causing this? any ideas? if i was to guess, maybe windows usb drivers or just shitty windows? i will experiment and attempt streaming via Linux they seem rock solid on usb streaming gcode.

Hi, I am new in this forum and newbie with GERBIL as well. Installation was a piece of cake, and I also installed LightBurn. I am really happy with both.

Anyway, I made the same experience like Devo, rasterized images perform quite slowly in LightBurn. In LightBurn, I have installed the GERBIL machine preset (wow!).

Maybe it's a problem with my own brain's firmware 😉  ,  as LightBurn is very powerful, with many parameters. I will continue playing around. But if there is some configuration issue, I would be very interested in a solution.

You should be able to search and replace M03 with M04 and it should run.

M03 does not fire the laser for our boards.  M04 is dynamic mode and needed to fire the laser and M05 will turn it off.  What this dynamic mode (M04) does is to adjust the power based on velocity changes when coming to a corner.  Someone's website (un-named) is stating incorrectly that smoothie is the only controller that accounts for this and does not burn corners.  It's not true with the latest grbl.

Quote from sgraber on February 24, 2018, 4:15 am

FYI it took a bit to figure out how to compile the grbl source code on your repository, but I finally got it to compile using your instructions:  https://github.com/paulusjacobus/grbl/wiki/Compiling-Grbl.  The key was that I had to install the latest Arduino IDE, add the 328PB boards using https://github.com/watterott/ATmega328PB-Testing, and then select ATmega328PB (not sure if I should use Crystal Clock, External Clock, or Internal Clock tho), and it finally compiled.  I have not uploaded and tested yet though as I am away from my laser cutter for the  next several days.

Any help would be appreciated.  Thank you!

Great info sgaber, did you ever figure out which clock to set, I'd assume you would use crystal.  Still learning arduino myself.

Forum Registration

EDIT YOUR PROFILE HERE