# Temperature coldown

**URL:** https://klipper.discourse.group/t/temperature-coldown/11169
**Category:** General Discussion
**Created:** [October 24, 2023, 12:44pm UTC](https://klipper.discourse.group/t/temperature-coldown/11169 "2023-10-24T12:44:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![audris](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@audris](https://klipper.discourse.group/u/audris)
#### Post date: [October 24, 2023, 12:44pm UTC](https://klipper.discourse.group/t/temperature-coldown/11169/1 "2023-10-24T12:44:32Z")

</div>

### Basic Information:

Printer Model: Ender 3 pro  
 MCU / Printerboard: skr mini v2  
 `klippy.log`

_Fill out above information and_ **_in all cases attach your_ `klippy.log` _file_** (use zip to compress it, if too big). _Pasting your_ `printer.cfg` _is **not** needed_  
_ **Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there** _

### Describe your issue:

Hello! I wanted to make gcode macro tepreture cooldown but i have some problem i don’t understand why tempreture variable bed\_temp doesn’t chaning at all, because tempreture in Thermals pnel is going down.

[gcode\_macro tem\_down\_while\_loop]  
gcode:  
M140 S0  
SET\_PIN PIN=fan\_bed VALUE=1  
M118 Fan ON!  
{% set loop\_ = 100 %}  
M118 Start loop!  
{% for x in range(loop\_) %}  
{% set bed\_temp = printer.heater\_bed.temperature|float %}  
M118 {bed\_temp} \> 30!  
{% if bed\_temp \> 30 %}  
M118 Waiting for 10s!  
G4 P10000  
M118 {loop.index\*10}s is waited!  
{% endif %}  
{% endfor %}  
M118 End loop!  
SET\_PIN PIN=fan\_bed VALUE=0  
M118 Fan OFF!

$ tem\_down\_while\_loop  
15:29:51  
Fan ON!  
15:29:51  
Start loop!  
15:29:51  
41.03 \> 30!  
15:29:51  
Waiting for 10s!  
15:29:59  
10s is waited!  
15:29:59  
41.03 \> 30!  
15:29:59  
Waiting for 10s!  
15:30:09  
20s is waited!  
15:30:09  
41.03 \> 30!  
15:30:09  
Waiting for 10s!  
15:30:19  
30s is waited!  
15:30:19  
41.03 \> 30!  
15:30:19  
Waiting for 10s!

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/2/24403b60a56b1a952f497f3f0eab0d9cec474931.png)

---

<div class="post-metadata">

### Author: ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)
#### Post date: [October 24, 2023, 1:08pm UTC](https://klipper.discourse.group/t/temperature-coldown/11169/2 "2023-10-24T13:08:49Z")

</div>

See [Help with Macro: SET\_GCODE\_VARIABLE doesnt set my variable - #10 by theophile](https://klipper.discourse.group/t/help-with-macro-set-gcode-variable-doesnt-set-my-variable/11014/10) and following

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)
#### Post date: [December 23, 2023, 1:09pm UTC](https://klipper.discourse.group/t/temperature-coldown/11169/3 "2023-12-23T13:09:36Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
