Immediate Step Skipping Correction - closed / assisted open loop
-
Where do I find the command to immediately correct for the skipped steps?
In (say) one in a Million moves my printer looses steps "preferably" in a 3 day print. - Costly, delaying, unreliable and annoying.
- To prevent that I bought some different closed loop motors. Trying them out I still can not make the PID controlled closed loop perform as well as in open loop. So I am eagerly waiting for the Troubleshooting for the "Duet_3_1HCL_tuning" "Coming Soon!" since months. Maybe that is not coming so soon, as the manual PID tuning is very complex.
Ok. So what is the EASY WAY? >> Immediate step skipping correction. - not complex and very rewarding.
As I did not find an immediate step skipping correction command, neither for assisted open loop nor for closed loop I will argue for it.
What would the algorithm need to do?
The software already measures steps in assisted open loop or in closed loop. After exceeding a threshold of lost steps a subroutine is started. (maybe only after the lost step move has finished) That subroutine would just retry the last move with the lost steps, ideally from the position, where the steps were lost. Optionally the subroutine tries the move with only half the speeds and accelerations. If the loosing steps happens again in the same move, maybe there is something in the printing path and the print is paused.Benefits:
If the correction works, there is hardly any time, material, reliability and manpower lost. Even the print quality maybe unaffected. The programming effort for the Immediate step correction feature would be way less than for PID tuning and it would still be a good improvement even with a well working PID tuning.What do you think?
-
@abraxas have a look at the events system https://docs.duet3d.com/en/User_manual/RepRapFirmware/Events
closed loop position issues is handled with that -
This image taken from assisted open loop shows what can happen when skipping steps:
The red arrow indicates, where we would want to be after the move.
-
@jay_s_uk ok thank you
The problem after skipping steps is: The triggered driver-warning reacts like this: "Inform user via console and continue" In this form:
Warning: Driver 112.0 warning: position tolerance exceeded
And it just prints on, with lost steps in wrong position, ruining the part. But it does not call a macro like "correct_lost_steps.g" or "retry_last_move_from_lost_step_position.g" and continue afterwards.
How do I make the warning call a macro?
Is there already code examples for the above named macros? -
@abraxas i don't think those macro names are correct.
I would expect something likedriver-error.g
ordriver-warning.g
and then using parameters to have different actions for each driver -
@jay_s_uk ah, ok fine thanks, I will try using that names, so it seems the name of the warning or error is the name of the .g file that is executed
-
@abraxas in assisted open loop mode the motor is commanded to move and the encoder is used to monitor the movement. As the error between commanded motion and measured motion increases, the firmware will increase current up to the maximum configured in order to increase torque. It also uses the acceleration and velocity feedforward terms to increase motor current in anticipation of needing more when accelerating or moving at high speeds. If steps are lost (which will always be a multiple of 4 full steps) the firmware will not try to recover them. So you should always set the error threshold to less than 4 full steps.
In closed loop mode the firmware will keep on trying to achieve the current requested position. So lost steps will only persist for as long as the motor cannot provide sufficient torque to overcome an obstruction, or while is it being commanded to move or accelerate faster than is possible.
I hope this clarifies the behaviour for you.