5
$\begingroup$

I notice that if I print from Cura without preheating the printer, it will first raise the bed temperature and then raise the extruder temperature. The G-code it generates is:

M140 S55     ; set bed temperature to 55 C
M105         ; report temperatures
M190 S55     ; wait for bed temperature to reach 55 C
M104 S210    ; set hot end temperature to 210 C
M105         ; report temperatures
M109 S210    ; wait for hot end temperature to reach 210 C

The "Preheat" feature of Cura presumably send the "set temperature" commands without the corresponding "wait" command.

Wouldn't it be more efficient to do something like this:

M104 S210    ; set hot end temperature to 210 C
M140 S55     ; set bed temperature to 55 C
M105         ; report temperatures
M109 S210    ; wait for hot end temperature to reach 210 C
M105         ; report temperatures
M190 S55     ; wait for bed temperature to reach 55 C

Then the bed and extruder heat up simultaneously, and we wait for the higher temperature one first assuming that the other will reach its target temperature in the meanwhile.

If this is sound, is there a way to set this in Cura, or would I need to submit a patch?

$\endgroup$
4
  • $\begingroup$ No patch needed, just add it into your start G-code, works fine. I've been using it for a while using place holders in Cura. I'll post an answer when I'm behind my desktop computer. Note that Slic3r allows arithmetic on place holders, that is even more powerful. I allow my bed to heat up to 75 % and then start heating the hotend while the bed continues to 100 %; this results in bed and hotend to reach their final temperature at the same time. $\endgroup$ – 0scar Mar 15 '20 at 22:27
  • $\begingroup$ The bed is usually much slower, its temperature sensing less accurate and has no adverse effects if it stays at the target temperature for a while, while the hot end warms up quickly and will start leaking plastic as soon as it is warm. Sequencing the warmup phase allows the bed temperature to stabilize, and allows printing to start immediately. $\endgroup$ – Simon Richter Mar 16 '20 at 15:07
  • $\begingroup$ FWIW in my experience (Ender 3 with PLA, TPU, and PETG) both take roughly the same amount of time. With PETG the extreme bed temp can make bed take slightly longer. This might indicate I should tune PID for hotend better, as the last 10 degrees of hotend heating take inordinately long. $\endgroup$ – R.. GitHub STOP HELPING ICE Mar 16 '20 at 22:57
  • $\begingroup$ I agree with Simon Richter. The time adds only a few minutes to the total that is usually hours. It prevents the hotend from oozing and also heating up the material for too long, which can start clogging. The bed temperature and enclosure temperature stabilize and also the printer power supply is less stressed. $\endgroup$ – Hacky Mar 17 '20 at 14:41
4
$\begingroup$

This can be achieved with start G-code adaptations, this requires no software changes. Cura, and most slicers, have the ability to use placeholders (basically variables or maybe better: constants). These placeholders are substituted with the correct value upon slicing.

To sequentially heat the bed and hotend you would need to add the following into your start G-code:

M117 Heating bed 1st...
M190 S{material_bed_temperature_layer_0}
M117 Heating core 1st...
M109 S{material_print_temperature_layer_0}

For simultaneous heating you need to add:

M140 S{material_bed_temperature_layer_0}     ; set bed temperature to 55 °C and continue
M104 S{material_print_temperature_layer_0}   ; set hot end temperature to 210 °C and continue
M190 S{material_bed_temperature_layer_0}     ; wait for bed temperature to reach 55 °C
M109 S{material_print_temperature_layer_0}   ; wait for hot end temperature to reach 210 °C

Note that Cura is very limited in using placeholders. E.g. Slic3r allows for arithmetic using the placeholders. The following example shows heating the bed first to the bed first layer temperature minus 10 degrees Celsius; then the hotend starts heating and heatbed starts further heating up to the final temperature. For my machine this results in the bed and hotend being at final temperature at the same time; so no time is wasted and printing can start.

M117 Heating bed...
M190 S{[first_layer_bed_temperature]-10}
M140 S[first_layer_bed_temperature]
M117 Heating core...
M109 S[first_layer_temperature_0]
M190 S[first_layer_bed_temperature]
$\endgroup$
2
  • 1
    $\begingroup$ Yes, I'd forgotten this is an option too and probably a better one for folks using Cura through the GUI since it doesn't require rebuilding anything from source. $\endgroup$ – R.. GitHub STOP HELPING ICE Mar 16 '20 at 15:32
  • $\begingroup$ Can this really work? Checking in 4.8, and the code to heat bed and hotend is before custom "starting G-Code", so it would anyway preheat in "Cure way" first, no matter what you put in your starting code. Or am I missing sth? $\endgroup$ – Arek Dec 12 '20 at 9:23
2
$\begingroup$

I have an open bug report/feature request for this. Apparently Cura doesn't do it because some of Ultimaker's printers have underpowered power supplies that will shut off if you try to do both at the same time. I've been carrying a patch (note this is against CuraEngine not the Cura GUI) that fixes this:

diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp
index de3c771c..ced22017 100644
--- a/src/FffGcodeWriter.cpp
+++ b/src/FffGcodeWriter.cpp
@@ -500,7 +500,7 @@ void FffGcodeWriter::processInitialLayerTemperature(const SliceDataStorage& stor
                 const Temperature bed_temp = scene.current_mesh_group->settings.get<Temperature>("material_bed_temperature_layer_0");
                 if (bed_temp != 0)
                 {
-                    gcode.writeBedTemperatureCommand(bed_temp, scene.current_mesh_group->settings.get<bool>("material_bed_temp_wait"));
+                    gcode.writeBedTemperatureCommand(bed_temp, false);
                 }
             }
         }
@@ -547,6 +547,18 @@ void FffGcodeWriter::processInitialLayerTemperature(const SliceDataStorage& stor
                 }
             }
         }
+
+        if (scene.current_mesh_group->settings.get<bool>("material_bed_temp_prepend"))
+        {
+            if (scene.current_mesh_group->settings.get<bool>("machine_heated_bed"))
+            {
+                const Temperature bed_temp = scene.current_mesh_group->settings.get<Temperature>("material_bed_temperature_layer_0");
+                if (bed_temp != 0)
+                {
+                    gcode.writeBedTemperatureCommand(bed_temp, scene.current_mesh_group->settings.get<bool>("material_bed_temp_wait"));
+                }
+            }
+        }
     }
 }
$\endgroup$
5
  • $\begingroup$ Thanks! And thanks for musl. $\endgroup$ – rgov Mar 15 '20 at 22:13
  • $\begingroup$ @rgov If you use Cura through the GUI, this answer is not necessary, simply fix this with correct start G-code. $\endgroup$ – 0scar Mar 16 '20 at 10:08
  • $\begingroup$ It is not a bug. I agree with Simon Richter. The time adds only a few minutes to the total that is usually hours. It prevents the hotend from oozing and also heating up the material for too long, which can start clogging. The bed temperature and enclosure temperature stabilize and also the printer power supply is less stressed. $\endgroup$ – Hacky Mar 17 '20 at 14:42
  • $\begingroup$ @Hacky: "Usually hours" is very use-specific. Most of my prints are under 20 minutes, some as low as 5 minute. "A few minutes" is huge relative overhead on that. $\endgroup$ – R.. GitHub STOP HELPING ICE Mar 17 '20 at 16:09
  • $\begingroup$ "Usually hours" does not refer to your specific tasks. I refer to the rest of the world, which might be the reason why Cura made this trade-off. It should be an option to start heating all elements as soon as possible though. At least you got your specific build tailored to your needs. $\endgroup$ – Hacky Mar 20 '20 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.