Universal Toolchanger helper for Klipper
This adds logic to Klipper for layered, inherited ToolChanging functionality.
This is a complete rewrite of KTCC v.1 to be more versatile and have infinite levels of toolchangers. Inspiration comes mainly from how RRF enables toolchanging and from the HappyHare project.
I welcome any and all input and contributions. Don't be afraid to make a pull request :D
Complex code example is still under construction.
Thank you!
- Support any type of toolchanger and any type of tool.
- Infinite levels of nested changers and tools with inheritance.
- Handles Tool temperature transfers on tool select/deselect with multiple heaters and offsets.
- Standby temperatures for parked tools.
- Handles multiple fans per tool and speed transfer between tools.
- Wait to reach temperature with configurable tolerance for tool.
- Unlimited parameters for each object, accesible by macros.
- Tool number maping. Remap a tool to another, no need to reslice.
- Persitance of state and statistics across restarts.
The code requires Klipper to run on Python v.3 and is not compatible with Python v.2.
Connect to your klipper machine using SSH and run this one line command:
cd ~/ && git clone https://github.com/TypQxQ/KTC.git && bash ~/KTC/install.sh
Configure away inside printer.cfg or a file referenced by it.
Copy or link the python (*.py
) files into the \klipper\klippy\extras
directory.
Copy the macros inside the macros folder and reference them in printer.cfg.
- At least one tool needs to be defined, ex:
[ktc_tool 0]
The discution forums here on Github
Configuration example can be found here:
- Simple Configuration with one toolchanger
- Full Configuration with one Toolchanger
- Macros for T# toolchange
And here are some configurations of working machines:
Configuation Reference
Explains all configurable options.
Command Reference
Lists all the commands available at runtime from Klipper.
Object state Reference
Lists all available object variables available to macros.
-
kTAMV - Klipper Tool Alignment (using) Machine Vision allows X and Y allignment betwween multiple tools on a 3D printer using a camera that points up towards the nozzle from inside Klipper.
-
KnobProbe allows Z allignment between multiple tools.
-
Query Endstop Continuesly in Klipper Klipper module that adds a G-code command so Klipper will pause until specified endstop is in selected state, triggered or not triggered. Alternativley it can query a specified amount of times.
-
Klipper Save-Restore Position Adds behaviour as was in Klipper Toolchanger code v.1. Currently not finnished because I see no use for it. Tell me if you need it.
-
T commands need to be added by macros. Mainsail looks for
[gcode_macros T#]
inside the printer config. Adding a gcode_macro component for the tool at runtime will not work with current implementation of Mainsail and no button will show up. Therefore KTC_T should be manuly called by a corresponding T script as in the Macros for T# toolchange example. -
Saving to configuration files does not work in Klipper when the section is not in printer.cfg. That is the reason of the persistent storage. This enables organized and distributable configuration files.