Back to the Gcode Dictionary
M140: Set Bed Temperature (Fast) or Configure Bed Heater
- Pnnn (RRF 1.20 and later) Bed heater index, default 01
- Hnnn Heater number
- Snnn Active/Target temperature
- Rnnn Standby temperature
- M140 H0
- M140 S55
- M140 S65 R40
The first example informs the firmware that bed heater 0 (implied, because no P parameter is provided) uses heater 0.
The second example sets the temperature of the bed heater to 55oC and returns control to the host immediately (i.e. before that temperature has been reached by the bed).
The third example sets the bed temperature to 65oC and the bed standby temperature to 40oC.
If the absolute negative temperature (-273 or lower) is passed as target temperature, the bed heater to be switched off:
RepRapFirmware also provides an optional 'H' parameter to set the hot bed heater number(s). If no heated bed is present, a negative value may be specified to disable it. M140 commands with H parameters would normally be used only in the config.g file.
In RRF3 a M140 command with H parameter (other than H-1) must come after the M950 command that creates that heater, and before any M143 command that sets a temperature limit for that heater.
1 On the Duet 2 WiFi and Duet 2 Ethernet you can configure up to 4 bed heaters.