Temperature coldown

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

See Help with Macro: SET_GCODE_VARIABLE doesnt set my variable - #10 by theophile and following

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