Jump to content
Ultimaker Community of 3D Printing Experts

change request: change M109 (set and wait for temp) to M104 (set temp and continue)

Recommended Posts


Don't know if this is the place, but I have problems with my printhead waiting for the temperature to be reached during T0 and T1 switches...

Would it be possible to add an advanced option to Cura, something like

"don't wait for temperature during nozzle switch"

which replaces all M109 commands with M104 commands when switching nozzles?


Share this post

Link to post
Share on other sites

I believe that would cause the printer to start printing with the new nozzle before the correct temperature is reached.

That could cause jams or the printer firmware fail-safe to kick in and just not extrude any filament until the correct temperature is reached...it'd be printing 'air'.

Are you sure that's what you want it to do? Or am I missing something?

Share this post

Link to post
Share on other sites

Hi DaHi8

Yes that is is exactly what I want.

I have a single nozzle that has 2 filament inlets and 1 outlet (nozzle) (like the 3D builder by Code-p west).

The extruders share the same heater, but have 2 seperate heatsensors (I did not want to hack the hardware too much).

As long as T0 has a standby temperature that is the same as the operating temperature, the heat settings of T1 do not matter much.

But when using M109 the software starts to poll T1 heatsensor, and it is just a little too low, it will wait for ever, causing a big belting hole in my prime tower. But as the heaterconnector of T1 is not used, it will wait forever, as it it trying to reach the set temperature by PWM-ing an non-existing heater.

This would all be solved if it just sets T1 temperature with M014. (or setting T1 temp 10 degrees lower as I do now).

The difference in measured temperature between T0 and T1 is usually not enough to cause a heater-error (Marlin will think something is wrong when extra heating does not raise the temperature within a certain amount of time)

The Simplify 3D slicer allows for using just 1 heater with 2 extruders (!), but I stopped using this slicer, because somehow the gcode is not resulting in correct prints, and I don't want to try to figure out why.

Share this post

Link to post
Share on other sites

fnorkn: I've written ('I wrote' ?) a simple little post-processing script to replace every occurrence of M109 T1 with M104 T1. It should do what you want, providing the gcode generated formats the command as M109 T1 Sxxxx

Since I don't have a dual-extruder (or single extruder with dual heaters) printer, I have no way of testing it.

The script is shown below, but if you could provide some examples of how the M109 command is formatted for T1 temperature changes, and what the M104 format should be, I can modify this code to account for that (I'm asking because the M104 command is deprecated and so documentation is sparse and there is no mention of at Tx parameter in it: M104 Set Extruder Temperature)

NOTE: python script formatting is VERY picky, so just copy/pasting probably won't work because the indents will be all horked up (technical term)


from ..Script import Scriptimport reclass HeatnGo(Script):   def __init__(self):       super().__init__()          def getSettingDataString(self):       return """{            "name":"Heat 'n Go",           "key": "HeatnGo",           "metadata":{},           "version": 2,           "settings":            {               "warning":               {                   "label": "WARNING!",                   "description": "Replaces EVERY occurance of 'M109 T1' with 'M104 T1' - USE AT YOUR OWN RISK!!!",                   "unit": "",                   "type": "int",                   "default_value": ""               }           }       }"""   def execute(self, data):       for layer in data:           index = data.index(layer)            layer = re.sub("M109 T1","M104 T1",layer,flags=re.M)           data[index] = layer #Override the data of this layer with the modified data       return data


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Ultimaker Cura | a new interface
      We're not only trying to always make Ultimaker Cura better with the usual new features and improvements we build, but we're also trying to make it more pleasant to operate. The interface was the focus for the upcoming release, from which we would already like to present you the first glance. 
        • Like
      • 114 replies
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!