M4 Marlin use in Snapmaker

Hello,
I consider switching from Luban to Lightburn as I’m making more and more complex projects that Luban development can’t seem to keep up with ^^

My problem is the use of greyscale to engrave a picture. Luban is doing the job by not processing the image (actually found this by mistake, Luban interface lacks clarity…) and gets a clean code that has a very smooth power curve with this format :

; G-code START <<<
G90
G21
M2000 W1 P100
M2000 W2 P100
M4 S0
M9
M2000 L23 P1
G0 F6000
G1 F280
G0 X0.00 Y0.13
G1 X0.25 S231.152
G1 X0.50 S230.384
G1 X1.00 S229.455
G1 X1.25 S229.148
G1 X1.50 S228.602
G1 X1.75 S227.906
G1 X2.25 S227.746
G1 X2.50 S227.129
G1 X3.75 S226.888
G1 X4.00 S226.429
G1 X4.50 S226.027
G1 X4.75 S225.647
G1 X5.25 S225.163
G1 X5.50 S224.563
G1 X6.00 S223.429
G1 X6.25 S223.208
G1 X6.75 S222.558
G1 X7.00 S222.418
G1 X7.50 S221.685
G1 X7.75 S221.568
G1 X8.50 S219.931
G1 X8.75 S219.075
G1 X9.00 S218.299

Makes a great result overall, but the Gcode generator does not take in account that Iwant a minimal power of 20% as it makes no burn under that value, and Luban’s code goes down to S0 instead of the wanted S51

Lightburn gets this option, but with the Snapmaker profile, I get a double issue

  • The code seems to be stuck in M3 movement. I understand that this correspond to the “Constant Power Mode”, and it makes a consistant black square as speed slows down accordigly to the power curve.
  • The code structure, for a beginner like me, seems more rougth, like this :
    ; Layer C00
    M03 P49.6 S126.596
    G1 X0.361 F2000
    M03 P49.5 S126.295
    G1 X0.18
    M03 P49.4 S125.994
    G1 X0.72
    M03 P49.3 S125.693
    G1 X0.361
    M03 P49.2 S125.392
    G1 X0.72
    M03 P49.1 S125.091

I have no doubt that there is a reason for that, of course…

But in order to use M4 function instead of M3, I’ve changed the file with this format, replacing all M03 by M04 (and tried M4 as well) :

; Layer C00
M04 P49.6 S126.596
G1 X0.361 F2000
M04 P49.5 S126.295
G1 X0.18
M04 P49.4 S125.994
G1 X0.72
M04 P49.3 S125.693
G1 X0.361
M04 P49.2 S125.392
G1 X0.72
M04 P49.1 S125.091
G1 X1.622
M04 P48.9 S124.789
G1 X0.9
M04 P48.8 S124.488

Surprise, laser takes a very short brake at every instruction, leading to gaps in the line and not a smooth line as the snapmaker code does. Power curve seems right though, and no black rectangle.

Any way to correct this ?

(First topic on this forum, gonna post a picture tomorrow)

From what I recall, the inline feature for snapmaker should be part of the Lightburn 1.5 release. However, for now you can change your device type to “Marlin” instead of “Snapmaker” and select Inline on the laser control in device settings. Or you can set the machine type to GRBL, it’s close enough to work fine.

1 Like

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