ToolChanger profile for Cura?

Discussion in 'Getting Started' started by Beat, Dec 4, 2019.

  1. Beat

    Beat Active Member

    Joined:
    Apr 2, 2016
    Messages:
    31
    Likes Received:
    6
    Would anybody happen to have ToolChanger profile for Cura handy and be willing to share it?
    (I have a job where the ironing feature of Cura would come in really handy)

    Thanks in advance :)
     
  2. Aluminati

    Aluminati Member

    Joined:
    Dec 27, 2019
    Messages:
    7
    Likes Received:
    3
  3. yngndrw

    yngndrw Well-Known Member

    Joined:
    Dec 26, 2019
    Messages:
    55
    Likes Received:
    19
    I have just setup Cura for use with the tool changer, although I only have a single tool setup. (I put everything in the machine settings, I've not done anything with the extruder settings yet)

    The important part is to use the material_bed_temperature and material_print_temperature variables, otherwise Cura will insert an M109 which on the tool changer ends up either trying to print without a tool or if a tool is pre-selected, helpfully dropping the tool as it starts.

    Please note that I'm using David's Duet configuration, which is setup with the origin in the center of the bed. This is just a checkbox in Cura so it's easy to change.

    E3D Toolchanger - Cura Machine Serup.png

    Start G-code
    Code:
    M82 ; Absolute extrusion mode
    G28 ; Home
    G29 S1 ; Enable bed compensation
    
    M140 S{material_bed_temperature} ; Set bed temperature
    G10 P0 S{material_print_temperature} ; Set tool 0 active temperature
    T0 ; Tool 0
    M116 ; Wait for temperatures
    
    ; Prime the extruder
    G92 E0
    G1 F200 E3
    G92 E0
    End G-code
    Code:
    M140 S0 ; Bed temperature
    M144 ; Bed off
    
    ; Retract the filament
    G92 E1
    G1 E-1 F300
    
    G10 P0 S0 ; Tool heater off
    M106 S0 ; Fan off
    
    T-1
    
    G29 S2 ; Disable bed compensation
    
    G1 X0 Y-149 F15000 ; Park
    M84 ; Motors off
     
    mhe likes this.
  4. dc42

    dc42 Well-Known Member

    Joined:
    Aug 16, 2016
    Messages:
    526
    Likes Received:
    221
    Are you sure? It shouldn't do that. If a tool has already been selected, it should heat that tool. If no tool is selected, it should pick up the lowest numbered tool and then heat it.
     
  5. yngndrw

    yngndrw Well-Known Member

    Joined:
    Dec 26, 2019
    Messages:
    55
    Likes Received:
    19
    I'm afraid so. At first I thought it was related to my config for RepRapFirmware 3.0 but I also had the same results after switching to your configuration. I didn't bother following it up as it was marked as deprecated and instead switched to G10.

    I tried multiple times, some times manually homing, selecting the tool and heating it before running the g-code and other times starting from a fresh state. I tried a few combinations so I can't remember exactly what happened with them all, but the last one was when starting from a fresh state M109 would set the active tool but not collect it and therefore the T0 command that I had after it was ignored. I ended up stepping through the commands one by one to work out what was happening, when I got to the T0 command and found that it wasn't picking up the tool I checked the documentation and realised.

    Sadly I have since discarded the broken G-code and I don't have the Cura script that I was using at the time, but I think it might be because Cura was inserting the M109 before the start script and I was homing afterwards. I think that as the machine was not homed before the M109, it couldn't pick-up the tool but still set the active tool - But don't hold me to that, I didn't look into it any further after I switched to G10.
     
  6. smoki3

    smoki3 Active Member

    Joined:
    Aug 19, 2019
    Messages:
    41
    Likes Received:
    11
    Yes had the same issue with cura. The put a M109 before Homing. And I never got it running nice with the duet. Always had to manually edit the gcode. That why is now use simplify and slic3r.
     
  7. 1013D

    1013D Active Member

    Joined:
    Jan 17, 2020
    Messages:
    33
    Likes Received:
    6
    any updates to this profile? setting up the other 3 tools perhaps?
     
  8. 1013D

    1013D Active Member

    Joined:
    Jan 17, 2020
    Messages:
    33
    Likes Received:
    6
    I started with the above Cura settings and have tweaked them some. Cura (4.4.1) still does some strange things that you can't control. Like calling T0 first thing, and calling out both tools one after the other to do the skirt, even if you tell it only tool 1 is for bed plate adhesion)...so far I just do not use the skirt, as the priming of the tool generally takes car of that.

    Still tweaking, but it works ok so far
    I added the start and stop comment notes to make it easier to debug the g-code and see what is called where

    Start code:
    Code:
    ; PRINTER START G-CODE START
    M82 ; Absolute extrusion mode
    M98 Phomeall.g ; Home
    ; G29 S0 ; Mesh bed probe and enable
    G29 S1 ; Enable bed compensation
    
    M140 S{material_bed_temperature} ; Set bed temperature
    G10 P0 S{material_print_temperature} ; Set tool 0 active temperature
    M116 ; Wait for temperatures
    
    
    ; PRINTER START G-CODE STOP
    end code:
    Code:
    ; PRINTER END G-CODE START
    M140 S0 ; Bed temperature
    M144 ; Bed off
    
    ; Retract the filament
    G92 E1
    G1 E-1 F300
    ; PRINTER END G-CODE START
    
    G10 P0 S0 ; Tool heater off
    M106 S0 ; Fan off
    
    T-1 ; put current tool away
    
    G29 S2 ; Disable bed compensation
    
    G1 X0 Y0  F15000 ; Park
    G1 Z285 F1500
    M84 ; Motors off
    M300 S300 P1000 ; BEEP
    Tool 0 start code (change tool #'s for other tools)
    Code:
    ; EXTRUDER1 START G-CODE START
    G10 P0 S{material_print_temperature} ; Set tool 1 active temperature
    M116 ; Wait for temperatures
    T0
    
    ; EXTRUDER1 START G-CODE END
    Tool 0 end code
    Code:
    ; EXTRUDER1 END G-CODE START
    T-1
    ; EXTRUDER1 END G-CODE END
     
    #8 1013D, Feb 13, 2020
    Last edited: Feb 13, 2020
  9. 1013D

    1013D Active Member

    Joined:
    Jan 17, 2020
    Messages:
    33
    Likes Received:
    6
    another note for Cura. make sure you turn up the travel speed in ALL the extruders.,,,I just went to 50,000 so that the machine max takes over.


    Also that rogue T0 call before everything that you cannot turn off can mess with you if it trys to home afterwards. I changed my home call out to the M98 Phomeall.g and made sure there was a T-1 in there so it should put the tool away before re-homing, if there is one in the head.
     
    #9 1013D, Feb 13, 2020
    Last edited: Feb 13, 2020
  10. Nibbels

    Nibbels Well-Known Member

    Joined:
    Dec 12, 2019
    Messages:
    172
    Likes Received:
    32
    Duet2:
    I only have M0 as end code.
    And the configuration is within the stop.g
    https://duet3d.dozuki.com/Wiki/Gcode#Section_M0_Stop_or_Unconditional_stop

    I had all the codes within the slicer on my other printers but disconnecting hardware specific programming from the actual print is very very nice (I think).

    When Simplify3D stops adding the bed temperature controller again and again - or I find the trick - I will add the bed temperature to the duets filament profiles (or similar).
    https://duet3d.dozuki.com/Wiki/Gcode#Section_M701_Load_filament

    So my future print will be "loading filament to tools" + running the path + M0
    I can use old gcode in the future and the printer will print it using more recent (printer hardware-) settings.
     
  11. 1013D

    1013D Active Member

    Joined:
    Jan 17, 2020
    Messages:
    33
    Likes Received:
    6
    I ended up removing the prime and purge from the duet tool change G-codes, and put it in Cura instead, seems to work better that way.
    Here is my latest working cura profile: (adjustz.gcode resets and then sets the babystepping)

    Code:
    ; PRINTER START G-CODE START
    M140 S{material_bed_temperature} ; Set bed temperature
    G10 P0 S{material_print_temperature_layer_0} ; Set tool 0 active temperature
    T-1 ; put away tool in case it pulled it out
    
    M82 ; Absolute extrusion mode
    M98 Phomeall.g ; Home
    M116 ; Wait for temperatures
    G28 Z; re home Z at temperature
    G29 S0 ; Mesh bed probe and enable
    ; G29 S1 ; Enable bed compensation
    M98 Padjustz ; adjsut z in the sub program
    
    ; PRINTER START G-CODE STOP
    Code:
    ; PRINTER END G-CODE START
    M140 S0 ; Bed temperature
    M144 ; Bed off
    
    ; Retract the filament
    G92 E1
    G1 E-1 F300
    ; PRINTER END G-CODE START
    
    G10 P0 S0 ; Tool heater off
    M106 S0 ; Fan off
    
    T-1 ; put current tool away
    
    G29 S2 ; Disable bed compensation
    
    G1 X0 Y0  F15000 ; Park
    G1 Z285 F1500
    M84 ; Motors off
    M300 S300 P1000 ; BEEP
    extruder specific code. just change the numbers for the other tools
    Code:
    ; EXTRUDER1 START G-CODE START
    T0 ; this is done by cura before this anyway,this is mainly for reference
    G10 P0 S{material_print_temperature} ; Set tool 1 active temperature
    M116 ; Wait for temperatures
    
    
    M98 Pprime.g ; prime
    
    ; EXTRUDER1 START G-CODE END
    Code:
    ; EXTRUDER1 END G-CODE START
    M98 Ppurge.g ; purge
    T-1
    ; EXTRUDER1 END G-CODE END
     
  12. smoki3

    smoki3 Active Member

    Joined:
    Aug 19, 2019
    Messages:
    41
    Likes Received:
    11
    The main problem why I can not use Cura for the Tool Changer is that Cura always for a Tool Change command (Tx) before homing. Not matter whats in the start G-Code.
     
  13. dc42

    dc42 Well-Known Member

    Joined:
    Aug 16, 2016
    Messages:
    526
    Likes Received:
    221
    Please post on the duet3d forum about thus. We have a user there who is active in making changes to Cura and usually gets them accepted.
     
  14. Mark_XYZ

    Mark_XYZ Member

    Joined:
    Nov 25, 2021
    Messages:
    2
    Likes Received:
    0
    I know this thread is a little old, but I found some info a workaround for the Tx in cura.

    "As a workaround you can add a search-and-replace post-processing script that replaces ;Generated with Cura_SteamEngine 4.7.1\nT0 by just ;Generated with Cura_SteamEngine 4.7.1. That should prevent the need for manually editing every g-code file."

    https://github.com/Ultimaker/Cura/issues/8379
     

Share This Page