Shoould I enable Gcode clustering

Older versions had enable smoothie clustering, now it says enable g code clustering, so I’m not sure ? I am trying to resolve a problem with photo engravings getting aseveral shifts on the x axis during and engraving I have tried tightening x belt , lowering acceleration in smoothie config file , slowing engrave speed to 190, was at 210 - 220 but I noticed when I went from 300 dpi to 600 it seams like it started this , just trying to find a solution ???

The original config file had acceleration at 3000, first I went to 2500, then 2000, then to 1800, now 1200

If you have a laser that support g-code clustering then yes. Else, no, as LightBurn will create g-code that your controller doesn’t understand.

As far as I know only Ortur LM3 and some aftermarket replacement boards support g-code clustering at the moment.

What is this?

:smiley_cat:

It’s a code format that essentially compresses the normally verbose g-code to a more dense format. I’m not sure if it’s the same exact syntax as what existed for Smoothie clustering but I suspect it’s the same implementation.

Check out this example. I believe these are equivalent in function but might have missed something so take this as directional.

not clustered

G1 X0.212S380
G1 X0.423S0
G1 X0.212S380
G1 X0.423S0
G1 X0.212S380

clustered

G1 X1.482S380:0:0:380:0:0:380

Looks like a good idea if the same information can be had with less data. Doesn’t look as human readable … but I try to leave that to the machine… :face_with_spiral_eyes:

Thanks…

:smiley_cat:

I think critical when transmission speed and data processing are the bottlenecks in performance. But as you say, slightly less readable. Reminds me a bit of IPv6.

1 Like

this is an omtech smoothie board ,pretty much the same as cohesion 3d board

Ah. Smoothie Clustering was renamed to Gcode Clustering when it was introduced to non-Smoothie controllers.

In that case I’d say go for it. You’ll know pretty quickly if it doesn’t work.

I don’t see any disadvantage to turning it on if your board supports it.

I don’t know if it will resolve the issues you’re experiencing. It would more resolve slow or stuttering performance.

I’ll give it a shot tomorrow, Thanks

Clustering was a thing I came up with to reduce the overhead required for planning a raster engraving job, originally for Smoothieware, but it’s been included in a couple of GRBL systems now too.

GCode based systems use a motion planner - this is the thing responsible for keeping the system within the limits of speed and acceleration set in the settings. If you tell it to draw a rectangle, it’s the thing that decides when it’s time to slow down before getting to a corner, and how long to take to speed back up again.

Any system that uses streamed GCode has a “plan buffer” that sits between the software and the firmware, holding moves that are coming but haven’t been executed yet. Each time a new GCode instruction is received, it gets added to the plan buffer and the planner looks through what’s there already and makes decisions about how fast each move can be allowed to go, just in case the NEXT move (that hasn’t been received yet) tells it to stop. You always have to be able to “see” far enough ahead to come to a stop within your desired acceleration setting.

Imagine driving a car around a blind corner at night on a road you’ve never taken - you probably slow down, just in case the part of the road you can’t see yet has a red light.

Smoothieware has a short buffer (32 moves) and each new move added to the buffer triggers a re-evaluation of everything before it, and it’s kind of slow. If each move is a single pixel in a grayscale image, and the pixels are 0.1mm, that means you can only see 3.2mm ahead. If you ask the thing to run at 100mm/sec, and the acceleration isn’t too fast, it can easily take more than 3.2mm to get up to (or slow down from) that speed, so you’ll never actually reach your desired speed.

Clustering changes this - Since all the pixels are going along the same line anyway, it uses one bigger move that’s 10 pixels long, and just plops the 10 power values on it all at once, instead of using 10 different G1 moves. Longer moves with multiple power values means the planner can see farther ahead, and it takes less effort to re-plan, and it takes less bandwidth to send it over the USB too.

“10” in this case is sort of arbitrary. We started with 8, because that’s what would fit in the limited RAM Smoothieware had available, but LightBurn supports clusters of up to 16 brightness values. A single cluster is also not required to use all of them, and normal GCode (with a single power value) is supported transparently.


TL;DR: Less computation, and can see farther ahead, meaning the machine will run faster and smoother, and take less bandwidth to do so, all in a way that still allows things like engraving along a diagonal, and support for grayscale. It’s also super simple for firmware coders to add.

3 Likes

your parents certainly picked the right name for you, because you truly are (the wizard) of OZ that is ! yes that helped quite a bit its doubled my speed on some engraving from 150 mm/s to 275 mm/s ,but I do see what your saying as when my dpi gets to 600 many things come into play so on some photos I have to bring the speed down and possibly the power . I have seen that the more information the board has to sort thru can overwhelm it , I was confused because when I started this journey a little over a year ago there was an enable smoothie in machine edit which I had enabled, but I thing one of the updates had turned it back off which I just noticed, but now it says enable g code clustering which thru me off. A year ago I had no clue about lasers now I have a diode laser and went to a k40 soon after and I have upgraded to larger bed, bult my own 12 x 20 inch motorized z table with 6 inchs plus travel, installed a light object Q800 chiller, 50 watt tube and power supply from light object ,15mm linier rails cloudray c series head and 2nd mirror. I’m 71 years old and I’m having fun with all this but can be frustrating at times but I stick to it till I figure it out. Thanks again for the help and your knowledge !! I really love lightburn !!

2 Likes

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