New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: multiple FAN definitions and linking to active extruder #2174
Comments
Hi @vladbabii, It did not look like there was a Klipper log file attached to this ticket. The log file has been engineered to answer common questions the Klipper developers have about the software and its environment (software version, hardware type, configuration, event timing, and hundreds of other questions). Unfortunately, too many people have opened tickets without providing the log. That consumes developer time; time that would be better spent enhancing the software. If this ticket references an event that has occurred while running the software then the Klipper log must be attached to this ticket. Otherwise, this ticket will be automatically closed in a few days. For information on obtaining the Klipper log file see: https://github.com/KevinOConnor/klipper/blob/master/docs/Contact.md The log can still be attached to this ticket - just add a comment and attach the log to that comment. Best regards, PS: I'm just an automated script, not a human being. |
It is possible to use a "multi_pin" config module to route a single virtual pin to multiple output pins. It's also possible to create "output_pin" config sections for each fan, and then set the fan speed manually with SET_PIN commands. It's also possible (though cumbersome) to define each fan as an output_pin, not define a regular "fan" section, and then write an M106 macro that determines which pin to update on SET_PIN. Otherwise, a developer would likely need to implement what you are requesting. -Kevin |
@KevinOConnor so i can override gcode command with [gcode_macro M106] ? then put some jinja template code to run pwm to the correct fan? This would be most useful, since i could set the corect pwm to a new tool when picking it up and stopping the old tool fan. |
You can not override a builtin command. However, if there is no -Kevin |
@KevinOConnor the way M106 is used is like this
But gcode_macro would work with something like this as far as i know:
or would defining a gcode variable P would work with P ? |
If one creates a gcode_macro for a "traditional g-code" command then it takes traditional g-code parameter syntax (eg, -Kevin |
@KevinOConnor i removed the [fan] section but get an error the M106 command is already defined. The definitions for M106 is around line 480-492
|
You'll have to go up to the latest version of the code (which includes commit e0e2f15). -Kevin |
Any chance of getting a command override with a rename of the old command ?
|
Now i just need to play around with the SET_PIN command. |
Late to the party, but would it be possible to just add and |
Example with a single fan
|
@timmit99 you want to change fan_0 to some specific fan. If you have "fan_0" to "fan_5" output pins you could change the last line in the FANSPEED macro with
but you'd also need to modify M106 and M107 to check for correct S value |
Okay, I'm going to close this as it looks like a solution was found for the original issue. -Kevin |
I think a solution like this would be simpler. |
@vladbabii I'm sorry, programming isn't really my thing. Does your code take care of your original issue (controlling multiple fans on multiple tools)? I need to do the same thing on my tool changer but your code looks a little incomplete for that purpose and i'm not competent enough to finish it to work with more than 1 fan. Did you actually get something implemented on your machine that works? |
If you replace the line with
and change fan_0 to a tools fan name then it will work. I am working on a toolchanging macro to integrate this (and many other things). https://github.com/vladbabii/3d_printed_toolchanger/blob/master/macros/toolchanger_v3/tool_pp.cfg Give me a couple of days and i will post the new version, busy with work at the moment. |
Just an FYI, if you use
|
I have similar macros for other things so i just copy-pasted and modified some numbers. Thanks for the shorter version. |
For others looking for a solution to IDEX part cooling fans, this how I solved it for my printer.
Hope it helps and thank you for the awesome firmware klipper-team :) |
there is a small problem. |
You should now be able to replace https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Reference.md#fan_generic |
Back with my tool-changing printer. Klipper only supports one part cooling fan. I intend to have multiple tools, each with their own fans. The heatsink fans i will manage with [heater_fan ].
My only option right now is to have a relay and switch the part cooling fan wires to different fans for each tool, but i would need 10 relays and a rats nest of wires.
Could the feature be implemented in klipper? Or at least to allow multiple fans and a gcode command to switch fans or select a number of fans to work ? I would add this gcode command in my toolchange macros.
Thank you
The text was updated successfully, but these errors were encountered: