Invalid G code for laser power?

I bought a license already because I’m pretty confident LightBurn will do what I need, but I’m running into a small issue that I’m hoping is something I missed in a configuration somewhere. I just can’t find where :slight_smile:

I’m running a more or less commonly hacked up Franken40: K40, SKR v1.3 controller running Smoothie, power Z axis bed, air assist, etc. Everything has been running well hardware-wise so far.

My issue is with getting the expected power in the Gcode. Here’s what I’m doing, and what I’m seeing. First, I created a circle and set the Mode to Line. Set the speed to 10mm/sec, and Max Power to 50%. Next, I hit the Save GCode button to see what it created:

; LightBurn 0.9.07
; Smoothieware device profile, absolute coords
G00 G17 G40 G21 G54
; Smoothieware clustering enabledG4 P1
; Cut @ 10 mm/sec, 50% power

On the first cut move, shouldn’t that be S0.5, not S127.5? From the Smoothie docs, and from physical testing, the S parameter goes from 0.0 to 1.0 (not 0 to 255). If I put an oscilloscope on the configured pin (2.4) my duty cycle indeed goes from 0% with S0.0 to 100% with S1.0

Smoothieware laser documentation

That can happen if you started with a GRBL device, then went back through the device manager and changed it to Smoothieware, instead of creating a new device. Some of the parameters in the GCode generator are only set up on first creation, like the S parameter scale, and aren’t reset when you change the device type. (I’ve caught most of them at this point, but apparently not this one)

Is it likely that’s what has happened here?

That was exactly it, thank you!
I deleted the device, added it back, and the power now scales from 0 to 1.

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