How do I replace “stepper_z” with “stepper _z1” with a macro?

This whole thing (generic_cartesian kinematics in general and SET_STEPPER_KINEMATICS command) is a new feature that was not integrated into the mainline Klipper yet, and is under testing now. You can install it from a different branch, if you know how. In principle, KIAUH supports that.

If you feel adventurous, you can install the new code from this branch: GitHub - dmbutyugin/klipper at generic-cartesian. Back up the old Klipper installation and configs, just in case. You can follow the instructions here how to add a custom repository (the file is available as ~/kiauh/klipper_repos.txt.example on the pi, you need to copy it as ~/kiauh/klipper_repos.txt and add

dmbutyugin/klipper,generic-cartesian

line there, then run KIAUH script, select 6 to go to ‘Setttings’, then 1 to ‘Set custom Klipper repository’, and then choose the appropriate branch:


(after you’ve done with the testing, or this feature is merged into the mainline Klipper, you can use the same sequence to select back the original Klipper (all the other options in the screenshot, including option 0 will get you there).

And then you can read the first post in the thread on how to configure the generic_cartesian kinematics (basically, how to convert your existing config to it).