Toolchange script for parking extruder



  • Hello, my new x axis with a parking dual extruder is almost ready. Is it possible to make a toolchange script like this?

    {IF NEWTOOL=1}T1
    'switch to new tool and do these things
    {IF NEWTOOL=1}M109 S240 T1 ;heat right tool to 240C before moving
    {IF NEWTOOL=1}G1 F800 E-1.0
    {IF NEWTOOL=1}G1 F800 E5.0 ;Default purge
    {IF NEWTOOL=1}G4 S5 ;Stabilize Hotend's pressure dwell 5 seconds
    {IF NEWTOOL=1}G92 E0 ;Zero extruder
    {IF NEWTOOL=1}G1 F800 E-1 ;Retract
    {IF NEWTOOL=1}G1 F800
    {IF NEWTOOL=1}G91
    {IF NEWTOOL=1}G1 F12000 Z2
    {IF NEWTOOL=1}G90

    {IF NEWTOOL=0}T0
    ; switch to new tool and do these things
    {IF NEWTOOL=0}M104 S200 T1 ;let right extruder cool to 200 while unused
    {IF NEWTOOL=0}G1 F1200 E-1.0
    {IF NEWTOOL=0}G1 F1000 E5.0 ;Default purge
    {IF NEWTOOL=0}G4 S2 ;Stabilize Hotend's pressure with dwell for 2 seconds
    {IF NEWTOOL=0}G92 E0 ;Zero extruder
    {IF NEWTOOL=0}G1 F2400 E-4 ;Retract
    {IF NEWTOOL=0}G1 F12000
    {IF NEWTOOL=0}G91
    {IF NEWTOOL=0}G1 F12000 Z2
    {IF NEWTOOL=0}G90

    (This is an example from simplify3d)

    Thanks danny_v1


  • administrators



  • Oh ok thanks!

    So if I understand it correctly I don't need the hole If instructions.

    Just for the understanding, when I do a home position on the x-axis, I also pick up Tool 0, so If the x-axis is homed Tool 0 is always attached. Then when I start a print I Do my bed leveling with a bltouch sensor which is connected with Tool 0. Then in the print is a tool change to Tool 1 and then I run tfree1.g, tpre1.g and tpost1.g. And the Tool 1 is now active. If there is a tool change back to Tool 0 I run tfree0.g, tpre0.g and tpost0.g.

    After the print I home my x-axis again and then automatically Tool 0 will attached again.

    I hope now I got it.

    Thanks

    danny_v1


  • administrators

    Yes that all sounds correct to me. Note, the tool change files are not run if the printer has not been homed. You can also use the P parameter on the T command to specify that you don't want some of the tool change files to be run.



  • Isn't the tfree file run of the currently active tool ?
    So when activating tool1 from tool0 it will: run tfree0.g, tpre1.g and tpost1.g ?


  • administrators

    @scachi said in Toolchange script for parking extruder:

    Isn't the tfree file run of the currently active tool ?
    So when activating tool1 from tool0 it will: run tfree0.g, tpre1.g and tpost1.g ?

    Yes, if the firmware knows that the printer has been homed.



  • Ok I will try it. Thank you very much!

    Kind regards

    danny_v1


 

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