Dual IDEX Printer - META Command to select Purge Script



  • Hi Community,

    I have a Dual IDEX printer with Duet 3 board and RFF 3.1.1 and would like to create a start script that runs a Purge.g program depending on the currently selected ToolHeads.

    I thought of the META commands. Is this the right command?

    b01b9d6e-6650-4afa-b5bf-a4ffe7616ad0-image.png

    But unfortunately I have not yet understood exactly how to use these command "currentTool".

    I know what the If condition should look like, but not in combination with this object models.
    Maybe someone can help me here.

    How do you handle multi-printhead printing on your printers?
    Are all printheads deselected in your IDLE state and you then select the correct printhead using the slicer?
    Or how do you do that?

    I always want to avoid pointless ToolChanges when I start printing

    Thank you

    Regards Christian 🙂



  • I also want to do something else with the retraction at the tfree.g if the temperature is not high enough.

    Here I am also looking for an example 🙂


  • administrators

    @CR3D said in Dual IDEX Printer - META Command to select Purge Script:

    I have a Dual IDEX printer with Duet 3 board and RFF 3.1.1 and would like to create a start script that runs a Purge.g program depending on the currently selected ToolHeads.

    You could use this:

    if state.currentTool = 0
      M98 "Purge0.g"
    if state.currentTool = 1
      M98 "Purge1.g"
    

    or even:

    if state.currentTool >= 0
      M98 P{"Purge" ^ state.currentTool ^ ".g"}
    

    Please note, I have not tested either of these.


  • administrators

    @CR3D said in Dual IDEX Printer - META Command to select Purge Script:

    I also want to do something else with the retraction at the tfree.g if the temperature is not high enough.

    Here I am also looking for an example 🙂

    if heat.heaters[tools[state.currentTool].heaters[0]].current >= 180
      M83
      G1 E-5 F3000
    

    Hint: use M409 to explore the object model, and the echo command to check the syntax, e.g. send this from the command line:

    echo heat.heaters[tools[state.currentTool].heaters[0]].current
    


  • Thank you! 🙂

    I will test it ... 🙂



  • @dc42

    I tested following and it worked! 🙂

    if state.currentTool >= 0
      M98 P{"Purge" ^ state.currentTool ^ ".g"}
    

    This means that when a print starts, the first active print head is cleaned and purged.

    Would there be a way to clean the second printhead before using it for the first time? I don't want to do it with every tool change, because it takes too much time for long print jobs!

    How could you solve that?


  • administrators

    @CR3D said in Dual IDEX Printer - META Command to select Purge Script:

    Would there be a way to clean the second printhead before using it for the first time? I don't want to do it with every tool change, because it takes too much time for long print jobs!

    How could you solve that?

    To solve that really need variables, so you can use a variable to remember whether the tool has been cleaned before. Variable are not yet supported, although a limited number can be simulated in various ways.

    However, if you do not preheat the second print head before starting the print,then you could use the initial temperature of the print head at the start of its tpost file to decide whether or not to clean it. If the temperature is significantly below its assigned standby temperature, then wait for it to reach active temperature (M116) and then clean it.


Log in to reply