Hi,
I’m working on a non-Cartesian kinematic that requires a fairly unusual homing procedure for XY. I have to turn off one motor and force-move the other motor with reduced current; this ends up placing the toolhead in a predictable XY position in the corner of its movement range.
I can home it with the following g-code sequence:
M18 X0 Y0
SET_TMC_CURRENT STEPPER=stepper_a CURRENT=0.4 HOLDCURRENT=0.4
FORCE_MOVE STEPPER=stepper_a DISTANCE=-400 VELOCITY=200 ACCEL=50
G4 P1000
M18 X1 Y1
SET_KINEMATIC_POSITION X=... Y=...
SET_TMC_CURRENT STEPPER=stepper_a CURRENT=0.8 HOLDCURRENT=0.8
Here’s a short video of the kinematics to make it clearer:
The mechanism in the back provides mechanical limits to toolhead movement.
(also a video of a speed benchy in case you want to see it printing: First speedboatrace attempt with Marionette, using PLA. - YouTube)
With one motor powered off and the other motor reeling in its cable, the toolhead ends up placed in the corner next to that motor.
I’m trying to implement this homing procedure in the Kinematics class now (so that G28 would work for homing), and I’ve been a bit lost as to how to do the equivalent of above commands, from Python code.
Also, in the future I may add a couple limit switches to detect when the toolhead is fully in the corner, which would require the FORCE_MOVE equivalent to stop when an endstop is triggered.