Skip to content

Commit 6a0dfa3

Browse files
authored
Added info about changes
This is not a simple upgrade, it has some configuration updates. A namechange to KTCC (Klipper Tool Changer Code) is also in the works). News: -Virtual Tools -Logfile -Statistics Changes to Configuration: LogLevel under ToolLock is deprecated. Must include new section ```[ktcclog]```. New ```virtual_toolload_gcode:`` parameter to tools. New ```virtual_toolunload_gcode:`` parameter to tools. Changes to commands: T_1 => KTCC_TOOL_DROPOFF_ALL T# => KTCC_T# (ex. T0 => KTCC_T0) New commands: KTCC_SET_GCODE_OFFSET_FOR_CURRENT_TOOL KTCC_LOG_TRACE KTCC_LOG_DEBUG KTCC_LOG_INFO KTCC_LOG_ALWAYS KTCC_SET_LOG_LEVEL KTCC_DUMP_STATS KTCC_RESET_STATS
1 parent 33233b0 commit 6a0dfa3

File tree

1 file changed

+72
-6
lines changed

1 file changed

+72
-6
lines changed

README.md

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Tools for klipper
1+
# Tools for klipper (KTCC - Klipper Tool Changer Code)
22

33
This are python extras, macros and example config for the
44
[Klipper 3D printer firmware](https://github.com/Klipper3d/klipper). I
@@ -16,7 +16,7 @@ having configurable coordinates for parking, zoning, tool offset,
1616
meltzonelength, extruder, fan, etc.
1717
* **Multiple tools can be grouped in ToolGroup.** -Most configuration can
1818
be inherited from the group if not specified in the tool config section.
19-
* **Virtual tools** - A tool can be virtual andhave a physical parent,
19+
* **Virtual tools** - A tool can be virtual and have a physical parent,
2020
inheriting all nonspecified configuration from parent, parent group and
2121
then toolgroup. Use case example of an ERCF on a PLA tool,a ERCF on a
2222
PETG tool, one tool without virtual tools for abrasive and yet another
@@ -46,6 +46,35 @@ parameter to specify another tool.
4646
* Current Tool is saved and restored at powerdown. Default but optional.
4747
* Input shaper parameters for each tool.
4848
* Position prior to toolchange can optionaly be saved and restored.
49+
* Logging including to file functionality. You can keep the console log to a minimum and send debugging information to `ktcc.log` located in the same directory as Klipper logs.
50+
* Logging including to file functionality. You can keep the console log to a minimum and send debugging information to `ktcc.log` located in the same directory as Klipper logs.
51+
# Statistics that look like this:
52+
```
53+
ToolChanger Statistics:
54+
KTCC Statistics:
55+
7 hours 52 minutes 36 seconds spent mounting tools
56+
6 hours 42 minutes 46 seconds spent unmounting tools
57+
30 tool locks completed
58+
37 tool unlocks completed
59+
462 tool mounts completed
60+
461 tool dropoffs completed
61+
------------
62+
Tool#0:
63+
Completed 220 out of 221 mounts in 3 hours 43 minutes 21 seconds. Average of 1 minutes 0 seconds per toolmount.
64+
Completed 219 out of 220 unmounts in 3 hours 12 minutes 33 seconds. Average of 52 seconds per toolunmount.
65+
1 hours 4 minutes 16 seconds spent selected. 23 hours 7 minutes 14 seconds with active heater and 49 minutes 44 seconds with standby heater.
66+
------------
67+
Tool#1:
68+
Completed 124 out of 124 mounts in 2 hours 5 minutes 7 seconds. Average of 1 minutes 0 seconds per toolmount.
69+
Completed 124 out of 125 unmounts in 1 hours 49 minutes 5 seconds. Average of 52 seconds per toolunmount.
70+
10 hours 44 minutes 21 seconds spent selected. 0 seconds with active heater and 0 seconds with standby heater.
71+
------------
72+
Tool#49:
73+
Completed 8 out of 8 mounts in 1 minutes 7 seconds. Average of 8 seconds per toolmount.
74+
Completed 8 out of 8 unmounts in 42 seconds. Average of 5 seconds per toolunmount.
75+
4 minutes 51 seconds spent selected. 0 seconds with active heater and 0 seconds with standby heater.
76+
------------
77+
```
4978

5079
## Installation Instructions
5180
### Install with Moonraker Autoupdate Support
@@ -83,21 +112,19 @@ cp ./*.py ~/klipper/klippy/extras/
83112
Then restart Klipper to pick up the extensions.
84113

85114
## To do:
86-
* Add virtual tools select code.
87115
* Add selectable automatic calculation of active times based on previous times. Ex:
88116
* Mean Layer time Standby mode. - Save time at every layerchange and at toolchange set to mean time of last 3 layers *2 or at last layer *1.5 with a Maximum and a minimum time. Needs to be analyzed further.
89117
* Save the time it was in Standby last time and apply a fuzzfactor. Put tool in standby and heatup with presumption that next time will be aproximatley after the same time as last. +/- Fuzzfactor.
90-
* Save pressure avance per tool to be restored on toolchange. Also between virtual tools. Check Slicer output first if this is needed or can be put in Filament custom gcode.
91118

92119
## Configuration requirements
93120
* `[input_shaper]` needs to be used for input shaper to wordk.
94121

95122
## G-Code commands:
96123
* `TOOL_LOCK` - Lock command
97124
* `TOOL_UNLOCK` - Unlock command
98-
* `Tn` - T0, T1, T2, etc... A select command is created for each tool.
125+
* `KTCC_Tn` - T0, T1, T2, etc... A select command is created for each tool.
99126
* `R` - Calls SAVE_CURRENT_POSITION with the variable as a RESTORE_POSITION_TYPE. For example "T0 R1" will call "SAVE_CURRENT_POSITION RESTORE_POSITION_TYPE=1" before moving. Positioned is restored with "RESTORE_POSITION" from below.
100-
* `T_1` - Dropoff the current tool without picking up another tool
127+
* `KTCC_TOOL_DROPOFF_ALL` - Dropoff the current tool without picking up another tool
101128
* `SET_AND_SAVE_FAN_SPEED` - Set the fan speed of specified tool or current tool if no `P` is supplied. Then save to be recovered at ToolChange.
102129
* `S` - Fan speed 0-255 or 0-1, default is 1, full speed.
103130
* `P` - Fan of this tool. Default current tool.
@@ -140,6 +167,15 @@ This command can be used without any additional parameters. Without parameters i
140167
* 0: No restore
141168
* 1: Restore XY
142169
* 2: Restore XYZ
170+
* `KTCC_SET_GCODE_OFFSET_FOR_CURRENT_TOOL` -
171+
* `KTCC_LOG_TRACE` -
172+
* `KTCC_LOG_DEBUG` -
173+
* `KTCC_LOG_INFO` -
174+
* `KTCC_LOG_ALWAYS` -
175+
* `KTCC_SET_LOG_LEVEL` -
176+
* `KTCC_DUMP_STATS` -
177+
* `KTCC_RESET_STATS` -
178+
143179
## Values accesible from Macro for each object
144180
- **Toollock**
145181
- `global_offset` - Global offset.
@@ -171,3 +207,33 @@ This command can be used without any additional parameters. Without parameters i
171207
- `is_virtual` - As above
172208
- `physical_parent_id` - As above
173209
- `lazy_home_when_parking` - As above
210+
211+
212+
Updates 22/02/2023
213+
This is not a simple upgrade, it has some configuration updates.
214+
A namechange to KTCC (Klipper Tool Changer Code) is also in the works).
215+
216+
News:
217+
-Virtual Tools
218+
-Logfile
219+
-Statistics
220+
221+
Changes to Configuration:
222+
LogLevel under ToolLock is deprecated.
223+
Must include new section ```[ktcclog]```.
224+
New ```virtual_toolload_gcode:`` parameter to tools.
225+
New ```virtual_toolunload_gcode:`` parameter to tools.
226+
227+
Changes to commands:
228+
T_1 => KTCC_TOOL_DROPOFF_ALL
229+
T# => KTCC_T# (ex. T0 => KTCC_T0)
230+
231+
New commands:
232+
KTCC_SET_GCODE_OFFSET_FOR_CURRENT_TOOL
233+
KTCC_LOG_TRACE
234+
KTCC_LOG_DEBUG
235+
KTCC_LOG_INFO
236+
KTCC_LOG_ALWAYS
237+
KTCC_SET_LOG_LEVEL
238+
KTCC_DUMP_STATS
239+
KTCC_RESET_STATS

0 commit comments

Comments
 (0)