KTC
KTC copied to clipboard
Klipper Toolchanger Code v.2
KTC - Klipper Toolchanger Code v.2
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!
Major features:
- 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.
Installation
The code requires Klipper to run on Python v.3 and is not compatible with Python v.2.
1. Automatic install with Moonraker autoupdate support
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.
2. Manual Install
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.
Minimum Configuration:
- At least one tool needs to be defined, ex:
[ktc_tool 0]
Help and community:
The discution forums here on Github
Configuration Examples:
Configuration example can be found here:
- Simple Configuration with one toolchanger
- Full Configuration with one Toolchanger
- Jubilee Toolchanger with Toolchanger and ERCF
References:
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.
Related projects
-
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.
Limitations
-
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_Tshould be manuly called by a corresponding T script as in the examples. -
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.