BIGTREETECH-Relay-V1.2

(Basic Information:
Printer Model: RatRig-V- Core
Printerboard: BIGTREETECH Octopus v1.1
Klipper / fluiddpi)

Hello together,
on my printer I have an End gcode written in printer.cfg file to shut down the printer after the print is finished by the Bigtreetech relay V1.2:


[output_pin PS_ON_OFF]
pin: PE11
value: 1

[gcode_macro End_GCode]
gcode:
M104 S0 ; Extruder off
M140 S0 ; Heatbed off
M107 ; Fan off
G91 ; relative positioning
G1 E-5 F300 ; retract a little
G1 Z+20 ; lift print head
G28 X5 Y5 ; homing
M84 ; disable stepper motors
G90 ; absolute positioning
SET_PIN PIN=PS_ON_OFF VALUE=0 ; shut down the printer


So it works fine, but the printer gets shut down with the extruder at its high working temperature about 215 °C what is not good.
The goal would be to shut down the printer when the extruder temperature is below 60°C.
My question:
So I would like to have something like: “when printer temp is <60 then SET_PIN PIN=PS_ON_OFF VALUE=0”
How do I have to programm this line?

Thanks for your help!

Hello @TimoTimo !

Try with

[gcode_macro End_GCode]
gcode:
M104 S0 ; Extruder off
M140 S0 ; Heatbed off
M107 ; Fan off
G91 ; relative positioning
G1 E-5 F300 ; retract a little
G1 Z+20 ; lift print head
G28 X5 Y5 ; homing
M84 ; disable stepper motors
G90 ; absolute positioning
TEMPERATURE_WAIT sensor=heater_extruder maximum=60
SET_PIN PIN=PS_ON_OFF VALUE=0 ; shut down the printer
...

https://www.klipper3d.org/G-Codes.html#temperature_wait

Hey really thanks for your help. It’s working now

1 Like