Kitacooch
Posts: 10
Joined: Sat Feb 21, 2015 12:00 am

Ending Script To Turn Off Fan?

Hi, i am new to this and someone gave me a couple scripts but when my print ends the fan is left running, real pain when starting a print before i head to bed. Please see my ending script and let me know if there is some script i can add to turn fans off. Im unsure why it is running in first place as bed and heaters are off.

G28 X0 ; home the X-axis
M104 S0 ; turn off heaters
M140 S0 ; turn off bed
M84 ; disable motors

Thanks
JoeJ
Posts: 1435
Joined: Sun Feb 16, 2014 10:52 am

Re: Ending Script To Turn Off Fan?

Just add an "M106 S0" at the end.
schmots
Posts: 3
Joined: Fri Feb 20, 2015 2:19 pm

Re: Ending Script To Turn Off Fan?

M107 works as well
Kitacooch
Posts: 10
Joined: Sat Feb 21, 2015 12:00 am

Re: Ending Script To Turn Off Fan?

Ok cool thanks guys. I did only just notice that the reason the fan is still on is because one of the extruders is still running at temp. With this addition fix that also?

I am only starting out and so printing off one extruder, but i usually fire up the second extruder at 150 so it burns its way through my job rather than knock it over. I am printing tall objects with little bed surface so a small bump can easily knock over the job. Its this un-used extruder that is not turning off.
JoeJ
Posts: 1435
Joined: Sun Feb 16, 2014 10:52 am

Re: Ending Script To Turn Off Fan?

If you are talking about the extruder fan and not the cooling fan, then it's a different story. Sometimes there are 2 tiny extruder fans that are responsible for cooling the extruder nozzles so that the heat doesn't creep up into the housing and drive mechanism (you can't drive molten plastic!). These fans are controlled by the firmware. The automatically turn on when an extruder goes above a certain temp to protect against heat creep.

The blower fan is usually an external fan that is directed at the part (or the nozzle tip). It is used to cool your part. This can be controlled using M106/M107 commands.

So if you're talking about the extruder fans, then no, you can't turn those off since that functionality is hard-coded into the firmware to protect your extruder housing. You would need to cool down the extruder so that it goes off automatically.
Kitacooch
Posts: 10
Joined: Sat Feb 21, 2015 12:00 am

Re: Ending Script To Turn Off Fan?

Ok so i am talking about the Blower fan, it is directed at both the tip and the part. But i am puzzled as to why 1 extruder is remaining on?
dsegel
Posts: 159
Joined: Tue Sep 30, 2014 5:37 pm

Re: Ending Script To Turn Off Fan?

It depends on which firmware you're using, but you probably have to specify the other extruder with a command like 'M104 T1 S0'. Without specifying a T parameter the command will only apply to the first extruder.
Kitacooch
Posts: 10
Joined: Sat Feb 21, 2015 12:00 am

Re: Ending Script To Turn Off Fan?

dsegel wrote:It depends on which firmware you're using, but you probably have to specify the other extruder with a command like 'M104 T1 S0'. Without specifying a T parameter the command will only apply to the first extruder.

Ok so should it read.


G28 X0 ; home the X-axis
M104 T0 S0 ; turn off heater
M104 T1 S0 ; turn off heater
M140 S0 ; turn off bed
M84 ; disable motors
M106 S0


Thanks for your help
Ian84
Posts: 5
Joined: Fri Oct 05, 2018 9:28 pm

Re: Ending Script To Turn Off Fan?

Wondering if there is a Time setting, my 3dprinter has only one FAN that does both the Extruder and the print head.

M107 and M106 works, but what i like to do is in the END SCRIPT is to have the fan continue to run for lets say 5 mins so that the Extruder will cool... as now... the fan turns off when print is done... leading to heat creeping up.... which leads to extruder constipation... :mrgreen:
dilbertaz
Posts: 2
Joined: Sat Jan 26, 2019 12:59 pm

Re: Ending Script To Turn Off Fan?

What about waiting for hotend temperature, works either heating or cooling.
M109 - Wait for Hotend Temperature
thermal Wait for the hot end to reach its target.
This command optionally sets a new target hot end temperature and waits for the target temperature to be reached before proceeding. If the temperature is set with S then M109 waits only when heating. If the temperature is set with R then M109 will also wait for the temperature to go down.

Usage
M109 [B<temp>] [F<flag>] [R<temp>] [S<temp>] [T<index>]

http://marlinfw.org/docs/gcode/M109.html

Return to “Troubleshooting and Bug Reports”