Power level not changing using saved G-Code

Test grid burns correctly when computer connected. Saved the G-code, then tried burning the saved G-code. Power levels do not change when burning saved G-code, so the result is engraved, not cut.

The g-code looks OK:

; Cut @ 100 mm/sec, 50% power
M8
G0 X175.276Y164.429
; Layer
G1 X170.276S500F6000
G1 Y169.429
G1 X175.276
G1 Y164.429
; Cut @ 100 mm/sec, 55% power
M8
G0 X181.776Y164.429
; Layer
G1 X176.776S550
G1 Y169.429
G1 X181.776
G1 Y164.429
;

Explain further what your trying to accomplish and your steps.
Post all gcode from first line also.

That says “S value of 500” (meaning 50% power), and “F value of 6000” (meaning a feed rate of 6000 mm/min, or 100 mm/sec). This is exactly what you’ve asked for, according to the comment in the first line:
; Cut @ 100 mm/sec, 50% power

That said, not even a typical CO2 laser will cut at 100 mm/sec, unless the material is extremely thin, like paper.

When cutting with a diode, you’d typically run anywhere from 300 mm/min (5 mm/sec) for a high-power one to 100mm/min (1.2 mm/sec) for a lower power one, though this will also depend on the material.

Thanks for the quick responses.

I have an Elegoo Phecda 20W unit.

Using Lightburn Test Grid with the computer connected to the unit, I get the expected Test Grid results, as follows:
Laser power changes as expected; low power engraves, and as the power gets higher, the cuts get deeper until the grid squares are correctly cut out, and the entire workpiece is cut out of the plywood.

I save the G-code to a file, which appears to have the appropriate instructions to adjust the power:

; LightBurn 1.5.06
; GRBL device profile, absolute coords
; Bounds: X156.72 Y146.52 to X243.28 Y253.48
G00 G17 G40 G21 G54
G90
M4
; Cut @ 400 mm/sec, 20% power
M8
G0 X182.777Y248.019
; Layer
G1 Y248.753S200F24000
G1 X182.294
G1 Y249.057
G1 X183.07
G1 Y247.883
G1 X182.89Y247.75
G1 X182.692Y247.653
G1 X182.479Y247.595
.
.
.
; Cut @ 100 mm/sec, 50% power
M8
G0 X175.276Y164.429
; Layer
G1 X170.276S500F6000
G1 Y169.429
G1 X175.276
G1 Y164.429
; Cut @ 100 mm/sec, 55% power
M8
G0 X181.776Y164.429
; Layer
G1 X176.776S550
G1 Y169.429
G1 X181.776
G1 Y164.429

I tell Lightburn to burn that file, expecting the same results. However, when burning from the file, the power settings in the G-code don’t have any effect, and all I get is a low power engraving.

As you can see from the G-code, successive grid squares have different Sxxx values, which have no apparent effect.

from other posts on the forum, I suspect the unit has defaulted to a maximum power setting, and needs a command to reset the maximum allowed power,

Switching the unit off and back on doesn’t help.

Thanks again.

As @LightBurn wrote you have to lower your speeds, click Lightburn settings icon and set your speeds to mm/m.

My point is that it works first time.

The grid test works perfectly when I run it after I first set it up. It fails when I run it from a saved G-code file.

Obviously, first time around, the speed & power are correct. When I run the saved G-code, the power does not change, so all I get is an engraved image.

I can even see that the intensity of the laser beam is much lower, and does not change.

Check your grid test, likely is in mm/m.
If you set 400mm/m and 100mm/m…

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