Klipper-toolchanger for Voron Trident

Basic Information:

Printer Model: LDO Voron Trident 300x300 (CUSTOM)
MCU / Printerboard: BTT Octopus, EBB42 CAN Board
Host / SBC: RPi 4
klippy.log: See line 13788
klippy.log (1.3 MB)

Describe your issue:

I am trying to set up tool changing for my custom Trident. I currently am trying to use the klipper-toolchanger add-in from viesturz. Install went fine. Previously my printer was completely functional with a single CAN toolboard. I am currently struggling to understand the configuration of klipper-toolchanger. The system will home and seemingly initialize the toolchanger correctly. (note, my hardware can home without a tool present) When I try to use T0 to pickup my tool I get an error:

!! Error evaluating ‘tool T0:pickup_gcode’: jinja2.exceptions.UndefinedError: ‘dict object’ has no attribute ‘z’

In toolchanger.cfg I have configured uses_axis: xy but this did not correct the issue.

Does anyone have any suggestions?

Extra information on my printer:
It started with a basic LDO Trident 300 kit. I created a completely custom carriage and toolhead, merging design elements of Jubilee and Prusa XL with a Revo Roto extruder. The docking/undocking is very similar to the needs of the Prusa XL in that I only need to move in XY and make sure Z is higher than the last layer. The carriage maintains the e-chain so that my part cooling and BTT Microprobe are always present. The printer uses the probe as a z-endstop on the bed surface. Currently it is a fully functional tool-changing Trident…without any tool-changing software…

I found some new information in Discord. Klipper-toolchanger will not properly initialize unless there is tool present. When I started the system with a tool installed it was able to initialize and then respond that the tool was already present when performing T0. I will have to do some more digging to see what I can do to allow the system to initialize without a tool present.

If anyone else is struggling with this, it came down to the configuration for the dropoff and pickup gcode. The sample toolchanger.cfg had some code which forced a lookup of a z location in the params_dropoff_path and params_pickup_path. After a bunch of long conversations with AI and reading up in the Klipper documentation I was able to get some basics working. I have attached my configuration files as a reference.

Some key lessons learned:

  • Read this before diving into any custom Gcode: Voidtrance Klipper Macros Beginners Guide | Voron Documentation
  • If you want to define a new variable in toolchanger.cfg under the [toolchanger] header you need to give it a params_ prefix. Otherwise you will be tracking down parsing errors for days.
  • Do not use a Jinja2 comment on the same line where you have real code (or maybe its ok, see first bullet :thinking: )
  • Make sure to create a custom gcode to handle “T0” commands.
  • Klipper-Toolchanger CAN initialize without a tool and will happily pickup a tool when empty or dropoff a tool without grabbing a new one.
  • Make sure to include the [rounded_G0] header and parameters in your printer.cfg file

toolchanger.cfg (6.5 KB)

T0.cfg (4.2 KB)

printer.cfg (12.8 KB)

macros.cfg (9.6 KB)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.