-
-
Notifications
You must be signed in to change notification settings - Fork 271
Description
Hi,
It was reported that recent changes to Klipper have broken the TEST_SPEED macro defined at https://ellis3dp.com/Print-Tuning-Guide/articles/determining_max_speeds_accels.html and https://github.com/AndrewEllis93/Print-Tuning-Guide/blob/main/macros/TEST_SPEED.cfg . This was reported at https://klipper.discourse.group/t/regression-in-step-accuracy/24895 .
The macro seems to be using the sequence:
G28 X Y
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
G4 P1000
GET_POSITION
to report the "mcu position" of a stepper to the user.
Unfortunately, the GET_POSITION command doesn't produce consistent reports for "mcu position" if the robot is in motion at the time the command is issued, and the G4 P1000 does not ensure the robot is not in motion. ( https://www.klipper3d.org/Code_Overview.html#coordinate-systems ). I suspect the following would provide better results:
G28 X Y
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
M400
GET_POSITION
as M400 does ensure all moves are completed prior to the next command running. (That is, a GET_POSITION command after M400 ensures the robot is not in motion at the time the command is issued.)
The behavior of Klipper did change recently with Klipper3d/klipper#7038 , however using just a G4 P1000 could cause inconsistencies even before that PR.
Thanks for working on this,
-Kevin