Tool Swaps Multiple Hotend PID tunes Trigger Height drama
-
@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
-
@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 ?
-
@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
-
@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
-
@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
-
@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
-
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
-
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
-
@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"
-
@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.