for some reason laser intensity isnt being added to the 'tool on/off' lines in

for some reason laser intensity isnt being added to the ‘tool on/off’ lines in my gcode exports; Unless I enable separate line (which I dont want). Any clue what I might be doing wrong?

I’d expect to see on the lines where the laser comes on (M106) to appear as
M106 S255
but presently there just
M106

Am I missing a token to insert it?

Some more reading over the file and it appears it does add the S value just on the next line which is definitely wrong from what I’ve been exposed too.

M106
G1 X41.91 Y11.43 S25.50 F300

What board and firmware do you have?

@Ariel_Yahni_UniKpty I have an MPCNC (its a ramp 1.4 board) with Marlin firmware.

LW4 is not compatible with plain Marlin. You’ll need Marlin Kimbra which includes propper laser settings.
Theres another thread not long ago from another user that might help you solve your issues. Not many marlin users that I know off

@Ariel_Yahni_UniKpty Hmm…I’ll probably just tweak laserweb to allow laser intensity to get generated on the same line as tool on/off; that seems easiest lol

You typically want intensity to be part of the move command, so you can vary it as you go, to allow for intensity modification as it goes along, so having it part of the G1 command makes sense, otherwise you will have to insert tool on (M106) commands everytime it changes… Plain Marlin (as per @Ariel_Yahni_UniKpty ) apparently does not support that?..

@CescoAiel Doesnt seem to be supported it, but that gave me an idea on how to configure it to work right!

I made tool on blank, and I change laser intensity to
M106 S
and enabled ‘Intensity separate line’ and now it generates it how I’d expect. Sort of a weird work around but it definitely worked from looking at the gcode haha.

Interesting!.. :o

This method did indeed work! Weird work around, but it worked! Anyone else who comes along, just empty the tool on field and put the on command and the S together in the “laser intensity” field and enable intensity separate line. Should look like this “M106 S”

I Changed the source code to allow managing laser intensity in ToolOn with these command : M106 $INTENSITY. Will make a pull request ASAP if you are interested and developper agree