MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.14k stars 19.2k forks source link

[FR] Adjustable spindle speed(Spindle Pwr) while printing #24845

Open mAd-DaWg opened 1 year ago

mAd-DaWg commented 1 year ago

Is your feature request related to a problem? Please describe.

While "printing" with a cnc machine, its often needed to be able to adjust the spindle speed on the fly. Sending a "M03 S18000" command either via the menu, or via terminal does not apply the speed change immediately, but only minutes later, potentially after issues have already occurred due to incorrect spindle speeds. Sometimes the speed change only applies when stopping a "print" via the marlin menu, causing the spindle to suddenly change speeds, which is potentially dangerous.

Are you looking for hardware support?

No

Describe the feature you want

Marlin should process M03 commands with priority while printing (perhaps via Emergency parsing?)

Additional context

No response

mAd-DaWg commented 1 year ago

Example cnc configuration i am using (with btt skr2 board) Configuration.zip

DerAndere1 commented 1 year ago

M3 is working as documented. G-codes, including M3, are supposed to be processed sequentially. What you actually want is probably speed override and feed override. LinuxCNC has M-codes to enable feed/speed override: M48 to M53. Their feed/speed multiplier is set on the fly using controls (buttons/sliders), not via M-codes. If we really want to use M-codes for setting feed/speed-multiplier on the fly using the emergency parser, we should introduce new M-codes, not overload M3. Grbl solves this with extended ASCII realtime commands like 0x90

mAd-DaWg commented 1 year ago

@DerAndere1 you are right, that is exactly what i want. I also want to be able to apply it via the marlin menu, aka when im standing in front of the machine.