Snapmaker 'run boundary' runs in wrong possition, burns in right position!

Hi all. I’m running Lightburn 1.2.00. I’m using a Snapmaker 2.0 A350 with the 10W laser. My current workflow is to build my project in Lightburn, export to G-code, use Wifi and Luban to transport the gcode to the device and run directly on the device. This lets me use the in-device autofocus.

Am I doing something wrong with the ‘Run Boundary’ command? I find this really useful when trying to burn a pattern on a specific object. In this type of project, I do the following -

  • set start from to ‘user origin’ and set my job origin to something useful (either center or bottom left)
  • transfer to device, set origin to exactly where I want the burn (either the center or bottom left, as above)
  • this is where the problem begins - theoretically, it shouldn’t matter where my pattern is on the plate in Lightburn? But if my object isn’t centered on 0,0 on lightburn (3/4 out of bounds) then the ‘run boundary’ doesn’t show where the actual laser goes.

So my current workaround is -

  • in Lightburn->Edit->Settings->‘Ignore out-of-bounds shapes’ if possible - SET OFF
  • set Lightburn to user origin and set the refence point (center)
  • orient your design in Lightburn so it is centered on 0,0 (3/4 should be off the build plate ("¯_(ツ)_/¯ "))
  • set the work origin to the center of where you want the burn
  • run boundary only works in this mode if the object center is at 0,0 in Lightburn

Obviously this is doable, it’s just ugly having to perfectly position my design at 0,0 in Lightburn. I assume this is some silly Snapmaker bug in ‘run boundary’ to do with the the bounds of the file in the comments in the gcode.

Below is a diff of two identical burns (a 20x20 square, center origin), one of which the run boundary matches the actual burn, and the other where it’s offset.

Good file

;Header Start
;header_type: laser
;file_total_lines:32
;max_x(mm): 10
;max_y(mm): 10
;max_z(mm): 0
;min_x(mm): -10
;min_y(mm): -10
;min_z(mm): 0
;Header End
; LightBurn 1.2.00
; SnapMaker device profile, user origin
; Bounds: X-10 Y-10 to X10 Y10
G21
G90
G0 X0 Y0 F0
G91
; Cut @ 180 mm/min, 100% power
M106 P0 S255
M05
G0 X10 Y-10 F0
; Layer 
M03 P100 S255
G1 X-20 F180
G1  Y20
G1 X20
G1  Y-20
M107
M05
G90
; return to user-defined finish pos
G0 X0 Y0 F0

bad file

;Header Start
;header_type: laser
;file_total_lines:32
;max_x(mm): 30
;max_y(mm): 30
;max_z(mm): 0
;min_x(mm): 10
;min_y(mm): 10
;min_z(mm): 0
;Header End
; LightBurn 1.2.00
; SnapMaker device profile, user origin
; Bounds: X10 Y10 to X30 Y30
G21
G90
G0 X0 Y0 F0
G91
; Cut @ 180 mm/min, 100% power
M106 P0 S255
M05
G0 X10 Y-10 F0
; Layer 
M03 P100 S255
G1 X-20 F180
G1  Y20
G1 X20
G1  Y-20
M107
M05
G90
; return to user-defined finish pos
G0 X0 Y0 F0

A proposed fix is, when in user origin mode, can the ‘max and min x and y’ and ‘Bounds’ be autogenerated to be based on the bounding box and centered on ‘0,0’? Rather than having to do this on the plate in Lightburn?

I don’t think user origin means what you think it means. User origin set a relative origin as defined by it’s absolute position. Meaning that it relies on absolute coords to define the origin position. This is why your 0,0 hack works.

User origin defined in LB is unrelated to what I suspect you’re setting origin to on the device. I’m not familiar with Snapmaker functionality on this. If the device can redefine 0,0 position I suspect you could generate gcode out of LightBurn using Absolute Coords and having your design positioned relative to 0,0.

It may be easier to use “current position” in Start from. This will allow you to position your laser as you see fit and then run the job. Job origin will be relevant as to what’s the anchor point of the design relative to your position.

Also, one thing I’m noticing is that you have S Value Max set to 255. I was under the impression that Snapmaker required values from 0-100. Are you getting any power modulation issues?

Thank you for your reply. I’ll have a try with “current position” and report back.

I’ll investigate the S setting too. I’m so inexperienced I don’t know if I’m having power modulation problems set. I’m still just learning cutting.

Thank you.

In this case the symptom would have been essentially that basically all power levels after ~40% would act the same. No increased output levels past that.

Again, I don’t know much about Snapmaker but when I was looking at a different issue that’s how it appeared to be setup.

solved

can confirm, for precise placement of a small pattern on the Snapmaker 2, use ‘current position’. Setting the origin on the Snapmaker console will set the Lightburn ‘Job origin’ to this point.

1 Like

This is useful to me thanks.
Also to add the gcode reference is not well updated, but usually correct.
S is out of 255, https://snapmaker.github.io/Documentation/gcode/M004
P is percentage out of 100. https://snapmaker.github.io/Documentation/gcode/M003