Lightburn and Acorn 12

Is this possible? Lightburn seems a lot more capable than vectric in regards to laser work.

Absolutely! Many of us use it all the time for the capabilities you mention.
The process is to design as you wish, then send the GRBL G-code file out for CNC12 to use. (Lightburn does not control the laser directly.) There are a few things to watch for in the G-code output. I use a Notepad++ macro written by another Centroid user (SWord) to modify the G-code. @jjneeb has a custom G-Code device configuration that does this without need for any further modification.

Thanks, Id like to get my hands on that configuration app.

If you are interested in my LB preferences file, here it is: https://drive.google.com/file/d/1Q0Rkh8FLA5zMC_4QIjwVVs_qaY7lStG1/view?usp=drive_link

The latest versions of LB are pretty good about giving you flexibility in the Gcode output. I tried LB, LaserGrbl and Vectric’s laser module. I think LB is by far the best for pictures. For graphics/cutting I like Vectric’s design capability better, and you can combine laser and spindle jobs all in one file, and with the EX controller and deployable laser you can actually run it all in one Gcode file if that turns your crank.

Vectric’s laser picture toolpath is very easy, but that’s because it doesn’t have very many features so you just drop in a picture and you get what you get. Its quality is mediocre IMO.

Thanks Jim, pictures is really one of the things I want to do and while Vectric is an amazing piece of software, the picture laser tool is really lacking in my humble opinion.

Thanks @jjneeb – your tips and machine config helped me a lot with understanding Lightburn and Centroid.

Background

I have a dedicated Acorn/CNC12 stepper driven dedicated system using a J-Tech laser. I also have the 14w Avid laser on a Ex/Stepper Avid system though I haven’t used it much at all. As to why I haven’t used the Avid laser a lot – that is another topic beyond this synopsis… didn’t work well at all on Mach 4, deployment mechanism can be sporadic, tool changes on Ex forget the laser is deployed, … not important for this post.

The remainder of this longer post should apply to anyone using lightburn with Centroid – Avid or otherwise.

Note 1

I have a mixed view of Lightburn. There are many things it can do well, easily, and well beyond the vector and tooling handling of Fusion 360. I haven’t used Vectric products so can’t compare – I hear those products are great.

G-Code Only

When using Lightburn with centroid, your only option is g-code export. Direct machine control and more integrated features are not available. The weakness of their G-code generation is my main issue with Lightburn. You can define a custom G-Code generation device but you have little control beyond headers and line formatting.

Relative Mode

The g-code generators in Lightburn heavily favor relative mode (G91). It will always use this for a fill mode and most often for other operations. Think of fill mode as going back and forth to fill a shape, like a pocket milling operation.

There is nothing wrong with relative mode, but Lightburn won’t account for rounding errors. These especially happen when going back between imperial and metric measurements.

For example, consider you have line interval (milling tool stopover equivalent) of 0.1 mm, but defined in inches – 0.003937 inches. Their UI will let you enter this value, and will use it.

Consider a simple design with three rectangles, each 0.1 inches in X and Y.

A layer (tool path equivalent) is configured to fill the boxes using the 0.1 mm equivalent line width. It will generate a back and forth operation as shown in their preview dialog:

Looks great, right?

Devil is in the G-Code

If you look at the g-code it generates, it moves to X0Y0 in WCS coordinates, then moves to relative mode. Note Using Jim’s code here, sightly modified for my air assist.

;LightBurn Core 2.0.01
;Custom GCode device profile, user origin
;Bounds: X0.4819 Y0.3448 to X1.1756 Y0.4432

;USER START SCRIPT
;Generated for AVID EX Controller or Standalone CNC12

;Comment out this line if NOT using an AVID EX control system and its M6 macro
;T99 M6       ; Switch to Laser tool (this will deploy laser and turn on air in an AVID configured System)


;This next section is for CNC12 use on a NON AVID system or when not using AVID's M6 macro
G64 OFF            ;This will turn off exact stop mode.  It will leave smoothing alone.  Add ON or OFF if you want to set smoothing
M37                   ;Turn on Laser Mode
M35	; Turn on exhaust fan
M8	; Turn on air assist
G37 ON             ;This will turn on PWM Velocity Modulation
M3 S0                ; turn on the laser and set to zero power
G53 Z-6 F100    ; move to safe Z height

;go to work start position
G0 X0Y0 
G0 Z0

;USER START SCRIPT
G00 G17 G40 G20;Restore imperial mode
G54
G90;Restore absolute mode
G0 X0 Y0   
G91;Restore relative mode
M3 
;Scan @ 236.2205 in/min, 100% power

 
G0 X0 Y0.0008   
;Layer Speed 100 mm/s
G1 X0.1    S100 F236.22
G1  Y0.0039   S0 
G1 X-0.1    S100 
G1  Y0.0039   S0 

Move to X0Y0, go relative (g91), then go back and forth.

Notice the G1 Y0.0039 S0 line. After the first scan, move up a rounded value of 0.1mm in inches: 0.003937.

In this case, it will go back and forth, 26 times, to perfectly engrave the filled box as requested.

Now Move!

Time to do the next box. It is another square at the same Y position but with an X offset. Let’s rapid there:

G0 X0.2969 Y-0.0984   

Where did 0.0984 come from? Take our line width multiplied by 25

Add some rounding and you get 0.0984

So What?

So, your next box starts off 0.000025 inches off. No big deal, right?

Yes, a big deal. This adds up. Consider something that should look like this

and renders in CNC12 as this (**yes, I know these are slightly different designs, but look at the skewed geometry in the screenshot below)

Those shapes are not lined up in a nice grid. The text for each row isn’t aligned in the middle of the row as it is in Lightburn.

CNC12 will cut it as displayed – correctly and exactly what you are telling it to do.

So what can I do?

AFAIK, nothing without deep knowledge of these issues. You have little to no control on when lightburn uses relative mode (G91) and can not even force it to “reset” to a known position using G90.

If you understand all this, and use values that won’t cause any rounding errors, you might be able to work around it – until you get those wrong.

My Conclusion

These issues are widely reported and seem to be never fixed in Lightburn. Seems to also be the status quo in Fusion – widely reported and common bugs are never addressed.

I suspect the power users in Lightburn use direct machine control that doesn’t have these issues? But I don’t know – I don’t know how such a fundamental flaw can persist in what should be precise software.

That was interesting. I didn’t play with any images in Lightburn that were not picture rasters (because Vectric is much better in the design department for that) so I didn’t even notice the absolute coordinates coming back for some operations. I never really planned to replace Vectric for vector image design.

I did a bunch of picture scans and as far as I know it stayed in relative positioning all the time for that (after the first absolute move, which was actually part of my header and not due to LB’s hardcoded gcode format).

I think LB has been enhancing their Gcode output capability recently, but they should definitely give the user some control in the main Ccode (not just header/footer), and relative/absolute choice. I like the relative for picture scans because its more compact and a lot easier to debug.

For me, Vectric (and probably F360) is a LOT better than LB as far as generating graphic designs (and anything you want to cut), and the Vectric toolpath for lasers to engrave those is good.
However, the Vectric Laser Picture toolpath is very easy to use, but very crude, so it doesn’t really let you make high quality pictures. That is where I intended to use LB, just to basically make Gcode for pictures. It does a good job of that, but I do agree that more control of the Gcode format would be nice, and I would like to be able to resize images in terms of pixels (not just length), and to have passthrough mode allow you to adjust the line interval.
LB does have a nice pixel width adjustment feature that works well to make your pixels round instead of pill-shaped.

Another resolution thing to keep in mind is that you need to keep your line interval at an integer multiple of your CNC’s actual physical step size, or you’ll get periodic lines in your images due to the accumulation of error in the controller rolling over to an extra step once in a while. It can cause very noticible stripes on both axis’. I haven’t thought about this enough with repect to relative mode to know if it is worse, better, or the same as for absolute mode. When I upgraded to servos, I didn’t pay enough attention and didn’t realize that the servo chosen has a much lower resolution than the steppers I had. One of these days I’m going to do some real world stepper experiments to test this and then see if the high resolution servos make much visible difference.

Thanks Jim.

I haven’t done anything with image rastering, so can’t comment there. My main complaint with LB is that generated g-code can be so demonstrably wrong before even considering machine specific issues.

I don’t leave Fusion 360 unless I need to – another love/hate relationship there. But its handling of imported vectors (dxf, svg, etc..) can be so poor, rendering fonts to shapes often fails, the lack of a over scanning fill toolpaths are really limiting, I find myself trying to use lightburn.

Maybe I should consider vectric products but I have hesitated as I’m a) macOS b) heavily invested in what I do like in Fusion (parametric) and extensions, and c) can’t spend the time learning another platform.

Fusion is pretty great (despite the complexity and some headaches)

Vectric, comparatively is a lot “dumber” but I mean that as a compliment… For many simple things it’s just faster.

FWIW you can run it on a Mac in Parallels no problem, and the learning curve is really easy.

I do love (And use Fusion) for a lot of stuff, but having Vectric in your toolbox is really valuable.