Starting macro before hot end heating?



  • How am I able to start a macro before the hot end starts heating on a print?

    I have the Duex5 and would like to turn some LEDs red to signify that it's heating. Then white during the print, and finally green when complete.



  • See here https://duet3d.com/wiki/G-code#M98:_Call_Macro.2FSubprogram

    Then add this before heating starts in your GCODE startup script.



  • It depends on the slicer… Slic3r first heat up bed and hotend, then execute custom G-Code...


  • administrators

    Has slic3r changed, I have used it much recently but you used to be able to override the start gcode with your own start gcode, including using placeholders for the configured temperatures.



  • @fma:

    It depends on the slicer… Slic3r first heat up bed and hotend, then execute custom G-Code...

    Slic3r always used to follow that sequence unless your start gcode contained M104/M109 or M190 then it overrides it and goes via the sequence you want.

    For example, I use (amongst a few other things)
    M104 S130
    M190 S[first_layer__bed_temperature]
    G29
    M109 S[first_layer_temperature]

    This allows my nozzle to begin heating but not wait, then the bed to heat and wait, then probing, then nozzle to go to full temp to being printing. The variables here are very useful there is a list of them in slic3r docs.



  • @DjDemonD:

    ….................................The variables here are very useful there is a list of them in slic3r docs.

    That's really useful to know - thanks Simon. Up until now I've always changed the temperatures in both the custom start G-code and the Filament settings. Now that I have that information, I'll won't need to keep messing around with my start G-code for different filaments.



  • no problems 🙂



  • Well, I guess this works if you use Slic3r Start G-Code. But I used my own, and only have a macro call there (because I want to be able to use difference slicers without the need to change settings everywhere). In that case, it does not work, as Slic3r can't know I'm setting bed/nozzle temp…


  • administrators

    FMA you could try putting M104 S0, M109 S0 in your slic3r start gcode. That would override slic3r. Then put whatever you want after that.



  • Clever! I will try that.

    Thanks.


Log in to reply