8000 GitHub - TypQxQ/KTC at v2.0-alpha.1
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TypQxQ/KTC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Toolchenager

KTC - Klipper Tool Changer code v.2

Universal Toolchanger helper for Klipper

This helps Klipper with ToolChanging functionality.

This is a complete rewrite of KTCC v.1 to be more versatile and have indefinite levels of toolchangers. Inspiration comes mainly from how RRF enables toolchanging and from the HappyHare project.

!!!!!!!!!!!!!!!!!!!!!!!!!!

This is still under development

Published for preview. The code works but the documentation is not finished yet.

!!!!!!!!!!!!!!!!!!!!!!!!!!

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-Automatic install with Moonraker Autoupdate Support
- 2-Manual Install
Minimum Configuration
Configuration Examples
G-Code commands
Values accesible from Macro for each object

Other Docs:

Command Reference
Harware Configuration, Movement and Homing
Configuation Reference
Gcode Customization


#f03c15 #c5f015 #1589F0 Major features:

  • Support any type of toolchanger and any type of tool.
  • Infinite levels of nested changers and tools
  • Handles fan speed transfer between tools.
  • Handles Tool temperature transfers on tool select/deselect.
  • Standby temperatures for parked tools
  • Tools can have multiple heaters and fans.
  • Tools don't need to be extruders/hotends, can be anything.
  • Wait to reach temperature with configurable tolerance for tool.
  • Current Tool persists at powerdown. Default but optional.
  • 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.
  • Sophisticated logging options (console and file)
  • Moonraker update-manager support

#f03c15 #c5f015 #1589F0 Installation

1. Automatic 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/KTC.git
  1. Run the install.sh script
~/KTC/install.sh

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 or link the python (*.py) files into the \klipper\klippy\extras directory. Assuming Then restart Klipper to pick up the extensions. Add the files in the macros folder to the macros folder.

#f03c15 #c5f015 #1589F0 Minimum Configuration:

  • At least one tool needs to be defined, ex:

[ktc_tool 0]

#f03c15 #c5f015 #1589F0 Configuration Examples:

Configuration example can be found here:

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

Reffer to the Command Reference.

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

Macros used by KTC have this objects accesible

  • ktc is accesible by all.

    • global_offset - Global offset.
    • active_tool - Name of the active tool. Special names are: 'tool_unknown' and 'tool_none'.
    • activ 7A31 e_tool_n - Tool Number if any of the active tool. Special numbers are: -2 for 'tool_unknown' and -1 for 'tool_none'.
    • saved_fan_speed - Speed saved at each fanspeedchange to be recovered at Toolchange.
    • state - State of KTC, one of STATE_TYPE.
    • tools - List of all tool names.
    • toolchangers - List of all toolchangers.
    • params_available - List of available custom parameters as specified in the configuration file.
    • params_* - parameter in the above list.
  • Tool - The tool calling this macro is referenced as myself in tool_select_gcode: and tool_deselect_gcode:. One can write {myself.name} which would return 3 for a tool named so.

    • name - Tool name. 0, 1, 2, etc.
    • number - Tool number.
    • state - State of the tool, one of STATE_TYPE.
    • toolchanger - Name of toolchanger this tool is on.
    • heater_names - List of heaters this tool has.
    • heater_state - Current state for the tools heaters. 0 = off, 1 = standby temperature, 2 = active temperature.
    • fans - List of fans this tool has.
    • offset - Tool offset as a list of [X,Y,Z]. Global offset is added if set.
    • heater_active_temp - Temperature to set when in active mode.
    • heater_standby_temp - Temperature to set when in standby mode.
    • heater_active_to_standby_delay - Time in seconds from setting temperature to standby that the temperature actualy changes. Use 0.1 to change imediatley to standby temperature.
    • standby_to_powerdown_delay - Time in seconds from being parked to setting temperature to 0. Use something like 86400 to wait 24h if you want to disable. Requred on Physical tool.
    • params_available - List of available custom parameters as specified in the configuration file.
    • params_* - parameter in the above list.
  • Toolchanger - The toolchanger calling this macro is referenced as myself in init_gcode:, engage_gcode: and disengage_gcode:. One can write {myself.name} which would return Jubilee for a toolchanger named so.

    • name - Tool name. 0, 1, 2, etc.
    • selected_tool - Name of the selected tool. Special names are: 'tool_unknown' and 'tool_none'.
    • selected_tool_n - Tool Number if any of the selected tool. Special numbers are: -2 for 'tool_unknown' and -1 for 'tool_none'.
    • init_mode - When this toolchanger is initialized: 'manual', 'on_start' or 'on_first_use'
    • state - State of the toolchanger, one of STATE_TYPE.
    • tools - List of all tool names attached to this toolchanger.
    • params_available - List of available custom parameters as specified in the configuration file.
    • params_* - parameter in the above list.
  • STATE_TYPE Constant listing the difrent states ktc, a tool or toolchanger can have: States can be set like: KTC_TOOLCHANGER_SET_STATE TOOLCHANGER={myself.name} STATE=READY

    • ERROR - Toolchanger or tool is in error state.
    • NOT_CONFIGURED - Toolchanger or tool is not configured.
    • CONFIGURING - Toolchanger or tool is configuring.
    • CONFIGURED - Toolchanger or tool is configured but not initialized.
    • UNINITIALIZED - Toolchanger or tool is uninitialized.
    • INITIALIZING - Toolchanger or tool is initializing.
    • INITIALIZED - Toolchanger or tool is initialized but not ready.
    • READY - Toolchanger or tool is ready to be used.
    • CHANGING - Toolchanger or tool is changing tool.
    • ENGAGING - Toolchanger is engaging.
    • SELECTING - Tool is selecting.
    • DISENGAGING - Toolchanger or tool is disengaging.
    • DESELECTING - Tool is deselecting.
    • ENGAGED - Tollchanger or tool is engaged.
    • SELECTED - Tool is selected.
    • ACTIVE - Tool is active as main engaged tool for ktc.

#f03c15 #c5f015 #1589F0 Example configuration

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

About

Klipper Toolchanger Code v.2

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 
0