Printer Model: Ender 3
MCU / Printerboard: BTT SKR Mini E3 V3
Host / SBC Raspberry pi 4b
klippy.log
Fill out above information andin all cases attach yourklippy.logfile (use zip to compress it, if too big). Pasting yourprinter.cfgis not needed Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there
Describe your issue:
…
Okay, so this is a combination Slicer and Firmware issue i think.
i used a fan port and mapped it to be an aux fan in klipper with the fallowing code
with this code i can turn on the aux fan at any point from mainsail. But i really just want the slicer to put in the gcode to turn on the aux fan when needed by itself.
I use Orca Slicer and i have it set to turn on the aux fan, but the printer never seems to turn it on, so i think there is a conflict between the slicer and how i have the firmware set up. i just dont know enough to solve this on my own. klippy (2).zip (1.4 MB)
Orca addresses the extra fan as M106 P2, which Klipper does not support natively. You need to add a macro that allows you to do this:
[gcode_macro M106]
description: Enhanced M106 to handle fan scaling for a fan with fan index P2
rename_existing: M106.1
gcode:
{% set fan_speed_raw = params.S|default(0)|int %}
{% set fan_index = params.P|default(0)|int %}
{% if params.P is defined and fan_index == 2 %}
# Scale the fan speed from 0-255 to 0-1 for the Aux fan
{% set scaled_speed = (fan_speed_raw / 255.0) %}
{ action_respond_info("Setting Aux fan speed to " ~ (scaled_speed * 100) | round(1) ~ "%") }
SET_FAN_SPEED FAN=aux_fan SPEED={scaled_speed}
{% else %}
# Default fan handling if P2 is not specified
M106.1 S{fan_speed_raw}
{% endif %}
Adapt SET_FAN_SPEED FAN=aux_fan SPEED={scaled_speed} to call your fan.