3D printer G-code · Marlin
M301: Set hotend PID values (Marlin)
Set hotend PID values — Sets the PID values of the hotend by hand. M304 does the same for the bed. Normally you let M303 find them.
On this page
| Property | Value |
|---|---|
| Command | M301 |
| Function | Set hotend PID values |
| Firmware | Marlin |
| Group | Temperature |
| Syntax | M301 P<Kp> I<Ki> D<Kd> |
What does M301 do?
Sets the PID values of the hotend by hand. M304 does the same for the bed. Normally you let M303 find them.
Parameters
| Parameter | Meaning |
|---|---|
P I D | Proportional, integral and derivative values |
Example
M301 P22.2 I1.08 D114
M500Tips from practice
- M503 shows the active values.
Marlin. Many Marlin commands only exist when the feature is enabled in the firmware build. If the printer answers "Unknown command", the feature is missing. Klipper does not understand most of these settings codes; it uses printer.cfg instead.
Related commands
More temperature commands
| Command | Function | Firmware |
|---|---|---|
M104 | Set hotend temperature (no wait) | Marlin and Klipper |
M109 | Set hotend temperature and wait | Marlin and Klipper |
M140 | Set bed temperature (no wait) | Marlin and Klipper |
M190 | Set bed temperature and wait | Marlin and Klipper |
M141 | Set chamber temperature | Marlin |
M303 | PID autotune | Marlin |
M304 | Set bed PID values | Marlin |
PID_CALIBRATE | PID tuning (Klipper) | Klipper |
TEMPERATURE_WAIT | Wait for a temperature range | Klipper |
SET_HEATER_TEMPERATURE | Set a heater | 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 M301 do on a 3D printer?
M301 is set hotend PID values. Sets the PID values of the hotend by hand. M304 does the same for the bed. Normally you let M303 find them.
Does M301 work in Klipper and Marlin?
M301 is a Marlin command. Klipper uses its own commands and printer.cfg settings for this task.
Was this page helpful?