Cooldown Macro



  • Hi-

    I am trying to write a cooldown macro. After a print finishes, I want to turn on the part cooling fan 100% to speed up the hot end cooling. Once the setpoint is reached, turn off the fan and turn off the PSU.

    I am not getting that behavior though. The PSU will turn off early, or the hotend is at a temp greater than the setpoint and the fans are left 'on', meaning when I turn the PSU back on, the fans are on.

    I only have one tool, T0 and that is one of the last lines in my config.g.

    Any suggestions?

    M104 S45 ; set hot end temp to 45 and continue
    M106 S255 ; turn on fans 100%
    M104 S0 ; turn off bed
    M109 S45 ; set hotend temp to 45 and wait ti;l temp is reached
    M106 S0 ; turn off fan
    M81 ; turn off atx power



  • @sinned6915 It might be getting confused because you use M104 to turn off the bed but this should be M140. So what you have is: turn off the hot end then immediately after set it to 45 deg and wait.

    Also, M109 is deprecated but still supported because that's what a lot of slicers use. So if changing that M104 to M140 doesn't fix it, try using M116 instead https://duet3d.dozuki.com/Wiki/Gcode#Section_M116_Wait


  • administrators

    Is your hot end heatsink fan set to run thermostatically? if so, then command M81 S1 will schedule power off when all thermostatic fans have stopped running. Then all you need in your macro is:

    M106 S1 ; turn part cooling fan full on
    M81 S1 ; turn PSU off when hot end fan stops

    If you have your hot end heatsink fan always running, then you can temporarily make your part fan thermostatically controlled. If it is fan 0 and your hot end heater is heater 1 then like this:

    M106 P0 H1 T45 S1 ; make part fan thermostatically controlled
    G4 P1000 ; wait for thermostatic control to become active (this may not be necessary)
    M81 S1 ; turn PSU off when thermostatic part fan stops



  • i am having trouble figuring out what GCode to use to turn things off with-

    I am coming from the world of Marlin so I am used to M104/M140/M109/M190

    when i use the pulldowns in DWC, the GCode console shows it using G10 P0 S0 and G10 R0 S0, for tool 0.

    What is the proper RRF way?



  • @sinned6915 G10 is better because it allows you to set both active and standby temperatures. However, most slicers don't understand the concept of active and standby temperatures so they still use M104/140,109/190 so RRF still supports those commands. So in a nutshell, there isn't a "proper" RRF way but G10 is more flexible IMO.



  • @deckingman thanks for your input. I will try to use the G10 in my macro

    i wish there was a 're-education camp' for those of us who have come in from the Dark Side... but that is for another post



  • @sinned6915 The problem is that there is no single dark side, so re-education would depend on which version of the dark side you are coming from. The best advice I can give is to use the documentation as bed time reading. Start with this and or bookmark it and keep it as a tab in your browser https://duet3d.dozuki.com/Wiki/Gcode.



  • i have been reading. part of the issue i think is expert blindspot- like M80/M81. I am so used to using it as a simple analog 1 or 0 type function, it did not occur to me that there were any configurable options.



  • @sinned6915 said in Cooldown Macro:

    i have been reading. part of the issue i think is expert blindspot- like M80/M81. I am so used to using it as a simple analog 1 or 0 type function, it did not occur to me that there were any configurable options.

    Yes that's one thing to bear in mind and once you get head around it, you start to realise that there is much more that you can do. Basically just about everything is configurable, and not only that but configurable "on the fly". For example, my machine has 3 separate CoreXY gantries ( I won't go into detail here) so my homing file does all sorts of crazy stuff with re-mapping motors and end stops to home the various axes and then mapping them back to "normal" once homing is completed.

    Also remember that you can change speeds, accelerations, jerk values and just about anything else while a print is in progress which is very powerful for tuning.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.