4th Axis | Rotating Nozzle

Good 3D prints to everyone! We are developing a project and require an additional axis. This axis can be considered as the one that rotates the nozzle and we want it to be able to turn at the corners, etc. Once the axis is added, The slicing part is being resolved, but is it possible to add a 4th axis for this purpose in Klipper? After adding the axis, I am considering what will come next.

You may have to overrite the definition of G0-G3 with macros. I don’t know if adding a stepper_u section adds it to those commands or not. You’re other option would be to custom code a kinematic

Currently Klipper code G0 is directly mapped to G1.
G1 code is processing only XYZE coordinates look at file gcode_move.py
function “def cmd_G1”
Extruder is hardcoded to 4-th stepper.

To resolve you issue with current implementation of klipper i would define your additional axis as additional extruder, and when you want control it - just do switch of active extruder to second one and control it with E-coordinate, then switch back to first extruder.

Previously i was abble to work with 4 axis together with extruder but it was in Machinekit.

Thanks for the comments! Yes, it may make sense to use the 2nd extruder, but it is a system that we need to homing. If I solve the homing issue, I can solve it with the 2nd extruder.

Take a look here:Configuration reference - Klipper documentation
it’s additional stepper without connection to kinematics, controlled completely independent, but have homing capabilities.