<p>Your Marlin version is pretty old.</p>
<p>To enable the tuning of the bed, the <code>configuration.h</code> file requires the following compiler directive to be set:</p>
<p><code>#define PIDTEMPBED</code></p>
<p>If the hotend is tuned instead, this means that either the directive has not been set, or that the firmware is flawed by the following <a href="https://github.com/MarlinFirmware/Marlin/issues/12468" rel="nofollow noreferrer">issue (#12468)</a>.</p>
<p>You should update the firmware to a newer version by flashing a more recent build. Note that the issue was present in a Marlin 2.0.x bugfix branch, so try the latest version or one from early 2019.</p>

CC BY-SA 4.0
2024-03-01T13:39:04.863Z
2024-03-01T13:44:11.690Z
2024-03-01T13:44:11.690Z
0scar
<p>I'm attempting to get Autotune PID values for the heatbed. I'm using <code>M303</code> with an <code>E-1</code> parameter to designate the bed.  I'm also using an <code>S</code> parameter to designate the desired temperature. It's returning a &quot;Bad Extruder Number&quot; error each time. <code>M303</code> with no <code>E</code> parameter correctly runs the Autotune process and returns valid P, I and D values for the Extruder heater.</p>
<p>I'm using instructions found here, <a href="https://www.3dprintgorilla.com/marlin-firmware-m301-m303-m304-g-code-commands/" rel="nofollow noreferrer">Marlin Firmware M301 / M303 / M304 G-Code Commands Explained</a>.</p>
<p>Printer is a Prusa i3 clone using Marlin (version 1.1.6) with Repetier to send the commands.</p>

<pid>
M303 Autotune for heatbed fails with "Bad Extruder Number" error. Why?
allardjd
# M303 Autotune for heatbed fails with "Bad Extruder Number" error. Why?

(Asked by: username_0 on 2024-02-29)

I'm attempting to get Autotune PID values for the heatbed. I'm using `M303` with an `E-1` parameter to designate the bed. I'm also using an `S` parameter to designate the desired temperature. It's returning a "Bad Extruder Number" error each time. `M303` with no `E` parameter correctly runs the Autotune process and returns valid P, I and D values for the Extruder heater.

I'm using instructions found here, [Marlin Firmware M301 / M303 / M304 G-Code Commands Explained](https://www.3dprintgorilla.com/marlin-firmware-m301-m303-m304-g-code-commands/).

Printer is a Prusa i3 clone using Marlin (version 1.1.6) with Repetier to send the commands.

**Tags:** pid

---

## 1 answers

### Answer by username_1 on 2024-03-01. Score: 1

Your Marlin version is pretty old.

To enable the tuning of the bed, the `configuration.h` file requires the following compiler directive to be set:

`#define PIDTEMPBED`

If the hotend is tuned instead, this means that either the directive has not been set, or that the firmware is flawed by the following [issue (#12468)](https://github.com/MarlinFirmware/Marlin/issues/12468).

You should update the firmware to a newer version by flashing a more recent build. Note that the issue was present in a Marlin 2.0.x bugfix branch, so try the latest version or one from early 2019.


---

