Fixing Cura Temperature "Bug"

I'm not entirely sure what version this "bug" started to present itself, but as of Cura 2.3.1 it is definitely an issue. I never store material temperatures in my GCODE. Partially because I like to change materials a lot, and mainly because even among PLA or ABS suppliers, filament varies and I often find that 5-10°C differences in my material printing temperatures are needed depending on filament brand.

My general workflow is to design a part, export it as an STL, slice that STL in Cura, and then store the GCODE file inside of OctoPrint for future reprints of that part, without needing to re-slice in the future. For that reason alone, storing a material temperature in the GCODE itself makes little sense. Cura's process of selecting the model, printer, material and preset really only makes sense if you're physically printing from Cura, which I would guess is not the norm given how many people are using non-Ultimaker printers, and printing from solutions like OctoPrint.

The way Cura behaves in this regard is a little odd. If you don't add a printing temperature to your preset, Cura will add a M109 S0 to the start of your GCODE during slicing. Effectively telling your printer to set it's temperature to zero. You've now preheated your printer to the correct temperature for your material, hit print, and nothing happens since your printer is now waiting for the temperature to be set to zero.

In previous versions of Cura, this was not the behavior. No temperature (or a temperature set to zero) told Cura you wanted to manually preheat at the printer and it never tried to overpower that decision. That is unfortunately no longer the case, but there is a workaround.

Navigate to your "Machine Settings" (Settings -> Printer -> Manage Printers), and click the "Machine Settings" button on the dialog for the selected printer. At the bottom left corner you'll see "Start GCODE" which allows you to enter anything you want your printer to do before printing, such as a homing, or a bed leveling. Now you may be thinking that the M109 we want to get rid of would be here and we can just comment it out, but that is also sadly not the case. We actually need to trick Cura into thinking that we are setting a temperature manually so that it doesn't insert the generic M109. To do this, add the following two lines:

; M140 S0 ; set the bed temperature

; M104 S0; set the extruder temperature

Note that these lines are both commented out (with the ;). This is intentional if you want to be able to preset your temperature at the printer itself. Simply having a M140 and M104 in the start GCODE even though they are commented out, is enough for Cura to think you've handled it and not force it's own M109.