Snapmaker 2 Dwell setting Gcode G4:Px and Laser Speed

Snapmaker 2 A350 Gcode Dwell time.
What is the default laser on dwell time if G4 Px is not used?
Using Snapmaker Luban software there is a setting for this (G4 Px), 0.1-1000ms/dot.
Gcode generated from Lightburn does not contain this setting and I didn’t know how this was handled by the controller.
Also the Snapmaker 2 laser function operates extremely slow as compared to the Snapmaker Original using the same gcode file by a factor of almost 4:1.
I am running direct USB to the machine(s), not “loading” the file. I also have the touchscreen disconnected(SM2).
Why is the performance so slow comparatively?
Shouldn’t the Snapmaker 2 perform the same if not better than the Snapmaker Original?

The way the laser works is M3 turns it on and M5 turns it off. If you don’t specify a dwell then the delay would be instant if there’s no other code in the middle, like a slow movement.

This has come up before, and you could post the gcode to confirm, but I think lightburn has a movement in between the M3 turn on and M5 turn off, which combined with the slow movement speed effects a dwell. Lightburn draws a “line” (very short) where Luban draws a point.

In what way, cuts slower given same power settings? Or moves slower?

Running directly from Lightburn? Should work fine.

Slower as in when engraving a 100mm x 100mm image, the Snapmaker 2 will take 3 to 4 times longer to complete the exact same job as the Snapmaker Original, Snapmaker 2 with much shuddering and stuttering whereas the Snapmaker Original operates very smoothly and much faster.

Facebook link: Facebook

LUBAN
; G-code for laser engraving
; Generated by Snapmaker Luban
; Sun Aug 01 2021 11:53:27

G90
G21
; G-code START <<<
M106 P0 S255
G1 F3000
G1 X3.30 Y94.90
M3 P35 S89
G4 P010

LIGHTBURN
; LightBurn 0.9.24
; SnapMaker device profile, absolute coords
; Bounds: X4.99 Y3.82 to X94.85 Y96.26
G21
G90
; Image @ 3000 mm/min, 35% power
M107
M05
G0X4.99 Y96.26 F2000
; Layer C00
G91
M03 P0 S0
G1Y-1.25 F3000
M03 P35 S88.9

The lightburn code you posted is mostly the header, the very last line is where the laser turns on. The following lines would be the ones of interest, please post those.

Not the entire Gcode, but the beginning an end pieces.

; LightBurn 0.9.24
; SnapMaker device profile, absolute coords
; Bounds: X4.99 Y3.82 to X94.85 Y96.26
G21
G90
; Image @ 3000 mm/min, 35% power
M107
M05
G0X4.99 Y96.26 F2000
; Layer C00
G91
M03 P0 S0
G1Y-1.25 F3000
M03 P35 S88.9
G1Y-2.48
M03 P0 S0
G1Y-0.08
M03 P35 S88.9
G1Y-0.16
M03 P0 S0
G1Y-0.08
M03 P35 S88.9
G1Y-0.24
M03 P0 S0
G1Y-0.08
M03 P35 S88.9
G1Y-0.16
M03 P0 S0
G1Y-0.08
M03 P35 S88.9
G1Y-0.16
M03 P0 S0
G1Y-0.08
.
.
.
.
M03 P0 S0
G1Y2.72
M03 P35 S88.9
G1Y0.08
M03 P0 S0
G1Y0.32
M03 P35 S88.9
G1Y0.08
M03 P0 S0
G1Y1.25
G90
M107
M05
G90
; return to user-defined finish pos
G0 X0 Y0 F2000

That 0.16mm move, at 3000mm/min, will take ~3ms, effectively behaving as a dwell. In reality because of the limited acceleration and deceleration the machine will not reach 3000mm/min, and will take quite a lot longer than 3ms.

Is the shuddering due to the many short movements combined with high acceleration? You could lower the acceleration temporarily as a test with M204 P500 T500 issued via the terminal. Without saving that parameter will be reset after a power cycle of the machine. The default is 3000mm/s^2, much higher. Note, this will increase job time as each travel will take longer, typically you want acceleration as fast as possible while having good quality results.

The shuddering/chugging is still quite apparent even when running at 1000mm/min., with no appreciable difference in the time it takes to complete the job. Not to mention the difference in speed between the two machines.
Did you see the video clip in the link to the Facebook post and see the difference in machine performance when compared side by side?

I did not.
image

You’ll note the difference between travel speed and acceleration. I was not referring to travel speed, as changing that doesn’t affect maximum acceleration.

As the machine is limited in acceleration, the short fraction-of-a-millimeter moves are all limited by acceleration and the machine will never reach the commanded travel speed. I would expect 1000mm/min and 3000mm/min to take close to the same time to complete given the job being run.

Some quick maths finds that the required machine acceleration to achieve 3000mm/min velocity over half of the 0.16mm travel distance would be 15,625mm/s^2, far in excess of the default limit of 3,000mm/s^2. The actual achievable velocity in that case would be only 1300mm/min.

Some moves being commanded are even smaller at only 0.08mm, corresponding to a maximum velocity of 930mm/min. Hence, why at 1000mm/min you did not notice a change in job completion time.

1 Like

The video and my post regarding this issue is in Official Snapmaker Owners group on facebook, just search for posts by me, Alan Fox, posted April 19th.
Also in gathering information from other groups the following math should give me the approximate time to complete a job:
If running a 100mm x 100mm tile at 318 dpi and 1200 mm/min for example… 318dpi is 12 lines per mm so 12 lines X 100mm = 1200mm per mm and you are running at 1200mm/min so 1mm should be equal to 1min and total tile should about 100 mins or 1hour 40mins.
And like I mentioned, it’s approximate but in line with the performance of the Snapmaker Original, certainly not the Snapmaker 2 which is taking 6 to as much as 11 hours for the same size work piece and same file.
I’m not arguing with you, you obviously have a much deeper understanding of the workings of these things, but my comparisons of speed and performance clearly show that there is something definitely lacking or seriously wrong going on here and I’m just trying to get it sorted out. Maybe it’s a design flaw or bad controller, I just don’t know.

I don’t have a facebook account, sorry.

The method of estimation time to completion as linear_distance/travel_speed is the naive calculation assuming the movement is not acceleration limited. In this case the movement is acceleration limited and that is not a good approximation to use as it will give a very wrong estimate.

I suspect the movement on the original was not acceleration limited in the same way, then. I don’t know what size machine you have, but physically larger machines must accelerate slower given a similar stiffness, as it’s limited by the amount of force the linear modules can apply to the moving components.

Not taken as such.

You don’t have a bad controller.

A design oversight is more likely, as the behavior you want is called “laser inline power” and is something I integrated into my firmware as that functionality was not available when the snapmaker began writing their firmware. Someday I’ll get around to publishing that and suggesting it be integrated into the main firmware release.

There’s additional significant sources of delay that are yet more advanced that I haven’t yet mentioned, and I believe your numbers of 3-6x slower to be expected.

The reason it’s so shuddery is because after each movement the machine comes to a complete stop. So: move 0.08mm, stop, move another 0.08mm, stop. The “inline power” functionality allows the laser to turn on and off without the machine stopping.

If you’re interested I do have the firmware functional, I have been using it for ~6 months now, I could send it to you via a private message. It requires creating a new machine in Lightburn based on “Marlin” and not “Snapmaker” and then enabling this function:

2 Likes

Wow!
Very enlightening!
And yes, I would absolutely be interested in your firmware.

1 Like

This thread is really interesting, would you mind sending me your custom firmware as well? Is your code published on GitHub somewhere?

1 Like

Hello,
Here we go, custom firware, always the way to go!
I have been following with interest the discussion from Alan Fox on facebook about the Norton White Tile method and also doing it. I must admit it takes for ever to engrave the tiles while other laser take 3x less time.

Looks like snapmaker is not taking this very seriously and we need to really on people developing custom firmware to resolve issues !

@Edwin , any news on that issue?
Thanks

I should add I submitted the PR request, hopefully it’s integrated soon:

1 Like

@gpt1plon Edwin is no longer with Snapmaker.

hello i am new with my sanpmaker A350 and would like to improve the laser engraving time, could you please share your firmware, thanks

@brent113 how can I lay my hands on this firmware of yours to speed up my laser times and add inline laser power control please?

1 Like

Thanks for your contribution @brent113
Is there anyway I can get hold of this firmware as well, being successfully printing NWT and now have jumped to Canvas but the slow engraving times are killing me :frowning:

Have looked up GitHub for the firmware but wanted to check if you have it compiled as I’m running a mac :frowning:

Just few questions on the steps:
After installing this:

Then on Lightburn to use:
Create a new machine in Lightburn based on “Marlin” and not “Snapmaker” and then enable the “inline” function.

and then after that to use this fix:

Please advice. TIA