Added solid with 1deg step on request
Replace the code below to this, (BB and CC changed to 2 and 1 and replace STL to the new one
;BEFORE_LAYER_CHANGE
G92 E0.0
{if layer_z>1.2}M104 S{(temperature[0]+2)-(1*int(((layer_z-1.2)/10)))}{endif}
;[layer_z]
(Read more under “Original” below)
When I have thought about this for a while, I realize the obvious, it does not work if you change layer height.
I stretch my brain a bit and come up with this:
;BEFORE_LAYER_CHANGE
G92 E0.0
{if layer_z>1.2}M104 S{(temperature[0]+10)-(5*int(((layer_z-1.2)/10)))}{endif}
;[layer_z]
This will work for every filament temp and every layer height, and if you adjust it a bit it works for every temptower heights you can think of
Explanation:
{if layer_z>AA}M104 S{(temperature[0]+BB)-(CC*int(((layer_z-AA)/DD)))}{endif}
AA = Bottom Base Height
temperature[0] = "Other layers" nozzle temp from filament settings
BB = Start temperature, in this case 10° above "temperature[0]"
CC = Steps in temperature, in this case 5° lower for each "floor"
DD = Height of each "floor"
Added three 3mf-files
TempTower-Auto-V2-025nozzle.3mf for 0,25 nozzle and 0,1 layer height
TempTower-Auto-V2-04nozzle.3mf for 0,4 nozzle and 0,2 layer height
TempTower-Auto-V2-06nozzle.3mf for 0,6 nozzle and 0,3 layer height
Also I added a “plate” to STL-file, a surface to write on
Now it is perfect, three printer settings and one stl file for everything :-)
If you want it for other printer profiles just put in the above code, adjust numbers to suit your needs and you are good to go
(If all the parenthesis makes you wonder then it makes two of us. As I see it there are a few unnecessary ones, but if I take them away it won't work!?
I would appreciate if someone could explain it)
This is a well known test model with many remixes.
However, I have not seen anyone with automatic temp range.
Existing temp tower is “semi-automatic”, they set temperature to preset levels with custom g-code in “before layer change”
This print set levels from +10°C to -30°C in 5° steps in relation to temperature in filament settings.
With this code inserted in “Before Layer Change” you don't need to edit the code for every filament.
If you print with “Prusament PLA” standard setting the temp range will be from 225°C to 185°C, with “Prusament PETG” the range will be 260°C to 230°C and so on
G92 E0.0
{if layer_num==6}M104 S{temperature[0]+10}{endif} ; Layer 1
{if layer_num==56}M104 S{temperature[0]+5}{endif} ; Layer 2
{if layer_num==106}M104 S{temperature[0]}{endif} ; Layer 3
{if layer_num==156}M104 S{temperature[0]-5}{endif} ; Layer 4
{if layer_num==206}M104 S{temperature[0]-10}{endif} ; Layer 5
{if layer_num==256}M104 S{temperature[0]-15}{endif} ; Layer 6
{if layer_num==306}M104 S{temperature[0]-20}{endif} ; Layer 7
{if layer_num==356}M104 S{temperature[0]-25}{endif} ; Layer 8
{if layer_num==406}M104 S{temperature[0]-30}{endif} ; Layer 9
;[layer_z]
It could be simplified even more with this code, (from https://www.prusaprinters.org/prints/38895 ) but it is harder to understand if you will edit it later. The above code is more straightforward and easy to understand
G92 E0.0
M104 S{(temperature[0]+10)-(5*int(((layer_num-6)/50)))}
;[layer_z]
The STL is edited after I printed it for even numbers and 3mf file is updated with new STL
Print was aborted due to extruder starts clicking, that is why print in picture is not finished
The author remixed this model.