<h3>Pausing</h3>
<p>You could set temperatures for hotend and bed (respectively <a href="https://reprap.org/wiki/G-code#M104:_Set_Extruder_Temperature" rel="nofollow noreferrer"><code>M104</code></a> and <a href="https://reprap.org/wiki/G-code#M140:_Set_Bed_Temperature_.28Fast.29" rel="nofollow noreferrer"><code>M140</code></a> and after that introduce a pause/dwell time with <a href="https://reprap.org/wiki/G-code#G4:_Dwell" rel="nofollow noreferrer"><code>G4</code></a>. After the pause, you could lower temperatures and proceed the shutdown of the printer, as such the setting of the idle temperatures and dwell time need to be done in the beginning of your end G-code in your slicer.</p>
<h3>Not powering down</h3>
<p>Alternatively, you could just not power down the hotend and bed. A typical end G-code consists of de-powering the fans, steppers, temperatures and positioning the head in a parking position, e.g.:</p>
<pre>
 M106 S0              ; Turn fan off
 M104 S0              ; Turn extruder off
 M140 S0              ; Turn off bed
// G91                  ; Change to relative positioning
// G1 Z30 E-2 F3000     ; Raise Z 30mm (lowers the bed) NEVER DO THIS, IT WILL DESTROY YOUR PRINTER IF YOU PRINT LARGER THAN MAX-Z MINUS 30 MM
// G90                  ; Switch back to absolute mode
 G1 X0 Y0             ; Move X/Y to origin
 M84                  ; Disable steppers
</pre>
<p>You could easily change the temperatures to standby values:</p>
<pre>
 M106 S0              ; Turn fan off
 M104 S160            ; Turn extruder to standby
 M140 S40             ; Turn bed to standby
// G91                  ; Change to relative positioning
// G1 Z30 E-2 F3000     ; Raise Z 30mm (lowers the bed) NEVER DO THIS, IT WILL DESTROY YOUR PRINTER IF YOU PRINT LARGER THAN MAX-Z MINUS 30 MM
// G90                  ; Switch back to absolute mode
 G1 X0 Y0             ; Move X/Y to origin
 M84                  ; Disable steppers
</pre>

CC BY-SA 4.0
2019-07-06T04:26:31.400Z
Wouldn't the dwell command leave the printer in a state of "still processing SD card print job"? If so, I don't think that behaves well with respect to removing the SD card. Maybe I just need to run one of the print servers you can queue jobs through and all rather than moving each revision of a test over via SD card..
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2019-07-06T09:09:36.857Z
@R.. If you "dwell" indefinitely, you could abort the print, insert a new SD card and continue.
0scar
CC BY-SA 4.0
2019-07-06T21:16:23.313Z
Yeah, that's a possibility. I was looking for something less hackish (and with less manual steps each time) but maybe there isn't one.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2019-07-06T23:05:42.237Z
Hmm, maybe `M85` Inactivity Shutdown? I'm not sure how widely supported it is though. Guess I can try it.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2019-07-06T03:35:18.690Z
2019-07-06T09:21:50.793Z
2020-06-18T08:29:41.667Z
0scar
<p>Is there any G-code command to turn off hotend/bed heating after a specified timeout? I'd like to edit my end G-code to leave them heated to a standby temperature, rather than immediately letting them cool down, to eliminate the delay of re-heating between prints, but obviously it's not a good thing to leave them heated indefinitely.</p>

CC BY-SA 4.0
2019-07-06T14:26:07.203Z
Note: if you leave the hot end at extrusion temperature too long without extruding filament, the filament material will carbonize and stop up your hot end.
Perry Webb
CC BY-SA 4.0
2019-07-06T20:51:48.037Z
@PerryWebb: Is that an issue at something like 170°¢, just below extrusion temp? I was under the impression even the "preheat PLA" temp of 185°C was deemed ok to dwell at for a while without issues. But this is another good reason for having a timeout, aside from safety & energy use.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2019-07-06T21:04:46.210Z
Eventually, but that should give you a lot more time.  Getting the hot end to temperature usually doesn't take long.  It's getting the bed to temperature that is slow.  The only issue with keeping the bed heated is it makes getting the print off the bed hard.  The thermal coefficient of expansion causes the print to release from the bed when it cools.  You can pry PLA off a bed heated to 70C or below.  However, ABS on a bed at 110C will warp if you pry it off without cooling.
Perry Webb
CC BY-SA 4.0
2019-07-06T21:14:14.230Z
I'm actually leaning towards switching away from heated bed entirely for PLA anyway, but normally I remove prints at 60°C with no problem. Been a while since I used PETG but I don't recall having trouble removing them hot either. I find getting nozzle from 20 to 215 and bed from 20 to 60 take almost exactly the same time, though.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2019-07-06T22:49:45.387Z
For ABS with the bed at 110C, I wait until 65C.  By that time the print is completely loose.  I've removed PLA at 60C, but it is much easier below 40C, when it starts to release.
Perry Webb
CC BY-SA 4.0
2019-07-06T22:52:56.897Z
I've pulled ABS off at 110C when aborting a print, but the print warps severely.  It didn't matter because I was throwing it away.  I've removed PLA with the bed at 70C with no problem, but it takes some prying to do so.
Perry Webb
<g-code>
Standby hotend and bed heating with inactivity timer after print?
R.. GitHub STOP HELPING ICE
# Standby hotend and bed heating with inactivity timer after print?

(Asked by: username_0 on 2019-07-06)

Is there any G-code command to turn off hotend/bed heating after a specified timeout? I'd like to edit my end G-code to leave them heated to a standby temperature, rather than immediately letting them cool down, to eliminate the delay of re-heating between prints, but obviously it's not a good thing to leave them heated indefinitely.

**Tags:** g-code

> **Comments:**
> **username_1**: Note: if you leave the hot end at extrusion temperature too long without extruding filament, the filament material will carbonize and stop up your hot end.  
> **username_0**: @username_1: Is that an issue at something like 170°¢, just below extrusion temp? I was under the impression even the "preheat PLA" temp of 185°C was deemed ok to dwell at for a while without issues. But this is another good reason for having a timeout, aside from safety & energy use.  
> **username_1**: Eventually, but that should give you a lot more time.  Getting the hot end to temperature usually doesn't take long.  It's getting the bed to temperature that is slow.  The only issue with keeping the bed heated is it makes getting the print off the bed hard.  The thermal coefficient of expansion causes the print to release from the bed when it cools.  You can pry PLA off a bed heated to 70C or below.  However, ABS on a bed at 110C will warp if you pry it off without cooling.  
> **username_0**: I'm actually leaning towards switching away from heated bed entirely for PLA anyway, but normally I remove prints at 60°C with no problem. Been a while since I used PETG but I don't recall having trouble removing them hot either. I find getting nozzle from 20 to 215 and bed from 20 to 60 take almost exactly the same time, though.  
> **username_1**: For ABS with the bed at 110C, I wait until 65C.  By that time the print is completely loose.  I've removed PLA at 60C, but it is much easier below 40C, when it starts to release.  
> **username_1**: I've pulled ABS off at 110C when aborting a print, but the print warps severely.  It didn't matter because I was throwing it away.  I've removed PLA with the bed at 70C with no problem, but it takes some prying to do so.  

---

## 1 answers

### Answer by username_2 on 2019-07-06. Score: 2

### Pausing

You could set temperatures for hotend and bed (respectively [`M104`](https://reprap.org/wiki/G-code#M104:_Set_Extruder_Temperature) and [`M140`](https://reprap.org/wiki/G-code#M140:_Set_Bed_Temperature_.28Fast.29) and after that introduce a pause/dwell time with [`G4`](https://reprap.org/wiki/G-code#G4:_Dwell). After the pause, you could lower temperatures and proceed the shutdown of the printer, as such the setting of the idle temperatures and dwell time need to be done in the beginning of your end G-code in your slicer.

### Not powering down

Alternatively, you could just not power down the hotend and bed. A typical end G-code consists of de-powering the fans, steppers, temperatures and positioning the head in a parking position, e.g.:

```

 M106 S0              ; Turn fan off
 M104 S0              ; Turn extruder off
 M140 S0              ; Turn off bed
// G91                  ; Change to relative positioning
// G1 Z30 E-2 F3000     ; Raise Z 30mm (lowers the bed) NEVER DO THIS, IT WILL DESTROY YOUR PRINTER IF YOU PRINT LARGER THAN MAX-Z MINUS 30 MM
// G90                  ; Switch back to absolute mode
 G1 X0 Y0             ; Move X/Y to origin
 M84                  ; Disable steppers

```

You could easily change the temperatures to standby values:

```

 M106 S0              ; Turn fan off
 M104 S160            ; Turn extruder to standby
 M140 S40             ; Turn bed to standby
// G91                  ; Change to relative positioning
// G1 Z30 E-2 F3000     ; Raise Z 30mm (lowers the bed) NEVER DO THIS, IT WILL DESTROY YOUR PRINTER IF YOU PRINT LARGER THAN MAX-Z MINUS 30 MM
// G90                  ; Switch back to absolute mode
 G1 X0 Y0             ; Move X/Y to origin
 M84                  ; Disable steppers

```

> **Comments:**
> **username_0**: Wouldn't the dwell command leave the printer in a state of "still processing SD card print job"? If so, I don't think that behaves well with respect to removing the SD card. Maybe I just need to run one of the print servers you can queue jobs through and all rather than moving each revision of a test over via SD card..  
> **username_2**: @R.. If you "dwell" indefinitely, you could abort the print, insert a new SD card and continue.  
> **username_0**: Yeah, that's a possibility. I was looking for something less hackish (and with less manual steps each time) but maybe there isn't one.  
> **username_0**: Hmm, maybe `M85` Inactivity Shutdown? I'm not sure how widely supported it is though. Guess I can try it.  

---

