Custom Lightburn. Power management bug in tool two!

Good morning,
I recently started using the custom Gcode version of Lightburn.
I’ve encountered some problems…
I wanted to bring this issue to your attention:
I set the activation of tool 1 with the M3 S{*power} command.
The activation of the second tool with the M4 S{*power} command.
The problem is that power points to the power set on the first tool!!
Is it possible to have a command that points to the power set on tool two? For example:
M4 S{*power2}!
Is it already possible to do this? I haven’t found any documentation on this…
Thanks in advance for your support.
Regards

I see what you mean, and I’ll look into it.

I am curious though about the need to have S{power} be put on the same line as the M3/M4 though, as normally the power is part of the Cut Move.

Hi,
Thanks for your support…
Maybe it’s my fault; I still don’t fully understand how everything works, but I think there are some anomalies and differences in the code generation compared to the “normal” version. This morning, if I generated two simple squares, one with tool 1 and the other with tool 2, the power S wasn’t set for the second one… so I added M4 S{*power}. And I noticed that S{*power} was pointing to the power set for tool 1.
Now I may have solved it, but I’m still unsure!



They are two simple squares, the first with tool 1 (cutting), the second with tool 2 (engraving only).
As you’ll see (following your advice), I added a servo control that closes the valve that regulates the air flow. The M8 control turns on the air compressor.
Now it seems to work even without setting S{*power} for the second tool!
Do you have any suggestions? Did I set something wrong?

;LightBurn Core 2.0.04-RC-1 @ 758eaf9 Qt6.5.7
;Custom GCode device profile, absolute coords
;Bounds: X49.159 Y31 to X86.553 Y44.9

;USER START SCRIPT
M64P1 ; ON Aux per Buzzer
M8 ;Accensione Aria
M7 ;Accensione Aspirazione
G4 P0.06 ; Ritardo

M129P100 ;Imposto % bust_Power_Pioppo

;USER START SCRIPT
G00 G17 G40 G21;Restore metric mode
G54
G90;Restore absolute mode
;Cut @ 760 mm/min, 68% power

M8;Aria On
;Cambio_Livello
M5 ;Spento
G0 X49.159Y43.729
G1 M3 S800
;Layer Taglio_Perimetri_Esterni
M280P1S87
G4P0.
M3 S680.1
M280P1S87
G4P0.
G1 X49.569Y43.441 F760
G1 X50.02Y43.231
G1 X50.501Y43.102
G1 X51Y43.058
G1 X64.107
G1 Y31
G1 X51
G1 Y43.058
G1 X50.956Y43.558
G1 X50.827Y44.038
G1 X50.617Y44.489
G1 X50.33Y44.9
G1 M3 S800
;Cut @ 2000 mm/min, 2% power

M8;Aria On
;Cambio_Livello
M5 ;Spento
G0 X73.447Y44.029
;Layer Incisione_Semplice
M4
M280P1S0
M4
M280P1S0
G1 X86.553S20 F2000
G1 Y31.971
G1 X73.447
G1 Y44.029
M5 ;Spento
M9;AriaOff
G90;Restore absolute mode
;return to user-defined finish pos
G0 X0Y0

;USER END SCRIPT
G4 P0.4
M280 P1 S0
M3
M5

;USER END SCRIPT
M65P0
M65P1
M65P2
M2

I would need to run some tests on my side, as I haven’t personally used variables in the Gcode profile yet.

Noticed one thing though:

You are using an older Pre Release version, but 2.0.04 has officially launched.

Please see if the latest full release behaves differently:

(In case your license key expired for free updates, you can temporarily deactivate it under “Help > License Management” and reactivate the free trial.)

Just ignore that second ‘Max Power(%)’ edit box and only use the first one. (I don’t think it is supposed to be showing).

And you shouldn’t need to include the “Sxxxxx” after the M3 or M4 for “Tool On”, since the power value only needs to be used in the ‘Cut Move’ area.

Good morning.
Thanks for your help!
I’ll definitely continue testing and using the custom version.
So I’ll try following your advice and see what happens!
I’ve also noticed other strange behaviors, checking “automatic instrument status,” “variable laser power,” and other things. I’ll run more tests and update you if necessary!

Ciao

Hi,
I also downloaded the latest version…
Here’s the problem I was telling you about!!
As you can see, two simple squares: the first for cutting, the second for engraving only! It seems to be pointing to the power set on tool 1!!

;USER START SCRIPT
M64P1 ; ON Aux per Buzzer
M8 ;Accensione Aria
M7 ;Accensione Aspirazione
G4 P0.4; Ritardo

M129P100 ;Imposto % bust_Power_Pioppo

;USER START SCRIPT
G00 G17 G40 G21;Restore metric mode
G54
G90;Restore absolute mode
;Cut @ 800 mm/min, 68% power

M8;Aria On
;Cambio_Livello
M5 ;Spento
G0 X110.5Y71
G1 M3 S800
;Layer Tagli_Interni
M3
M280P1S87
G4P0.5
M3
M280P1S87
G4P0.5
G1 X127.5S680 F800
G1 Y53
G1 X110.5
G1 Y71
G1 X111.5
;Cut @ 2000 mm/min, 50% power

M8;Aria On
;Cambio_Livello
M5 ;Spento
G0 X141.5Y73
;Layer Incisione_Semplice
M4
M280P1S0
M4
M280P1S0
G1 X158.5S500 F2000
G1 Y55
G1 X141.5
G1 Y73
M5 ;Spento
M9;AriaOff
G90;Restore absolute mode
;return to user-defined finish pos
G0 X0Y0

;USER END SCRIPT
G4 P0.4
M280 P1 S0
M3
M5

;USER END SCRIPT
M65P0
M65P1
M65P2
M2

As you can see here:

M280P1S0
G1 X158.5S500 F2000

At the moment I can solve it by putting the same power on both boxes (P1 & P2)… But I think there is a problem to solve!

These are the current settings!

Am I doing something wrong?

I wanted to show you this too…as you can see from the pictures, I made a red box and you can clearly see that it points to the tool 1 power! I hadn’t noticed before!

Good morning,
I’m continuing to use the custom version… and I have to say that there are several problems, “bugs,” or anomalies regarding the code and other issues… I’ve worked around some of them by adding commands in the various dedicated sections, but that’s not a good or proper solution.
There is also a problem with the tabs and also with the layer settings that magically change by themselves and reset to tool 1, even if I save tool 2 as default…
I wanted to ask if you have any updates on this matter, or if I should report this in a more specific place. I’m available as a tester if you need me?
Thank you
Greetings

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