Slic3r PE: Slowly decrease bed temperature while printing

The default Prusa i3 MK3 profile sets the heatbed temperature to 60 °C for PLA filament. But after a few layers the heatbed musn’t keep that temperature. I wanted to slowly decrease the temperature after a few layers. In my case from 60 °C to 20 °C in 5 °C steps after every third layer. You can add custom G-code in slic3r for different events. For example at print start or end, before and after a layer change etc. My first approach was adding this to the “after layer” section:

{if bed_temperature > 20 and layer_num % 3}M140 S{bed_temperature - 5}{endif}

However this is not possible because the modulo operator is not available. Sadly, you have to code out this pice of code with nested conditons:

{if filament_type[0] == "PLA" }
{if layer_num == 5}M140 S{50}
{elsif layer_num == 15}M140 S40
{elsif layer_num == 20}M140 S30

Add it to Printer Settings -> Custom G-code -> After layer change G-code. The schematic should be self explaining. This code is only used when your selected filament material is PLA.

Du hast einen Kommentar, einen Wunsch oder eine Verbeserung? Schreib mir doch eine E-Mail! Die Infos dazu stehen hier.

🖇️ = Link zu anderer Webseite
🔐 = Webseite nutzt HTTPS (verschlüsselter Transportweg)