TypQxQ / Klipper_ToolChanger

A Klipper plugin and macros for controling a Toolchanging 3D printer
GNU General Public License v3.0
132 stars 27 forks source link

A Toolchenager

Tools for klipper (KTCC - Klipper Tool Changer Code)

Universal Toolchanger driver for Klipper

This are python modules, macros and example config for the Klipper 3D printer firmware to be able to work as a toolchanger.

Klipper Tool Changer code v.2 is now released for preview: https://github.com/TypQxQ/KTC

At it's simplest you need to specify extruder, fan, offset for each extruder tool. Then add your macros for pickup, dropoff, toollock and toolunlock.

It doesn't matter if you lock the tool by a servo, stepper or moving the toolhead in a special way. Just as long as it can be written in GCODE. Pickups are also custom Gcode. You can uses the parameters stored for each tool to aproach he ZONE fast, slow in to PARKING place and lock. Or it have a robotic arm place the tool. It's all posible. :D

This is a more complex example of it running on a toolchanger with an aditional ERCF under one tool. T0-8 uses first tool with virtual tools for the ERCF, calling the toolchanges recursively.

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

Thank you!

Readme Table of Contents

Major feature
Installation
- 1-Install with Moonraker Autoupdate Support
- 2-Manual Install
Configuration requirements
G-Code commands
Values accesible from Macro for each object
Example configuration

Other Docs:

Command Reference
Required and Optional Macros
Configuration Reference


#f03c15 #c5f015 #1589F0 Major features:


#f03c15 #c5f015 #1589F0 Installation

1. Install with Moonraker Autoupdate Support

This plugin assumes that you installed Klipper into your home directory (usually /home/pi).

1) Clone this repo into your home directory where Klipper is installed:

cd ~
git clone https://github.com/TypQxQ/Klipper_ToolChanger.git

2) Edit moonraker.conf by adding the following entry:

[update_manager client klipper_toolchanger]
type: git_repo
path: ~/Klipper_ToolChanger
origin: https://github.com/TypQxQ/Klipper_ToolChanger.git
install_script: install.sh
is_system_service: False

3) Run the install.sh script

~/Klipper_ToolChanger/install.sh

Klipper_ToolChanger will show up in the update the next time you restart moonraker, or you can restart mooraker right away with: sudo systemctl restart moonraker. If you encouter errors after an automatic Klipper update you can safetly run the install.sh scipt again to repair the links to the extension.

2. Manual Install

Copy the python (*.py) files into the \klipper\klipper\extras directory. Assuming Klipper is installed in your home directory:

cp ./*.py ~/klipper/klippy/extras/

Then restart Klipper to pick up the extensions.

#f03c15 #c5f015 #1589F0 Configuration requirements

#f03c15 #c5f015 #1589F0 G-Code commands:

Reffer to the Command Reference.

#f03c15 #c5f015 #1589F0 Values accesible from Macro for each object

#f03c15 #c5f015 #1589F0 Example configuration

My corrent configuration is for v.2 where work progresses fast.

#f03c15 #c5f015 #1589F0 Updates 21/09/2023

Added individual axis to position saving and restoring commands. Commited by viesturz.

#f03c15 #c5f015 #1589F0 Updates 09/03/2023

Added Tool Remap. Point one or more tools to another one. Including fan and temperature. This is persistent at reboot.

#f03c15 #c5f015 #1589F0 Updates 08/03/2023

Added per print statistics and a wrapper around G28 to disable saving statistics while homing. The latter led to MCU Timer to close error when loading a tool at homing.

#f03c15 #c5f015 #1589F0 Updates 22/02/2023

This is not a simple upgrade, it has some configuration updates. A namechange to KTCC (Klipper Tool Changer Code) is also in the works).