How to Deactivate the Heater/s?
-
Set the active and standby temps to 0 and deselecting the tool would do it.
-
@gbartsch I don't believe you can actually switch a heater off in any way except by clicking on the heater name in DWC (which should cycle it through active - standby - off). As noted by others, you can stop a heater heating by setting it to zero, but that doesn't give you exactly the same behaviour as setting it 'off' in DWC.
There are other use cases where it would be an improvement to be able to actually set the heater off (perhaps you want it to have a setpoint, but you don't want it to heater fault if it can't reach that setpoint). There have been occasional discussions of that in the past (so if it's a silly question, it's one that a few people, myself included, would like there to be an answer to how to do it), but I don't believe it is possible.
-
@gbartsch use M568 https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m568-set-tool-settings
if you want to stick with G10 or M104, use -273.1 to turn the heater off -
@jay_s_uk It's useful that you can do it for a heater assigned to a tool (and I hadn't noticed that was now possible), but I'd like to do it for a heater that is assigned to the chamber.
I suppose I could define the chamber as a tool and do what I want that way - I suspect the only thing I lose is that the paneldue will show it with a little nozzle icon rather than the chamber icon, but I can probably live with that.
Thanks.
-
@achrn
It's a little different for a chamber
For the bed use
M140 Pn S-276
For chamber use
M141 Pn S-276Where "n" is the heater number
The value has to be less than -273.1 to shut off the heater as @jay_s_uk has indicatedFor multiple heaters you can put it in a loop
M291 P"Shutting down chamber heaters" R"Heaters" S0 T1 G4 S1.1 ; wait for popup while iterations < #heat.chamberHeaters ;echo "checking chamber heater " ^ iterations-1 if heat.chamberHeaters[iterations]!=-1 M141 P{iterations} S0 R0 ; reset target and standby M141 P{iterations} S-276 ; turn off heater M291 P{"Chamber # " ^ iterations ^ " off"} R"Heaters" S0 T1 echo "All chamber heaters turned off"
-
Everyone, thank you for all the answers! I'll work with the information you all provided. Best regards ..
-
@weed2all said in How to Deactivate the Heater/s?:
@gbartsch M104 S0
I finally was able to look at this. I already was calling M104 in my end g-code but that wasn't deactivating the heater.
M104 S0 ; turn hotend off
M140 S0 ; turn heated bed off
M84 ; disable motors
M220 S100 ; set speed back to default
M221 S100; set flow rate back to 100%
G28 ; home all axes
M18 ; deactivate steppers -
@gbartsch said in How to Deactivate the Heater/s?:
M104 S0 ; turn hotend off
M140 S0 ; turn heated bed offZero is "Off" for some definitions of "Off".
-
@weed2all Thank you; but this didn't work: M104 S-273.1
-
@Phaedrux Thank you; but this M104 doesn't turn off or deactivate the heater block heater.
-
@OwenD Oh. So for the heater block hear I would do M104 Hn S-276 where n is the heater?
-
@gbartsch M104 is deprecated so you would be better off using G10 or M568. For tools with multiple heaters, use the colon separator. Also be aware that turning a heater off isn't like a switch which removes power. Whether you set the temperature to zero or "off" you'll still have voltage on the positive side of the heater (PWM switches the negative side).
-
@gbartsch
Yes Hn woul be H0, H1 etc depending on how many heaters you have.I use these macros which should work regardless of the number of tools and heaters you have.
That said I don't have multiple tools and I don't have a chamber heater. I just try to "future proof" my code.I also have an "all-heaters-off.g" macro which just calls each of these in turn
I put that in my stop.g
My slicer end code just calls M0For tool heaters
; Shut down all tool heaters and set temps to zero. M291 P"Shutting down tool heaters" R"Heaters" S0 T1 G4 S1.1 ; wait for popup var ToolsDone = 0 ; create a variable to cope with tools that are not sequentially numbered (unlikely but possible) while (iterations < limits.tools) && (var.ToolsDone < #tools) ;echo "iteration " ^ iterations if (tools[iterations]!=null) if (#tools[iterations].heaters > 0) ; check if the tool has a heater to turn off M568 P{iterations} S0 R0 ; Set active and standby to zero M568 P{iterations} A0 ; turn off heater(s) associated with this tool M291 P{"Tool " ^ (iterations) ^ " is set to off" } S0 T1.5 ; report heater state of tool G4 S1.6 ; wait for popup set var.ToolsDone = var.ToolsDone + 1 ; Increment the number of tools shut off. else echo "Null value Tool number - skipping #" ^ iterations G4 S1 continue ; we've encountered a non sequential move to next tool number without incrementing the ToolsDone variable echo "All tool heaters are off"
For chamber heaters
M291 P"Shutting down chamber heaters" R"Heaters" S0 T1 G4 S1.1 ; wait for popup while iterations < #heat.chamberHeaters ;echo "checking chamber heater " ^ iterations-1 if heat.chamberHeaters[iterations]!=-1 M141 P{iterations} S0 R0 M141 P{iterations} S-276 M291 P{"Chamber # " ^ iterations ^ " off"} R"Heaters" S0 T1 echo "All chamber heaters turned off"
For bed heaters
M291 P"Shutting down bed heaters" R"Heaters" S0 T1 G4 S1.1 ; wait for popup while iterations < #heat.bedHeaters if heat.bedHeaters[iterations] !=-1 M140 P{iterations} S0 R0 M140 P{iterations} S-276 M291 P{"Bed heater # " ^ iterations ^ " off"} R"Heaters" S0 T1 G4 S1.1 ; wait for popup echo "All bed heaters turned off"
-
Thank you @deckingman and @OwenD
Sorry for such a late reply. Our family got the plague and I was last to succumb; I felt quite unwell and could not think. I've finally implemented your advice.
This is is my slicer start code. I've done as you suggest and used M568 in place of M104. Is G10 directly interchangeable with M568? Is one 'better' than the other?
Is there a way to let the let the nozzle heater stabilize before printing of the prime strip begins? Now the nozzle sits as the heater temperature ramps up and as soon as the first layer temperature is reached the prime strip is printed. But because the heater is ramping up it over-shoots by about 5C before dropping to the first layer temperature as the first layer begins. This doesn't seem to be a problem but I'm just wondering if there is a way to avoid the overshoot?
I'm quite clueless with g-code and have mostly hacked together what I have by copying what I've seen elsewhere over time. I sort of understand what your macros do @OwenD but am not entirely sure nor am I sure how these run.
Your slicer end code calls M0 to shut down the nozzle heater? How exactly does that look? Sorry I'm really am clueless with this.
G28 ; home all axes M140 S{first_layer_bed_temperature} ; set bed temp M190 S{first_layer_bed_temperature} ; wait for bed temp G1 X100 Y5 F9000 ; move nozzle over middle of the front of the build plate G1 Z1.0 F9000 ; lower nozzle 1.0mm from glass M568 S{first_layer_temperature} ; set extruder temp M109 S{first_layer_temperature} ; wait for extruder temp G92 E0 G1 X50 E6 F300 ; extrude a thick line to prime extruder
-
@gbartsch G10 and M568 do exactly the same thing. But G10 does a lot of things besides setting the tool temperatures which is why it has been deprecated. Think of the current situation as a transition period where both commands will work but it's highly likely that at some point in the future, setting tool temperatures using G10 will no longer function.
Ref the overshoot, as you say a 5 degree overshoot shouldn't be a problem when printing a skirt but you could use G4 to add a short pause after your M109.
-
@gbartsch said in How to Deactivate the Heater/s?:
But because the heater is ramping up it over-shoots by about 5C before dropping to the first layer temperature as the first layer begins. This doesn't seem to be a problem but I'm just wondering if there is a way to avoid the overshoot?
Try increasing the M308 R parameter for that heater by 5% or 10% above the value that you got when you ran M303 heater tuning.
-
@dc42 Thank you. My firmware is 2.04 so maybe that's why I don't have M308 and an R value?
These are my PID Autotune settings:
M307 P13.1, I0.489, D46.8
Other heater values are:
; Heaters ; ----------------------------------------------------------------------------------------------- M305 P0 T100000 B4092 R4700 ; set thermistor + ADC parameters for heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M305 P1 T100000 B4395 R4700 ; set thermistor + ADC parameters for heater 1 M143 H1 S260 ; set temperature limit for heater 1 to 260C
-
@deckingman Thank you, I'll try M109 just to learn even though the temperature fluctuation levels out during the skirt printing.
-
@gbartsch To be clear, M109 will wait until the heater reaches temperature. My suggestion was to add an additional G4 pause after the M109 command. The length of the pause would equal the time it takes for the overshoot to settle. But DCs suggestion to reduce the overshoot would be better.