Shutdown when finished, if nozzle is cool

edited October 2021 in Repetier-Server
Hi,

I'm looking to have my printers automatically shutdown when they've finished printing and when the nozzle reached like 50-60 degrees, but I can't seem to make them wait.

I use this in my "Run After Job" gcode, but it just shuts down straight away, it's like all the commands just get run at once... it doesn't even have chance to move the Y Axis:

; Sample end code - modify to your needs!
;@webAction "Tigger - Job Finished"
M400 ; Wait for current moves to finish, clearing the buffer
M104 T0 S0 ; Disable extruder
M140 S0 ; Disable bed
G1 X0 Y235 F9000
M84 ; Disable motor
;@waitForAllTemperatures 40
;@webAction "Tigger - Turn Off"

I've tried looking through the forums, but I'm afraid some of the posts get lost in translation for me and I'm not sure. I see people mentioning @execute or @idle?


Any help would be appreciated! Thanks

Comments

  • Is the web action acutally working when send manually? Doe snot look that wrong.

    In printer config you can also set to automatically disable printer if idle for a while which then executes an other script. You can also set a maximum temperature above which it does not get disabled.

    Your main problem is @waitForAllTemperatures does not do what you expect. The parameter is required precision, not target temperture. Also disabled heaters (actually anything < 25) always return true, so that is why it does not wait here.

    Solution is set temperature of extruder to 30 and precision to 2. Wait for it to reach 40°C and then disable it completely after the @waitForAllTemperatures 


  • The web action ";@webAction "Tigger - Turn Off"" works fine and does turn the printer off, but the problem is that it seems to run the entire script all at once in stead of waiting between each command.

    If I copy those commands into a new "Quick Command" to test it, the printer shuts down instantly, even before "G1 X0 Y235 F9000" has had chance to move the printer.

    I just tried changing it to the code below and ran it as a quick command to test it again, but it just shuts down instantly :(


    ; Sample end code - modify to your needs!
    ;@webAction "Tigger - Job Finished"
    M400 ; Wait for current moves to finish, clearing the buffer
    M104 T0 S0 ; Disable extruder
    M140 S0 ; Disable bed
    G1 X0 Y235 F9000
    M84 ; Disable motor
    M104 S40
    ;@webAction "Tigger - Turn Off"
  • You must use @syncmotion. This makes it wait that the hotend has really reached the 60 degrees.


  • I also have the printer shut down via a power socket. (ifttt)
    M109 R60 ;Wait until Hotend has 60 degrees
    @syncMotion
    ;@webAction Printer_off

    My printer (CR-10s Pro) also shut down as soon as it read the M109 code.
    SyncMotion causes the repeater server to wait and only at 60 degrees the rest of the Gcode is processed.

  • Keks said:
    I also have the printer shut down via a power socket. (ifttt)
    M109 R60 ;Wait until Hotend has 60 degrees
    @syncMotion
    ;@webAction Printer_off

    My printer (CR-10s Pro) also shut down as soon as it read the M109 code.
    SyncMotion causes the repeater server to wait and only at 60 degrees the rest of the Gcode is processed.

    It looks like that's got it, thanks!

    I'll test it out today properly.
  • edited October 2021
    I can't believe the solution was sat in front of me the whole time....

    There's an option in printer settings to have an idle time and an idle temperature. I set this to 10 mins and 50 degrees and it does exactly what I want.

     :o 
Sign In or Register to comment.