Switched units to inches now gcode not being generated correctly, switched back to mm, still not working

Initially installed Lightburn, loaded Creality Falcon 2 as device, was working just fine pulling in images. Switched units to inches, then noticed that output gcode was no longer correct. The bounds are correct in the gcode, but after that it is no longer correct. This happened on another PC but once it was reverted to mm it worked as normal no issues. Below is what I am seeing. This is only happening on the IMAGE mode. If I draw something using the software tools, it generates correct gcode.

; LightBurn 1.4.01
; GRBL device profile, absolute coords
; Bounds: X162.95 Y185.15 to X240.25 Y246.25
G00 G17 G40 G21 G54
G90
M4
; Image @ 100 mm/sec, 20% power
M8
G0 X214.45Y185.15
; Layer C00
G91
G1 X2.5F6000S0
G1 X0.1S200
G1 X0.1
G1 X1.1
G1 X0.2
G1 X2.5S0
G1 X0.1Y0.1S0
G1 X-2.5S0
G1 X-0.1S200
G1 X-0.2
G1 X-1.1
G1 X-0.1
G1 X-0.1
G1 X-0.1
G1 X-0.1
G1 X-2.5S0
G1 X-0.2Y0.1S0
G1 X2.5S0
G1 X0.1S200
G1 X0.1
G1 X0.1

Perhaps the issue you’re referring to is self-evident in the same gcode but it’s not apparent to me what you’re indicating as being a problem.

Can you elaborate and call out specifically what it is that you think is a problem?

In the gcode below, I added a circle with the Lightburn software. As you can see, the final passes of the Image, the gcode is still not within the bounds. Then the code transitions to the circle I drew, and now the gcode is correct and within the bounds of the objects. The incorrect gcode is generating negative numbers…how is that?

G1 X0.1
G1 X1.7
G1 X0.3
G1 X0.2
G1 X2.5S0
G1 X-0.4Y0.1S0
G1 X-2.5S0
G1 X-0.1S200
G1 X-0.2
G1 X-1.3
G1 X-0.2
G1 X-2.5S0
G90
; Cut @ 100 mm/sec, 20% power
M8
G0 X201.556Y250.632
; Layer C00
G1 X200.286Y250.533S200
G1 X199Y250.5
G1 X197.714Y250.533
G1 X196.444Y250.632
G1 X195.193Y250.794
G1 X193.962Y251.018
G1 X192.752Y251.303
G1 X191.566Y251.646
G1 X190.404Y252.047
G1 X189.269Y252.504
G1 X188.161Y253.015
G1 X187.083Y253.578
G1 X186.037Y254.192

Not within the bounds of what?

Are you thinking that negative values are invalid? The G91 at the start of the block indicates relative moves will be used, not absolute coordinates. So all the moves are just relative from current position. Negative values are fine in this case.

In my first post, there are four identical lines as shown below…

G1 X-0.1
G1 X-0.1
G1 X-0.1
G1 X-0.1

Is there an explanation for this?

Impossible to say without understanding the specific context and the details of the gcode generator.

But it’s not invalid in any way.

Let’s approach this differently. Are you experiencing an issue that’s making you question the gcode? May be better to focus on addressing the core issue.

For the record, I’ve never once seen LightBurn create bad gcode for geometry so I tend to think that’s not generally going to be the problem in most scenarios. Not that it’s impossible.

You are correct, gcode is simply being generated using the various settings/configurations. I believe it’s a setting issue that I may have changed not knowing. Again, I load an image file .png or .jpg, the system automatically recognizes it as an image and sets the mode accordingly. When I try to etch the file, it correctly frames the location so I can set the material in the correct position but when I hit start, it simply goes to the start position and just sits there. I’m assuming its going through the gcode with the tiny movements as shown in the code…but it definitely does not etch the image in the location as shown in the software. I uninstalled the software and tried to delete any config files and still having these issues.

Upload the .lbrn file for review.

Because of the G91 setting relative move mode, those four motions will produce four 0.1 mm moves to the left.

Running the G-Code through a simulator shows they’re part of what looks like a slightly bent straight-ish line. Without knowing more about the original design and how it was created, the backplot seems reasonable.

Are you thinking in inches with the UI set to millimeters?

ST Logo.lbrn2 (43.1 KB)

logo.txt (286.0 KB)

I don’t see a fundamental problem in the design or in the gcode.

I think it’s more than likely that there’s a problem on the machine side.

Are you saying that you’re able to use another computer to connect to the same laser without issue?