Ultimaker / Cura

3D printer / slicing GUI built on top of the Uranium framework
GNU Lesser General Public License v3.0
6.1k stars 2.06k forks source link

M104/M105/M109 always emitted, even when `{material_print_temperature_layer_0}` is used in the Start G-Code #19231

Closed L0laapk3 closed 3 months ago

L0laapk3 commented 3 months ago

Cura Version

5.7.2

Operating System

Windows 11

Printer

Ender 3 v2 - klipper

Reproduction steps

I do not want cura to emit M104/M105/M109 commands at the start of the print to heat up the print head. In the past, I was able to get around this by setting custom start G-code (under preferences > Printers > [printer] > Machine Settings > Start G-code) like so:

START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}

Which calls my START_PRINT macro defined in my printer.

Cura would then pick up that {material_print_temperature_layer_0} is being used, and does not emit the M104/M105/M109 codes. However this stopped working in 5.7.2.

Note that the behavior still works for the bed M140/M190 gcodes and {material_bed_temperature_layer_0}. Only the extruder temp gcodes are broken.

Actual results

Cura emits the following gcode: (broken in 5.7.2)

...
; Generated with Cura_SteamEngine 5.7.2
M104 S250
M105
M109 S250
M82 ;absolute extrusion mode
START_PRINT BED_TEMP=100 EXTRUDER_TEMP=250
...

Expected results

Cura emits the following gcode: (working in 5.7.1)

...
; Generated with Cura_SteamEngine 5.7.1
M82 ;absolute extrusion mode
START_PRINT BED_TEMP=100 EXTRUDER_TEMP=250
...

Add your .zip and screenshots here ⬇️

Sidenote: it was quite hard to find how to get cura to not emit these M104/M105/M109 gcodes (and similar for bed temp) in the first place.

I think it would be a good idea to add some grey text below the Start G-code box, mentioning this fact.

GregValiant commented 3 months ago

Thanks for the report. This is a duplicate of #19204 . If you check that report you will find much discussion regarding the bug and the Cura team is involved. If you scroll down to one of my posts you will find "CuraPrependBugfix.zip". Unzip the file and put the .py file into your Configuration folder and the "scripts" sub-folder. Go to "Extensions / Post Processing / Modify Gcode" and then "Add script". The script will remove the lines when you have the temperature keywords in your StartUp.

I'll mark this as a duplicate and go ahead and close it in favor of the other report. I hope you understand.