Pausing Cooling Fans - M106 Rnnn
Does anyone know how to "pause" the cooling fans then restore them to their last know speed/pwm?
This is for a tool change script where i have found that the higher the fan speed the more curling the extruded filament exhibits when purging, resulting in higher chance of the purged material being dragged into the print.
I want to pause the fans while purging occurs then resume fans just before the print starts again.
I found that M106 Rnnn resumes the fans in RepRapFirmware though i dont know how to "pause" them or how to dynamically set nnn in Rnnn.
If i use M106 S0 it turns the fans off… Great!... if i use M106 R with no nnn value it starts them but at 100%, not so great.
Any ideas how to use M106 Rnnn?
Currently the fan values are saved only when a pause command is executed. I don't think it would cause any problems it they were saved at the start of a tool change as well, so I'll implement that in the next release.
What, when this is implemented, would I execute to pause the fans and what would I execute to resume?
If they are currently saved on Pause I can just add a pause to my S3D script, extrude 10mm then resume but not sure of the syntax for pause and resume.
Pause (M226) will stop the print running until you send a Resume (M24) command from a different input source, so it won't do what you want.
The new code in the next release will save the fan speeds just before running file tfree#.g, so you will be able to turn the fans off in tfree#.g and/or tpre#.g and restore the speed in tpost#.g (where # is the relevant tool number). M106 P# R will restore fan number # to its speed at the start of the tool change, and M106 R with no P parameter will set the speed(s) of the mapped print cooling fan(s) to the value at the start of tool change - so that when switching heads you can have the print cooling fan on the new head pick up the speed that the old one had.
So to turn the fans off would I use M106 S0 in tfree#.g then in tpost#.g use M106 P# R and that will restore to the fans to what ever they were before I sent M106 S0?
Just want to make sure i have the syntax correct so when the next release comes out i can hit the ground running to test.
Thanks again dc42!
It depends on how many fans you have and whether you use fan mapping in your tool definitions to support different print cooling fans on different tools.
In tfree#.g use M106 S0 to turn off the current print cooling fan(s), or use M106 P# S0 to turn off a specific fan.
In tpost#.g use M106 P# R to restore a specific fan to the speed that the same fan had before the tool change. However, if you are using fan mapping and you want to set the print cooling fans for the new tool to the speed that the print cooling fans on the old tool were set to, use M106 R without the P parameter.
Thanks! Thats exactly what I was looking for. Look forward to the next release to give this a try.