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

    Tool Swaps Multiple Hotend PID tunes Trigger Height drama

    Scheduled Pinned Locked Moved
    General Discussion
    4
    14
    717
    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.
    • SputnikOC3dundefined
      SputnikOC3d
      last edited by

      Ive finally gotten to a point that Ive always thought I wanted - and that was a printer where I could change out different hotends and nozzle types per print job project. Alas, along with that functionality comes added planning and management.

      Printer is a Voron 2.4r2 / Duet 3 Mini 5+ / Stealthburner w LGX Lite extruder.

      What Im trying ot get my head around is managing the different nozzle and hotend types of heaters / thermistors / nozzles - PID tune settings, trigger heights and Z offsets for 4 tools

      Phaetus Dragonfly - .4 nozz Tungsten Carbide / 40W Heater / pt1000 therm
      E3d REVO - .4 Nozz Brass / revo heater at 40W and NT4 type Therm
      Phaetus RAPIDO - unknown heater / semitic NT4 type thermistor
      Phaetus Dragon HF - .6 nozz / 50 W Heater / pt1000 thermistor

      All of these will have different pid tunes needed. All will have slightly different trigger offsets as well.

      Im confused by the Z param settings in G10 vs. G31 Z offset vs. Trigger height ...

      Unless Im mistaken ... I cant edit the PID section of the overide-config.g as everytime I tune one of these hotends - it removes all references to the H1 or H0 settings - even if i try and save the file with 4 of those settings commented out - so I could manually swap the tool pids in the editor.

      I dont want to have to retest trigger heights and re tune the toolhead every time I switch them. How can I effectively manage these settings ? I thought Tool0 - Tool3 might be the answer but that introduces more questions I think than answers.

      Appreciate guidance here. Searching docs leads to either overly complicated CNC machine examples that dont apply of super basic stuff that doesnt seem to be workable

      1 Reply Last reply Reply Quote 0
      • OwenDundefined
        OwenD
        last edited by OwenD

        I'm not sure I understand how you're trying to work.
        Are you saying that you have four different tools, but only want to configure one tool in your config?

        If you set them up as T0 - T3 then you should be able to apply all your different settings in the tool change macros.

        If you only want one tool defined then put all your different settings into macros and come up with a way to identify the various tools.
        For example you could use a pogo pin contact connector which is wire to two i/o pins that use internal pullup.
        By altering the wiring to either ground or not ground each pin you have four possibilities.
        Then just check the state of the pins in your tool change to know which tool is connected.
        It would also alert you to a tool not being present.

        SputnikOC3dundefined 2 Replies Last reply Reply Quote 0
        • SputnikOC3dundefined
          SputnikOC3d @OwenD
          last edited by

          @owend

          No sir. Sorry for any confusion. Im happy to setup different tools in the config, but Im not getting how that would work in reality.

          I went to the configurator app to try and get an idea / template - of how to set them all up in the config.g, but the trigger height and z offset is confusing me ... and are all the tools H1 for the hotend .. and if thats the case - wont the PID tunes in the overide-config.g just keep getting over written ?

          ; Heaters
          M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp
          M950 H0 C"bedheat" T0                          ; create bed heater output on bedheat and map it to sensor 0
          M307 H0 B1 S1.00                               ; enable bang-bang mode for the bed heater and set PWM limit
          M140 H0                                        ; map heated bed to heater 0
          M143 H0 S120                                   ; set temperature limit for heater 0 to 120C
          M308 S1 P"e0temp" Y"thermistor" T100000 B4138  ; configure sensor 1 as thermistor on pin e0temp
          M950 H1 C"e0heat" T1                           ; create nozzle heater output on e0heat and map it to sensor 1
          M307 H1 B0 S1.00                               ; disable bang-bang mode for heater  and set PWM limit
          M143 H1 S280                                   ; set temperature limit for heater 1 to 280C
          
          
          
          ; Tools
          M563 P0 S"DragonFly" D0 H1 F0                  ; define tool 0
          G10 P0 X0 Y0 Z6.5                              ; set tool 0 axis offsets
          G10 P0 R0 S0                                   ; set initial tool 0 active and standby temperatures to 0C
          M563 P1 S"E3D Revo" F0                         ; define tool 1
          G10 P1 X0 Y0 Z5.5                              ; set tool 1 axis offsets
          G10 P1 R0 S0                                   ; set initial tool 1 active and standby temperatures to 0C
          M563 P2 S"RAPIDO" F0                           ; define tool 2
          G10 P2 X0 Y0 Z6.8                              ; set tool 2 axis offsets
          G10 P2 R0 S0                                   ; set initial tool 2 active and standby temperatures to 0C
          M563 P3 S"Dragon HF" F0                        ; define tool 3
          G10 P3 X0 Y0 Z4.8                              ; set tool 3 axis offsets
          G10 P3 R0 S0                                   ; set initial tool 3 active and standby temperatures to 0C
          
          ; Custom settings are not defined
          
          ; Miscellaneous
          T0                                             ; select first tool
          
          1 Reply Last reply Reply Quote 0
          • SputnikOC3dundefined
            SputnikOC3d @OwenD
            last edited by

            @owend - can I set the PID params and the heater and therm types per tool as well in the tools section? I wasnt seeing examples of that being done - so I suspected for good reason - like thats not doable or adviseable

            fcwiltundefined 1 Reply Last reply Reply Quote 0
            • fcwiltundefined
              fcwilt @SputnikOC3d
              last edited by

              @sputnikoc3d said in Tool Swaps Multiple Hotend PID tunes Trigger Height drama:

              @owend - can I set the PID params and the heater and therm types per tool as well in the tools section? I wasnt seeing examples of that being done - so I suspected for good reason - like thats not doable or adviseable

              Certainly if each tool has it's own heater - which is not unusual.

              Frederick

              Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

              SputnikOC3dundefined 1 Reply Last reply Reply Quote 0
              • SputnikOC3dundefined
                SputnikOC3d @fcwilt
                last edited by

                @fcwilt - "if they have their own heater" ...

                To my mind ... they all have different types of heaters installed in them, but Im not sure thats hte context of what your stating. I suspect for that to be true - Id have to have identified a unique HEATER in config.g for them ... but not sure how.

                What can I search for to find examples of that ?

                Am I totally over complicating this ?

                What Id like to do is have all this defined - somewhere ... and either select the tool from the DWC drop down or execute a macro that tells RRF that I now want to be using T0 or T1 or T2 etc for this print job. Also i think I have ot have my slicer start G code insync with this ?

                fcwiltundefined 1 Reply Last reply Reply Quote 0
                • fcwiltundefined
                  fcwilt @SputnikOC3d
                  last edited by

                  @sputnikoc3d said in Tool Swaps Multiple Hotend PID tunes Trigger Height drama:

                  @fcwilt - "if they have their own heater" ...

                  To my mind ... they all have different types of heaters installed in them, but Im not sure thats hte context of what your stating. I suspect for that to be true - Id have to have identified a unique HEATER in config.g for them ... but not sure how.

                  What can I search for to find examples of that ?

                  Am I totally over complicating this ?

                  What Id like to do is have all this defined - somewhere ... and either select the tool from the DWC drop down or execute a macro that tells RRF that I now want to be using T0 or T1 or T2 etc for this print job. Also i think I have ot have my slicer start G code insync with this ?

                  Here is a trimmed down version of the config.g file from my multi-tool printer:

                  
                  ; ****************************************************************************************************
                  ; temp sensors
                  ; ****************************************************************************************************
                  
                  ; 3HC temp sensors (extruder)
                  
                  M308 S0        P"1.temp0" Y"pt1000"                    ; configure sensor (S), name (A), pin name (P), type (Y), properties (T,B)
                  M308 S1        P"1.temp1" Y"pt1000"                    ; configure sensor (S), name (A), pin name (P), type (Y), properties (T,B)
                  M308 S2        P"1.temp2" Y"pt1000"                    ; configure sensor (S), name (A), pin name (P), type (Y), properties (T,B)
                  
                  ; 6HC temp sensors (extruder)
                  
                  M308 S3        P"temp1" Y"pt1000"                      ; configure sensor (S), name (A), pin name (P), type (Y), properties (T,B)
                  
                  ; ****************************************************************************************************
                  ; heaters
                  ; ****************************************************************************************************
                  
                  ; 3HC extruder heaters
                  
                  M950 H0 C"1.out0" T0 Q250                              ; create heater (H), pin name(C), frequency (Q), temp sensor(T)
                  M307 H0 B0 S1.00 D5.52 E1.35 K0.422:0.000 R2.036 V24.0 ; heater (H), mode (B), max pwm (S) - values D, E, K, V determined by running heater tuning
                  M143 H0 S250                                           ; set heater (H) temperature limit (S)
                  
                  M950 H1 C"1.out1" T1 Q250                              ; create heater (H), pin name(C), frequency (Q), temp sensor(T)
                  M307 H1 B0 S1.00                                       ; heater (H), mode (B), max pwm (S) - values D, E, K, V determined by running heater tuning
                  M143 H1 S250                                           ; set heater (H) temperature limit (S)
                  
                  M950 H2 C"1.out2" T2 Q250                              ; create heater (H), pin name(C), frequency (Q), temp sensor(T)
                  M307 H2 B0 S1.00                                       ; heater (H), mode (B), max pwm (S) - values D, E, K, V determined by running heater tuning
                  M143 H2 S250                                           ; set heater (H) temperature limit (S)
                  
                  ; 6HC extruder heaters
                  
                  M950 H3 C"out1" T3 Q250                                ; create heater (H), pin name(C), frequency (Q), temp sensor(T)
                  M307 H3 B0 S1.00                                       ; heater (H), mode (B), max pwm (S) - values D, E, K, V determined by running heater tuning
                  M143 H3 S250                                           ; set heater (H) temperature limit (S)
                  
                  ; other heater settings
                  
                  ; ****************************************************************************************************
                  ; M570: Configure heater fault detection
                  ;  Hnnn Heater number
                  ;  Pnnn Time in seconds for which a temperature anomaly must persist on this heater before raising a heater fault (default 5 seconds)
                  ;  Tnnn Permitted temperature excursion from the setpoint for this heater (default 15C)
                  ;  Snnn Integer timeout in minutes (can be set to 0) for print to be cancelled after heater fault (Firmware 1.20 and later). If the S parameter timeout occurs (which only happens if a SD print is in progress), RRF will also try to turn off power via the PS_ON pin.
                  ; ****************************************************************************************************
                  
                  M570 H0 T15 P300                                      ; heater fault timeout
                  M570 H1 T15 P300                                      ; heater fault timeout
                  M570 H2 T15 P300                                      ; heater fault timeout
                  M570 H3 T15 P300                                      ; heater fault timeout
                  
                  ; ****************************************************************************************************
                  ; cooling fans
                  ; -- P# is fan, S# is speed (0 to 255 or 0.0 to 1.0) H# means turn on fan when heater H# temp hits T#
                  ; -- H-1 means no thermostatic control
                  ; ****************************************************************************************************
                  
                  ; --- 3HC 4 wire fans (extruder cooling) (tach support) ---
                  
                  M950 F0 C"1.out3" Q500                    ; create fan (F), pin name (C), frequency (Q)
                  M106 P0 C"Hotend 0" L0 X255 S0 H0 T45     ; set fan (P), name (C), min speed (L) max speed (X), speed (S), temp sensor (H)
                  
                  M950 F1 C"1.out4" Q500                    ; create fan (F), pin name (C), frequency (Q)
                  M106 P1 C"Hotend 1" L0 X255 S0 H1 T45     ; set fan (P), name (C), min speed (L) max speed (X), speed (S), temp sensor (H)
                  
                  M950 F2 C"1.out5" Q500                    ; create fan (F), pin name (C), frequency (Q)
                  M106 P2 C"Hotend 2" L0 X255 S0 H2 T45     ; set fan (P), name (C), min speed (L) max speed (X), speed (S), temp sensor (H)
                  
                  ; --- 6HC 4 wire fans (extruder cooling) ---
                  
                  M950 F3 C"out4" Q500                      ; create fan (F), pin name (C), frequency (Q)
                  M106 P3 C"Hotend 3" L0 X255 S0 H3 T45     ; set fan (P), name (C), min speed (L) max speed (X), speed (S), temp sensor (H)
                  
                  ; --- 3HC 2 wire fans (part cooling) ---
                  
                  M950 F4 C"1.out6" Q500                    ; create fan (F), pin name (C), frequency (Q)
                  M106 P4 C"Tool 0" L0 X255 S0 H-1          ; set fan (P), name (C), min speed (L) max speed (X), speed (S), temp sensor (H)
                  
                  M950 F5 C"1.out7" Q500                    ; create fan (F), pin name (C), frequency (Q)
                  M106 P5 C"Tool 1" L0 X255 S0 H-1          ; set fan (P), name (C), min speed (L) max speed (X), speed (S), temp sensor (H)
                  
                  M950 F6 C"1.out8" Q500                    ; create fan (F), pin name (C), frequency (Q)
                  M106 P6 C"Tool 2" L0 X255 S0 H-1          ; set fan (P), name (C), min speed (L) max speed (X), speed (S), temp sensor (H)
                  
                  ; --- 6HC 2 wire fans (part cooling) ---
                  
                  M950 F7 C"out7" Q500                      ; create fan (F), pin name (C), frequency (Q)
                  M106 P7 C"Tool 3" L0 X255 S0 H-1          ; set fan (P), name (C), min speed (L) max speed (X), speed (S), temp sensor (H)
                  
                  ; ****************************************************************************************************
                  ; tools
                  ; ****************************************************************************************************
                  
                  ; ----------------------------------------------------------------------------------------------------
                  ; --- M563 ---
                  ; P       = tool number
                  ; S       = tool name (optional)
                  ; D       = extruder drive
                  ; H       = associated heater number
                  ; F       = associated fan number
                  ; --- G10 ---
                  ; P       = tool number
                  ; X, Y, Z = axis offsets
                  ; --- M568 ---
                  ; P       = tool number
                  ; S       = initial active temperature
                  ; R       = initial standby temperature
                  ; A       = state (0 = off, 1 = standby, 2 = on)
                  ; ----------------------------------------------------------------------------------------------------
                  
                  ; --- tool 0 ---
                  
                  M563 P0 S"tool 0" D0 H0 F0    ; define tool 0 (P), name (S), extruder drive (D), heater (H), fan (F)
                  G10 P0 X0 Y37.20 Z-5.5        ; set tool 0 (P) axis offsets (XYZ)
                  M568 P0 S0 R0 A0              ; set tool 0 (P) temperatures (S and R) state (A)
                  
                  ; --- tool 1 ---
                  
                  M563 P1 S"tool 1" D1 H1 F1    ; define tool 1 (P), name (S), extruder drive (D), heater (H), fan (F)
                  G10 P1 X0 Y30 Z-30            ; set tool 1 (P) axis offsets (XYZ)
                  M568 P1 S0 R0 A0              ; set tool 1 (P) temperatures (S and R) state (A)
                  
                  ; --- tool 2 ---
                  
                  M563 P2 S"tool 2" D2 H2 F2    ; define tool 2 (P), name (S), extruder drive (D), heater (H), fan (F)
                  G10 P2 X0 Y20 Z-20            ; set tool 2 (P) axis offsets (XYZ)
                  M568 P2 S0 R0 A0              ; set tool 2 (P) temperatures (S and R) state (A)
                  
                  ; --- tool 3 ---
                  
                  M563 P3 S"tool 3" D3 H3 F3   ; define tool 3 (P), name (S), extruder drive (D), heater (H), fan (F)
                  G10 P3 X0 Y10 Z-10           ; set tool 3 (P) axis offsets (XYZ)
                  M568 P3 S0 R0 A0             ; set tool 3 (P) temperatures (S and R) state (A)
                  
                  

                  Everything you see relates to the different temp sensors, heaters, cooling fans (hotend and part) for each of the 4 tools that are configured at the bottom of this chunk of code.

                  Frederick

                  Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                  SputnikOC3dundefined 1 Reply Last reply Reply Quote 1
                  • SputnikOC3dundefined
                    SputnikOC3d @fcwilt
                    last edited by

                    @fcwilt - as always sir .. you come thru with the goods! TY very much

                    This is exactly what I was seeking - clarifies many of the missing pieces I was not understanding - on the "How To".

                    Im going to start with 2 tools and get that working then add in the other two. I dont have a Jubilee type setup - so mine will be manually swapped in and out when the printer is off.

                    Safe to assume that this general config you've posted doesnt require all tools / toolheads / boards to be powered up and connected to CAN

                    fcwiltundefined 1 Reply Last reply Reply Quote 0
                    • fcwiltundefined
                      fcwilt @SputnikOC3d
                      last edited by fcwilt

                      @sputnikoc3d said in Tool Swaps Multiple Hotend PID tunes Trigger Height drama:

                      @fcwilt - as always sir .. you come thru with the goods! TY very much

                      Glad to help when I can.

                      Safe to assume that this general config you've posted doesnt require all tools / toolheads / boards to be powered up and connected to CAN

                      Well, that depends on what you mean by "require". If everything I posted, after being adjusted for your hardware, was executed then you would get bogus temp readings from the temp sensors not connected and heater errors from the heaters not connected.

                      Since you are going to be swapping tools manually you can create code using conditional code features to define just one tool with the settings appropriate for the tool you are mounting.

                      Something like the following:

                      if exists(param.T) = false
                        abort "T parameter not specified"
                      
                      var tool = param.T
                      
                      if var.tool < 0 || var.tool > 3
                        abort "T parameter was not 0, 1, 2 or 3
                       
                      if var.tool = 0
                        ; commands for configuring tool 0
                        ; commands for configuring tool 0
                        ; commands for configuring tool 0
                        M99 ; exits this routine and returns to the caller of this routine
                       
                      if var.tool = 1
                        ; commands for configuring tool 1
                        ; commands for configuring tool 1
                        ; commands for configuring tool 1
                        M99 ; exits this routine and returns to the caller of this routine
                       
                      if var.tool = 2
                        ; commands for configuring tool 2
                        ; commands for configuring tool 2
                        ; commands for configuring tool 2
                        M99 ; exits this routine and returns to the caller of this routine
                       
                      if var.tool = 3
                        ; commands for configuring tool 3
                        ; commands for configuring tool 3
                        ; commands for configuring tool 3
                        M99 ; exits this routine and returns to the caller of this routine
                       
                      

                      Then you could create a visible macro for invoking this routine with the appropriate T parameter to configure for the tool you are mounting.

                      Frederick

                      Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                      SputnikOC3dundefined 1 Reply Last reply Reply Quote 1
                      • SputnikOC3dundefined
                        SputnikOC3d @fcwilt
                        last edited by SputnikOC3d

                        @fcwilt Thanks again Frederick ...

                        Was looking over your code and injecting snippets of it into my cfg.g file as applicable. However; I noticed then that perhaps your setup differs from mine in that you have a multi tool expansion board where all of your toolheads can be live - and communicating via canbus at the same time - and perhaps they even have separate part cooling and hotend fans on the toolheads ?

                        My setup is a bit different than that, in that I have to manually unwire the Heater and unplug the therm connector on my 1LC toolboard mounted on my 1 singular toolhead. So, having all these tools defined as live [ if you will ] in the cf.g.g seems like it will just throw endless gcode errors - as the fw will be looking for defined "stuff" that isnt connected ?

                        Also - my hotend heater is H1 .. in your tools section you have a heater defined as H0 - isnt that assignment used by your bed ? or when youre using toolheads like this - bed heater is no longer H0 ? Same issue for the fans assignment in M563 ...

                        OR ... does rrf not get bothered by that because its being done in M563 vs. M308 M950 gcode lines

                        ... obvi Im kinda confused

                        fcwiltundefined 1 Reply Last reply Reply Quote 0
                        • fcwiltundefined
                          fcwilt @SputnikOC3d
                          last edited by

                          @sputnikoc3d

                          Your setup will require using the approach of defining just one tool, T0, at a time using the conditional code example I posted.

                          Even though I referred to tool 0, tool 1, tool 2, tool 3 - those are just the names for each of your different physical tools.

                          They each would be configured as firmware T0 - so you would only have one active tool and it would be fully connected and configured - so no errors would occur.

                          Does that make sense?

                          Frederick

                          Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                          1 Reply Last reply Reply Quote 1
                          • oliofundefined
                            oliof
                            last edited by

                            Since you manually swap out the tools, maybe using M505 to switch between configurations is an option

                            https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m505-set-configuration-file-folder

                            <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                            SputnikOC3dundefined 1 Reply Last reply Reply Quote 1
                            • SputnikOC3dundefined
                              SputnikOC3d @oliof
                              last edited by

                              @oliof said in Tool Swaps Multiple Hotend PID tunes Trigger Height drama:

                              Since you manually swap out the tools, maybe using M505 to switch between configurations is an option

                              https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m505-set-configuration-file-folder

                              TY sir ... however - thats a bit much work methinks for a mere 5 lines of code per hotend. Trying to sort some form of a singular - conditional macro like above sample posted .. but I cant sort what in the dwc interface would give me a suitable trigger event to tell such a macro what tool[0-3] was actually attached.

                              I have 4 macros now for each toolhead as a workaround Ive created that set

                              • trigger height for G31
                              • thermistor type
                              • M307 PID tune settings
                              • Max temps
                              • Tool A"name"
                              oliofundefined 1 Reply Last reply Reply Quote 0
                              • oliofundefined
                                oliof @SputnikOC3d
                                last edited by

                                @sputnikoc3d that would then be @fcwilt's sample macro calling thoese four macros depending on what you chose. And then you could use the BtnCmd plugin for DWC to make a button to choose for each.

                                <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

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