The cause of this issue is that in your start gcode you use the {print_bed_temperature} replacement pattern. Try replacing that with {material_bed_temperature}.
Not so fast, I think this is a real issue. And you should not disable the flag "Heated bed", unless your printer really has no heated bed! If you do that Cura will not automatically insert any G-codes to control bed temperature.
See my screenshot, Cura is inserting my "initial layer bed temperature" before my own start G-code settings, and since I use "material_bed_temperature" for automatic bed levelling, that "initial layer bed temperature" is effectively overridden. It correctly inserts "material bed temperature" after the initial layer further down in the code, but since it insists on inserting code before my start g-code it really messes up the first layer bed temperature.
Why is cura doing this, and can this be changed?
IMHO it should not insert *anything* (except comments maybe) before my own "start G-code".
I guess I could workaround this by using material_bed_temperature_layer_0 for my bed levelling, but I really think this behavior needs to be changed.
34 minutes ago, chjohans said:Why is cura doing this, and can this be changed?
Cura tries to protect your printer against cold extrusion.
Cura tries to see if there is anything in your start gcode that heats up your extruder(s), and bed. If not, it will insert a heatup sequence on its own.
Thanks, but did you even look at my startup G-Code? I do have commands to heath up both my bed and my hotend there.
And in any case, IMHO Cura should not insert *anything* except comments before my Startup-Gcode as that has a high risk of messing something up. And it's no longer "Startup G-Code" when things are inserted in front of it.
You should be using {material_bed_temperature} or {material_bed_temperature_layer_0} instead of {default_material_bed_temperature}.
Really? I set default_material_bed_temperature in my material settings by using your plugin, but if I use one or the other is besides the point. This is not the issue at all.
The issue is that Cura inserts Gcode before my Start G-code, that won't change if I use one or the other. Cura will still insert those G-Codes where it should not.
Anyhow thanks for trying to help, I have registered this as an issue in GitHub.
If you use {material_bed_temperature} or {material_bed_temperature_layer_0} in your start gcode snippet, then Cura won't insert gcode for heating the bed in front of the start gcode.
Yes you are right about that, but I still think Cura should have inserted it's temp control G-Code *after* the Startup G-Code.
Trying to understand the logic of what's going on: I assume that Cura looks for "M140 {material_bed_temperature_layer_0}" before layer 1, and if it can't find it it inserts it. Is that how it works?
Also for my own understanding, how is the variable material_bed_temperature being set? Is it set depending on where in the code it is? So at the start of the code material_bed_temperature is set to material_bed_temperature_layer_0 and after the first layer it's set to default_material_bed_temperature?
Unless it's otherwise overridden that is.
Do you happen to know the logic here?
As I'm sure you understand Cura is quite new to me so your input is highly appreciated. So are your very useful plugins for Cura, I especially find "Material Settings" useful when trying to set up profiles for different filaments.
Thank you! 🙂
The logic is here:
https://github.com/Ultimaker/Cura/blob/4.4/plugins/CuraEngineBackend/StartSliceJob.py#L428
Cura looks for the text "{material_print_temperature}", "{material_print_temperature_layer_0}", "{default_material_print_temperature}", "{material_initial_print_temperature}", "{material_final_print_temperature}" or "{material_standby_temperature}" in the start gcode to check if the start gcode contains extruder heating commands (so it does not actually care if you use M104 or M109 or not).
Cura looks for the text "{material_bed_temperature}" or "{material_bed_temperature_layer_0}" in the start gcode to check if the start gcode contains bed heating command (so it does not actually care if you use M140 or M190 or not). I would argue that "{default_material_bed_temperature}" should be added to that list for consistency.
Start gcode snippets often include priming commands. If Cura would insert its preheating before the start gcode snippet, that priming would not work.
Unless it is overridden, the "material_print_temperature" setting is set to be equal to "default_material_print_temperature" here:
https://github.com/Ultimaker/Cura/blob/4.4/resources/definitions/fdmprinter.def.json#L2141
- 1
On 11/11/2019 at 1:39 PM, ahoeben said:The cause of this issue is that in your start gcode you use the {print_bed_temperature} replacement pattern. Try replacing that with {material_bed_temperature}.
Yes, this appear to do it (see attached).
There's still one line left (M82), but it's fine for my purpose, I guess.
As Chjohans mentioned:
On 11/11/2019 at 2:30 PM, chjohans said:IMHO it should not insert *anything* (except comments maybe) before my own "start G-code".
I totally agree, though I think there might be reason to the madness.
Perhaps a small (i) could be added to the Start G-code box?
Thanks @ahoeben, the beauty of open source and you just reminded me that Cura is open source, so now I know where to look.
Recommended Posts
Limroto 0
Turns out that's the 'Heated bed' flag in the screen shot, that does that.
Boom - close this.
Link to post
Share on other sites