Why does this heat tower script fail to work properly?
 
Notifications
Clear all

Why does this heat tower script fail to work properly?  

  RSS
Fred Johnston
(@fred-johnston)
Active Member
Why does this heat tower script fail to work properly?

{if layer_z < 10}M104 S220{elsif layer_z < 58}M104 S235{elsif layer_z < 108}M104 S230{elsif layer_z < 158}M104 S225{elsif layer_z < 208}M104 S220{elsif layer_z < 258}M104 S215{elsif layer_z < 308}M104 S210{elsif layer_z < 358}M104 S205{elsif layer_z < 408}M104 S200{elsif layer_z < 458}M104 S195{endif}

Best Answer by Fred Johnston:

The layer_z is in mm, not in layer numbers. If you want to check layer numbers you need to use layer_num macro. So in your case your first 10mm was using temp 220, then next 48mm was using 235 etc, when it was supposed to be first 10 layers... Using the mm is better, as then it does not matter what the layer height is used when slicing, so using something like {if layer_z <= 1.05}M104 S220 {elsif layer_z <= 11.05}M104 S235 {elsif layer_z <= 21.05}M104 S225 {elsif layer_z <= 31.05}M104 S220 {elsif layer_z <= 41.05}M104 S215 {elsif layer_z <= 51.05}M104 S210 {elsif layer_z <= 61.05}M104 S205 {elsif layer_z <= 71.05}M104 S200 {elsif layer_z <= 81.05}M104 S195 {endif} should work if assuming your tower has 1mm of base and 10 mm beween each temperature.

Posted : 03/04/2023 8:56 pm
Fred Johnston
(@fred-johnston)
Active Member
Topic starter answered:
RE: Why does this heat tower script fail to work properly? (Thanks kivinen on Discord!)

The layer_z is in mm, not in layer numbers. If you want to check layer numbers you need to use layer_num macro. So in your case your first 10mm was using temp 220, then next 48mm was using 235 etc, when it was supposed to be first 10 layers... Using the mm is better, as then it does not matter what the layer height is used when slicing, so using something like {if layer_z <= 1.05}M104 S220 {elsif layer_z <= 11.05}M104 S235 {elsif layer_z <= 21.05}M104 S225 {elsif layer_z <= 31.05}M104 S220 {elsif layer_z <= 41.05}M104 S215 {elsif layer_z <= 51.05}M104 S210 {elsif layer_z <= 61.05}M104 S205 {elsif layer_z <= 71.05}M104 S200 {elsif layer_z <= 81.05}M104 S195 {endif} should work if assuming your tower has 1mm of base and 10 mm beween each temperature.

Posted : 03/04/2023 9:14 pm
Fred Johnston
(@fred-johnston)
Active Member
Topic starter answered:
RE: Why does this heat tower script fail to work properly?

A fix to previous... now works 100% with ··Heat Tower 2729076- https://www.thingiverse.com/thing:2729076

{if layer_z <= 1.05}M104 S220 {elsif layer_z <= 11.05}M104 S235 {elsif layer_z <= 21.05}M104 S230 {elsif layer_z <= 31.05}M104 S225 {elsif layer_z <= 41.05}M104 S220 {elsif layer_z <= 51.05}M104 S215 {elsif layer_z <= 61.05}M104 S210 {elsif layer_z <= 71.05}M104 S205 {elsif layer_z <= 81.05}M104 S200 {elsif layer_z <= 91.05}M104 S195 {endif}

Posted : 04/04/2023 12:01 am
Share: