Change speed at a given layer

Hi Misamee,

I have not tried this myself, but according to several sources*, the magic g-code command is, or might be, M220 S[percent] where [percent] is literally the percentage of normal print speed (which would be 100). So the preset equivalents would be:

  • Silent (50% speed): M220 S50
  • Standard (100%): M220 S100
  • Sport (125%): M220 S125
  • Ludicrous (166%): M220 S166

From what I understand one isn’t limited to those presets/percentages specifically.

In theory one could insert this as custom code at a particular layer. However there are also some search results suggesting this “doesn’t work” or folks still searching for a solution for some reason. You don’t mention the printer model, but in any case it would be interesting to know if it works for you.

Studio controls this via a MQTT message/command (where one can set the speed from the device status monitor page, under the fan speed control and to left of the “Lamp” button). Seems to require just 3 fields:

{
  "command": "print_speed",
  "param": "1-4",  // 1 = silent, 4 = ludicrous
  "sequence_id": "###"   // common message sequence counter
}

So, again in theory, this could potentially be automated somehow. Though from what I understand remote MQTT access will require the printer to be in LAN mode and possibly with the “Developer” feature enabled.

* Sources:
G-code:
https://forum.bambulab.com/t/bambu-lab-x1-specific-g-code/666
https://forum.bambulab.com/t/has-anyone-found-a-way-to-initiate-a-print-at-non-default-speeds/67621/3
https://www.reddit.com/r/BambuLab/comments/1kcw6uu/bambu_studio_printing_speed_settings/
https://www.reddit.com/r/BambuLab/comments/16f5dn9/change_speed_via_gcode/ (negative report)

MQTT:
command_set_printing_speed() method: https://github.com/bambulab/BambuStudio/blob/ba4f27b169a3ccd82471a0e8e85f465c39bdd2be/src/slic3r/GUI/DeviceManager.cpp#L1793
DevPrintingSpeedLevel enum: https://github.com/bambulab/BambuStudio/blob/ba4f27b169a3ccd82471a0e8e85f465c39bdd2be/src/slic3r/GUI/DeviceCore/DevDefs.h#L130 (“SPEED_LEVEL_RAMPAGE:rofl: )
Automation example: https://forum.bambulab.com/t/change-speed-modes-midprint-automatically/59467

HTH!
-Max

PS. Here’s a different take on the g-code commands! Potentially interesting scripts in this repo as well.
https://github.com/jphannifan/x1plus-testing/blob/main/Speed%20Adjustment/BL-speed-adjust.md

1 Like