Basic Information:
Printer Model: Delta kossel custom
MCU / Printerboard: MKS Robin nano V3.1
Host / SBC: Raspberry pi 3B
klippy.log
klippy.log (38.4 KB)
Describe your issue:
I’m making a simple macro that should wait for the hotend temperature go down to 50 degrees and then shut down the machine.
The problem is that the WAIT_TEMPERATURE command is not executed and the machine shuts down instantly after G28.
the same problem goes for the M109 S50 command.
[gcode_macro COOLDOWN_SHUTDOWN]
gcode:
M140 S0 # Turn off bed
M104 S0
M106 S255
G28
SET_PIN PIN=CaseLight VALUE=0 # Apagar leds
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=50
#M109 R50 # Wait for hotend temp.
#G4 P300000 # Wait 5 min
M106 S0
M84 # Disable steppers
POWER_OFF_PRINTER # Turn off printer
[gcode_macro POWER_OFF_PRINTER]
gcode:
{action_call_remote_method("set_device_power",
device="Printer",
state="off")}
If i use the g4 command it works as expected, after the specified time the machine shuts down.
On the other hand, if I use g4 in the END_PRINT macro, it waits for the specified time, but the machine does not turn off… And indeed, TEMPERATURE_WAIT and M109 do not work either.
In the case of the END_PRINT macro after the m109 or WAIT_TEMPERATURE commands, the machine does not turn off unlike the COOLDOWN_SHUTDOWN macro.
[gcode_macro END_PRINT]
gcode:
M140 S0 # Turn off bed, extruder, and fan
M104 S0
G91 # Move nozzle away from print while retracting
G1 z2 E-3 F300
G90 # Home
G28
SET_PIN PIN=CaseLight VALUE=0 # Apagar leds
CLEAR_PAUSE
M106 S255
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=50
#M109 R50 # Wait for hotend temp.
#G4 P300000 # Wait 5 min
M106 S0
M84 # Disable steppers
POWER_OFF_PRINTER # Turn off printer
I don’t understand what is the order and/or preference of the commands inside the macros, I’m very confused.