Turn off print fan before color change
I want to turn off the print fan before the color change and then turn it back on after the M600 routine is complete. I thought I could do this with a little scripting in Prusa Slicer (currently using ver. 2.3.3) but I'm not having any luck - maybe it's something I'm just missing or a detail that I've overlooked. Here's the code that I'm trying to use in the 'Color Change G-Code' box of the Custom G-code section:
{if layer_z > disable_fan_first_layers}M107{endif} M600 {if layer_z > disable_fan_first_layers}M106 S{max_fan_speed * 2.55}{endif}
The problem I'm running into, is that none of my statements are being evaluated - the entire thing is being inserted into the generate gcode file as a string, like so:
;AFTER_LAYER_CHANGE ;6.4 ;COLOR_CHANGE,T1 {if layer_z > disable_fan_first_layers}M107{endif} M600 {if layer_z > disable_fan_first_layers}M106 S{max_fan_speed * 2.55}{endif}
I also tried without the 'disable_fan_first_layers' variable and just used a hard-coded 3 but the same thing was happening. Any help would be appreciated.
@nsand
There may be a bug, check this thread
https://forum.prusa3d.com/forum/prusaslicer/prusaslicer-placeholder-variable-evaluation/
Prusa i3 MK3S+ FW 3.11.0 (kit dec -20), PrusaSlicer 2.6.1+win64, Fusion 360, Windows 10
thanks
Thanks very much. Looks like the same issue.
You could possibly just insert a block that doesnt need any evaluation until they get it fixed
M107
M600
M106 S255
You could possibly just insert a block that doesnt need any evaluation until they get it fixed
M107
M600
M106 S255
yep - and that works fine - it's how I've been doing it, but since I've no way to know what the fan speed was set to before the color/material change (a feature that would be really helpful), I was hoping to use the interpreted code to set it to the max fan speed set up in the filament profile. 100% fan speed is too much for some materials/prints.