--- tag: m0306 title: Model predictive temperature control brief: Set MPC values for a hotend. author: CRCinAU requires: MPCTEMP group: thermal since: 2.0.9.4 codes: [ M306 ] notes: - Requires `MPCTEMP`. - View current values with [`M306`](/docs/gcode/M306.html) and no parameters. - If `EEPROM_SETTINGS` is enabled, all calibration values are saved with [`M500`](/docs/gcode/M500.html), loaded with [`M501`](/docs/gcode/M501.html), and reset with [`M502`](/docs/gcode/M502.html). - Heater Power (P) is related to the heater cartridge in the hotend. Most printers have 30 or 40 watt heaters. - '`M306 T` will move your hotend to 1mm above the bed for optimal calibration. You should ensure your hotend and print bed are free from debris before running an auto-tune.' - See [the Marlin MPC documentation](/docs/features/model_predictive_control.html) for more information about MPC parameters. parameters: - tag: A optional: true description: Ambient heat transfer coefficient (no fan). values: - tag: value type: float - tag: C optional: true description: Heatblock Capacity (joules/kelvin) values: - tag: value type: float - tag: E optional: true description: Extruder index. If omitted, the command applies to the active extruder. values: - tag: index type: int - tag: F optional: true description: Ambient heat transfer coefficient (fan on full). values: - tag: value type: float - tag: H optional: true description: Filament Heat Capacity (joules/kelvin/mm) values: - tag: value type: float - tag: P optional: true description: Heater power in watts values: - tag: value type: float - tag: R optional: true description: Sensor responsiveness (= transfer coefficient / heat capacity). values: - tag: value type: float - tag: T optional: true description: Autotune the selected extruder. examples: - pre: 'Configure MPCTEMP for 40W hotend heater' code: - M306 P40 - pre: 'Configure MPCTEMP for 70W hotend heater' code: - M306 P70 - pre: 'Perform MPCTEMP auto-tune - after setting heater element power' code: - M306 T ---