Anyone know how to get Lightburn to use "work origin" the way Luban does?

Heya. So I’ve been experimenting a little with other software, and I think I’m going to like Lightburn, but there’s one thing I can’t seem to get, I wonder if anyone else is familiar with this issue.

My issue is that I can’t seem to figure out how to set up so the gcode is centered around the work origin like in Luban. The few attempts I tried always end up with the image up and right of the origin. Anyone seen this?

I am not familiar with lightburn but if you use the search “lightburn” brings you in.
Here is a guide from @jepho :

1 Like

Use user origin from the center.
The lightburn documentation is great, you should read through it.
https://lightburnsoftware.github.io/NewDocs/CoordinatesOrigin.html

1 Like

Thanks for the reading material, both of you. I should’ve just done some research first. Appreciate it

I think I’m still not understanding something. Setting it for “Start from: User origin; Job origin: center;” should work, right?
I haven’t run a print from Lightburn yet, but when I test by loading the project and have the machine “run perimeter”, it draws a rectangle with the bottom-left corner a little ways to the right of the selected origin.

Am I doing it wrong or does this sound like a compatibility bug?
The perimeter test looks something like this.
image

1 Like

Don’t run boundary - the touchscreen is too primitive to understand lightburn’s G91 based movements. I’ve communicated this to the developers of the touchscreen and they aren’t interested in fixing it.

Instead, use the rubber band or normal perimiter checking within lightburn via serial, if you must.

If you pick a known reference and measure carefully you shouldn’t really need to run boundary, but if you must I’d recommend using lightburn’s built in functions to do so.

The difference between g90 (absolute positioning) and g91 (relative positioning) is how you interpret a command like move to X1 Y1 - in absolute the machine moves to X=1, and Y=1. In relative it will move X+1, Y+1 from where it currently is.

Since the touchscreen (wrongly) assumes all incoming code is G90 (and never checks otherwise) it assumes a command that commonly comes at the end of Lightburn files (return to the initial position, usually a large negative X and Y) is actually a command to absolute coordinates, ruining the run boundary.

While we’re discussing lightburn - the grayscale function only works if you run my custom firmware** - otherwise it won’t work because the old snapmaker firmware does not support newer Marlin “laser inline power” and will dwell in between each and every little power change, drastically changing the contrast of the image. Also the performance of the touchscreen and Luban for sending gcode to the controller is limited, and high speed commands really need to be run over serial directly from Lightburn - you probably won’t run into this, but it’s noticeable in grayscale mode as there is a lot of gcode generated.

** “custom firmware” because I haven’t finished testing it and eventually I’ll submit it into the main firmware for incorporation.

1 Like

ahhh. All that is very good to know, thanks. And yea that’s a weird bug…

Also, do I need to have it plugged in or would I be able to connect over wifi? I’ve got my printer downstairs and workstation upstairs :sweat_smile:

1 Like

to run from Lightburn it needs a usb connection.

Also, consider setting up macros if you go that route: LightBurn is SO MUCH BETTER for Laser work - #2 by brent113

Honestly though, I didn’t use Lightburn to run it for a long time, and also I never ran boundary.

I prefer to not use “center”, and instead use lower left or something I can measure off of. If you’re measuring off a dot in the center, I guess that would be a good reason to use center. If you just want ‘something in the center’ I’d recommend taking careful measurements with a ruler and aligning to the lower left (or something).

If you’re concerned about having your workpiece aligned square you can manually jog with the laser on a low power (goggles on) to verify squareness.

Truth be told, I transfer the gcode to the touchscreen and run from there most of the time. Only when I’m doing grayscale work I’ll haul a laptop in and run from USB due to the performance benefit eliminating lags.

yeah, usually I arrange it relative to the center of the wood block I’m drawing on. I could try a corner, but I’m not the best at guaranteeing I have things sized perfectly, heh. (Probably should mention I’m drawing art on blocks with the laser instead of cutting parts.)

I usually run the code over with a flashdrive too.

Hey… You know more about gcode than I do… You think it’s possible to get Lightburn to include a quick boundary check that prefixes the actual project, and idk waits maybe 15 seconds to see if I cancel it?
just answered my own question. Draw rectangle, cut properties > max power = 0, cut properties > advanced > end pause time = 30000.

image
These framing tools do not have a way of exporting gcode.

However, it is trivial to draw a rectangle around your project and export just that as a gcode program. You could cut the contents of that program and prefix it before the main program with a G4 S15 ; dwell 15sec separating the 2 parts like you describe.

You also might be able to simply include the rectangle layer a the start and export the whole program as one, and then manually add a dwell in the file, or you could get fancy and follow recommendations from here: Pause between layers - #4 by LightBurn - Uncategorized-to-sort - LightBurn Software Forum
Have a 15mm line at “0 power” “1mm/s” that will essentially act as a dwell, on it’s own layer. So something like layer 1: boundary, layer 2: bogus dwell layer: layer 3 and beyond: real project.

edit: Just saw your above edit: that’s an even better answer, forgot about the end pause time! I do love lightburn, it’s the sign of a comprehensive software when there’s at least 5 ways to solve the same problem.

1 Like

brent113 - Do you have the job origin in the bottom left with User Origin or Absolute Coordinates (or maybe something else)? Do you export the Gcode from LightBurn & load it into Luban to transfer to the touchscreen? Do you have Luban’s Job Setup/Work Origin in the bottom left too?

I typically use User Origin as I don’t have a precise reference to position things on the laser bed. I use the laser on low power to set the user origin on the touchscreen when running a job from there. The position of the job origin is job dependent, I wouldn’t say I always put it in the bottom left. Sometimes it’s centered. Sometimes it’s middle right. Depends on what I’m doing.

Personally, I use a script where I can right click on the gcode file and send it to the touchscreen without using Luban: File Transfer via WiFi - #13 by brent113

More frequently I’ll run jobs directly from Lightburn as it can run gcode faster and the specific jobs I run are limited by the touchscreen’s speeds. This does not apply to you unless you’re doing grayscale mode with at least a .1mm spatial resolution.

Not even sure what this is, I don’t use Luban. I’d guess you’re referring to the part of Luban involved in generating gcode which wouldn’t apply here since the gcode has already been generated by Lightburn.

Thanks - I’ll check out the link to the script.

Does this explain why even at 500mm/s grayscale, the laser seems to be just barely inching along (burning the shit out of everything unless I dial the 10w laser down to like 2%)?

That requires online laser power as well. Forgot to mention that.