3D printer G-code · Marlin and Klipper
M106: Fan on (part cooling) (Marlin & Klipper)
Fan on (part cooling) — Sets the speed of the part cooling fan from 0 to 255 (255 = 100 %). Slicers turn the fan off for the first layers and on after that.
On this page
| Property | Value |
|---|---|
| Command | M106 |
| Function | Fan on (part cooling) |
| Firmware | Marlin and Klipper |
| Group | Fans |
| Syntax | M106 S<0–255> [P<fan>] |
What does M106 do?
Sets the speed of the part cooling fan from 0 to 255 (255 = 100 %). Slicers turn the fan off for the first layers and on after that.
Parameters
| Parameter | Meaning |
|---|---|
S | Speed 0–255 |
P | Fan number (Marlin) |
Example
M106 S0 ; first layer
M106 S255 ; from layer 3 (PLA)Tips from practice
- ABS and ASA need little or no part cooling; PLA needs a lot for bridges and overhangs.
The command works in Marlin and Klipper. Options can differ: Klipper accepts fewer parameters for some M-codes and ignores codes it does not know with an "Unknown command" error.
Related commands
More fans commands
| Command | Function | Firmware |
|---|---|---|
M107 | Fan off | Marlin and Klipper |
Test it before you print
Paste your start code or a whole file into the 3D printer simulator. It plans every move, shows the time and finds missing waits, cold extrusion and moves outside the bed.
Open the simulatorFrequently asked questions
What does M106 do on a 3D printer?
M106 is fan on (part cooling). Sets the speed of the part cooling fan from 0 to 255 (255 = 100 %). Slicers turn the fan off for the first layers and on after that.
Does M106 work in Klipper and Marlin?
Yes, both firmwares understand M106.
Was this page helpful?