Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Dual extruder - Preheat nozzle before tool change

    Scheduled Pinned Locked Moved
    Gcode meta commands
    4
    14
    538
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • modlundefined
      modl
      last edited by

      Hello everyone,

      I'm using a dual extruder setup on my custom machine with a Mainboard 6HC, slicer used is PrusaSlicer. I also have a Raise3D pro3 at work and their slicer (IdeaMaker) has an option to start heating up the inactive extruder before tool change so the machine doesn't stay idle too long.
      Posting this here because I don't think the setting exists in PrusaSlicer, and I can't think of a way to detect an imminent tool change with a macro.
      Maybe I could use the last known layer time, but i will have to assume each subsequent layer has approximately the same completion time.
      Does someone have an idea ?
      0529ccce-4659-402e-a39a-911d698dc6f7-image.png
      Thank you in advance

      Best

      droftartsundefined 1 Reply Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @modl
        last edited by

        @modl I found this Prusaslicer feature request, also has a link to a post processing script: https://github.com/prusa3d/PrusaSlicer/issues/11035

        Alternatively you should be able to use IdeaMaker to generate Gcode for Duet boards.

        Ian

        Bumblebiber created this issue in prusa3d/PrusaSlicer

        open Start heating extruder so it will be hot as soon as needed (for tool changer or IDEX) #11035

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        modlundefined 1 Reply Last reply Reply Quote 0
        • modlundefined
          modl @droftarts
          last edited by

          @droftarts thank you very much i will give this a try.
          Unfortunately IdeaMaker doesn't handle large files very well, Prusa seems to have much better optimisation

          sebkritikelundefined 1 Reply Last reply Reply Quote 0
          • sebkritikelundefined
            sebkritikel @modl
            last edited by

            @modl Cura handles this pretty well, though I can’t remember if you need to install the ‘Machine Settings’ plugin or not (easy to install, can get it directly from the built in Cura add-in ‘store’).

            Cura allows you to set standby temperatures, and in the Machine Settings section you can configure heat up and cool down rates for your tools. The generated gcode file has temperature commands embedded that aid in bringing the temperature up to temperature before the tool is selected in RRF.

            Large(ish?) IDEX - 6HC, 1HCL
            Stratasys Dimension 1200es to 6HC Conversion

            modlundefined 1 Reply Last reply Reply Quote 1
            • modlundefined
              modl @sebkritikel
              last edited by

              @sebkritikel Thank you very much for the info I'll give it a try too. Last time I used Cura (maybe one year ago?) it also had issues handling the large files I'm dealing with. Will report !

              modlundefined 1 Reply Last reply Reply Quote 0
              • modlundefined
                modl @modl
                last edited by modl

                @sebkritikel so Cura fails to slice my model, I'll leave that aside for now

                @droftarts As for Prusaslicer's script i'm having trouble getting it to function . It is my understanding that it is looking for every M109 commands in the gcode to replace them with other commands a bit before the tool change. I tried editing my tool change gcode so it includes an M109 instead of the M116 I had set, but it still doesn't work. I need to dig

                ; tool change gcode 
                G91
                G1 Z1
                G90
                T[next_extruder]; select tool
                M104 S160 T[previous_extruder] ; set previous extruder to standby temp
                M109 S[temperature]  ; wait for temperature
                

                Edit : Maybe i need M73s in the gcode too?

                modlundefined sebkritikelundefined 2 Replies Last reply Reply Quote 0
                • modlundefined
                  modl @modl
                  last edited by

                  I found the setting to add M73 commands but it still would not output the preheating commands, I'll try contacting the creator of the script, see if he is willing to share his config file

                  1 Reply Last reply Reply Quote 0
                  • sebkritikelundefined
                    sebkritikel @modl
                    last edited by

                    @modl Re:Cura, do you believe it’s a file size issue? Just curious, as I exclusively use Cura, and the only slicing failures I’ve had deal with extremely large flat overhangs in conjunction with tree supports.

                    Large(ish?) IDEX - 6HC, 1HCL
                    Stratasys Dimension 1200es to 6HC Conversion

                    modlundefined 1 Reply Last reply Reply Quote 0
                    • modlundefined
                      modl @sebkritikel
                      last edited by

                      @sebkritikel I don't have large flat overhangs, but i do have a lot of complex overhangs (printing a "realistic" model of a plant) using, indeed, tree supports.

                      sebkritikelundefined 1 Reply Last reply Reply Quote 0
                      • sebkritikelundefined
                        sebkritikel @modl
                        last edited by

                        @modl ah gotcha, bummer to hear!

                        Not that you should be troubleshooting Cura, but if you’re so inclined - https://github.com/Ultimaker/Cura/discussions/18080

                        Large(ish?) IDEX - 6HC, 1HCL
                        Stratasys Dimension 1200es to 6HC Conversion

                        modlundefined 1 Reply Last reply Reply Quote 0
                        • modlundefined
                          modl @sebkritikel
                          last edited by

                          @sebkritikel Thank you I tried with the nightly build. Still not able to slice but if i understand correctly, a report was sent to cura devs ? Hopefully this helps

                          sebkritikelundefined 1 Reply Last reply Reply Quote 0
                          • sebkritikelundefined
                            sebkritikel @modl
                            last edited by

                            @modl Hope so!

                            Depending on how sensitive you are to sharing your print file, I could take a look at the project and see whats going on.

                            Insert the model into Cura, do File->Save Project, and then upload that .3mf file to Google drive (or an equivalent). You could post that link here, or directly message me the drive link,

                            Large(ish?) IDEX - 6HC, 1HCL
                            Stratasys Dimension 1200es to 6HC Conversion

                            1 Reply Last reply Reply Quote 0
                            • modlundefined
                              modl
                              last edited by modl

                              Hi eveyone here is an update on this. So I'm stil lnot able to have Prusa's macro to work, in the meantime I did two things , one is working the second remains to be tested. I needed to implement the first solution in deamon.g to accomodate an ongoing long print (2weeks) that didn't have a single macro called on tool changes.

                              This assumes that succesive layer times have little variations (successive tool work times are approximately similar) which is the case for me with variations from layer to layer being a couple tens of seceonds at max . The thing is, every tool is going to be preheated regardless of their future usage, which is OK in my case as both tools are used until the last layers

                              Here is what i have in deamon.g

                              if state.status == "processing"
                              	if exists(global.previousTool)    
                              		if state.currentTool != global.previousTool            ; executes right after tool change
                              			G10 P{abs(state.currentTool - 1)} R160
                              			if exists(global.newToolchangeTime)                ; intitialize previous tool change time with last know tool change time
                              				if !exists(global.previousToolchangeTime)
                              					global previousToolchangeTime = global.newToolchangeTime
                              				else
                              					set global.previousToolchangeTime = global.newToolchangeTime
                              			if !exists(global.newToolchangeTime)               ; update tool change time
                              				global newToolchangeTime = state.time
                              			else
                              				set global.newToolchangeTime = state.time
                              			echo "Last Toolchange time was :", global.previousToolchangeTime                 ; see if it works as intended
                              			echo "New Toolchange time is :", global.newToolchangeTime
                              			if exists(global.newToolchangeTime) && exists(global.previousToolchangeTime)
                              				echo "Calculating time between last tool changes..."
                              				if state.currentTool == 0	
                              					if !exists(global.lasttoolworkduration0)
                              						global lasttoolworkduration1 = global.newToolchangeTime - global.previousToolchangeTime
                              					else
                              						set global.lasttoolworkduration1 = global.newToolchangeTime - global.previousToolchangeTime
                              				if state.currentTool == 1	
                              					if !exists(global.lasttoolworkduration1)
                              						global lasttoolworkduration0 = global.newToolchangeTime - global.previousToolchangeTime
                              					else
                              						set global.lasttoolworkduration0 = global.newToolchangeTime - global.previousToolchangeTime
                              			if exists(global.lasttoolworkduration0)
                              				echo "It took", global.lasttoolworkduration1, "s between two tool changes from 1 to 0"
                              			else
                              				echo "Not enough tool changes were sampled"	
                              			if exists(global.lasttoolworkduration1)
                              				echo "It took", global.lasttoolworkduration0, "s between two tool changes from 0 to 1"
                              			else
                              				echo "Not enough tool changes were sampled"	
                              	if !exists(global.previousTool)
                              		global previousTool = state.currentTool
                              	else 
                              		set global.previousTool = state.currentTool
                              	
                              	if !exists(global.preheatingoffset)
                              		global preheatingoffset = 40
                              	else
                              		set global.preheatingoffset = 40           ; start heating up 60 seconds before next layer
                              	if exists(global.previousLayerTime) && exists(global.lasttoolworkduration0) && exists(global.lasttoolworkduration1)
                              		if state.currentTool == 1 && state.time >= global.newToolchangeTime + global.lasttoolworkduration1 - global.preheatingoffset
                              			echo "Preheating extruder ", abs(state.currentTool - 1), "..."
                              			G10 P{abs(state.currentTool - 1)} R{heat.heaters[abs(state.currentTool -1) + 1].active}
                              			;G10 P{state.currentTool} R150 
                              		elif state.currentTool == 0 && state.time >= global.newToolchangeTime + global.lasttoolworkduration0 - global.preheatingoffset
                              			echo "Preheating extruder ", abs(state.currentTool - 1), "..."
                              			G10 P{abs(state.currentTool - 1)} R{heat.heaters[abs(state.currentTool -1) + 1].active}
                              			;G10 P{state.currentTool} R150 
                              

                              Now the goal, and second solution will be to execute a macro called preheatextruders.g in prusaslicer tool change custom gcode that will handle the Time globals
                              and let deamon.g do the regular checks

                              It's DIY and has a rather narrow scope i know but I hope it can help others in similar situations

                              dc42undefined 1 Reply Last reply Reply Quote 0
                              • dc42undefined
                                dc42 administrators @modl
                                last edited by

                                @modl thanks for sharing that.

                                In the future I have it in mind to be able to use the second file reader to run a simulation of the print in parallel with but ahead of the actual print. The simulation would be able to warn about upcoming tool changes, allowing for automatic tool preheat.

                                Duet WiFi hardware designer and firmware engineer
                                Please do not ask me for Duet support via PM or email, use the forum
                                http://www.escher3d.com, https://miscsolutions.wordpress.com

                                1 Reply Last reply Reply Quote 2
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA