CNC spindle speed bug?

When I generate a CNC program for my new 200W CNC hardware, if I look at the project on the Snapmaker itself, it says that the spindle speed is 12000 RPM, but the hardware is capable of doing 18000 RPM, and the g-code says “M3 P100”, which should be 18000 RPM on this hardware (100% of maximum speed).

Is this a UI bug on the device, or am I misunderstanding the g-code commands?

12000 RPM is max of the 50W. Did you change the module in luban in machine settings to 200W?

Yes, I did. It wouldn’t let me connect and upload until I corrected that and re-configured the tools.

My speeds are correct if I generate the gcode with fusion and send it to the machine and mill it from the touchscreen.

If you share more information we could get the fault.

Interesting. The only interesting things I can share are that when I created the project initially, I had not yet set it for the faster spindle, and changed the machine configuration later, and that the first few lines of the g-code look like this:

;Header Start
;header_type: cnc
;tool_head: levelTwoCNCToolheadForSM2
;machine: Snapmaker 2.0 A350
;gcode_flavor: marlin
;renderMethod: line
;max_power: 255
;file_total_lines: 61678
;estimated_time(s): 61918.189000000006
;is_rotate: false
;diameter: 0
;max_x(mm): 124
;max_y(mm): -3
;max_z(mm): 80
;max_b(mm): 0
;min_x(mm): 2
;min_y(mm): -123.25
;min_b(mm): 0
;min_z(mm): -8.05
;work_speed(mm/minute): 300
;jog_speed(mm/minute): 1500
;power(%): 0
;work_size_x: 320
;work_size_y: 350
;origin: top-left
;thumbnail: ... 
;Header End 
;Snapmaker Luban 4.12.0
;Sun Jun 09 2024 8:54:22
G90
G0 Z80.00 F1500
G0 X2.25 Y-123.25
G0 Z1.00
M3 P100
G0 X110.25 Y-75.75
G0 Z-0.01
G1 X109.75 Z-0.30 F100
G1 X109.25 Z-0.08
G0 Z0.00
G0 X2.25
G0 X108.75 Y-75.25
G1 X109.25 Z-0.08
G1 X109.75 Z-0.30
G0 Z0.00
G0 X123.75
G0 X110.25 Y-74.75
G0 Z-0.01
G1 X109.75 Z-0.30
G1 X109.25 Z-0.08
G0 Z0.00
G0 X2.25
G0 X9.25 Y-74.25
G1 X9.75 Z-0.30
G1 X10.25 F300
G1 X16.25
G1 X16.75 Z-0.08 F100

Unless Snapmaker is sending something in addition to the g-code through some hidden back channel, that should cover the speed setting.

There is one thing very, very bizarre in here, though (that probably has no impact on anything). At the break between toolpaths, I get another header:


;Header Start 
;renderMethod: line
;max_power: 255
;Header End

; G-code for laser engraving
; Generated by Snapmaker Luban
; G-code START <<<

Huh? Laser engraving? That one is clearly a Luban bug. :joy:

I just noticed something that is potentially significant. When it is actually doing the cutting, it says that the spindle speed is 18,000 RPM. It only says 12,000 in the starting screen before you start actually running the g-code.

OK, great that you found something.
The initial question was, what is your work flow, where does the bug occur?

-generated the cnc tool path in Luban or other like fusion360
-carved from Luban over serial or wifi or directly from touchscreen

If you answer these things and your programs and firmware of your machine are up to date, make a ticket and tell your findings snapmaker support.
https://snapmaker.formcrafts.com/support-ticket

2 Likes

Paths were generated in Luban.
File was uploaded from Luban to the device.
Issue occurs only on the on-device summary screen before you start cutting.
Everything is up-to-date.

I filed a ticket.

2 Likes

These lines are commented out, and don’t affect anything.
The way the g-code works - is you set power in % and you have the

M3 P100 ;P100 = 100%

There is definitely a bug, thank you for filling ticket. If you have ticket number please share it I could use it as an example.

Is there something new to this?

Thanks