Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1LC - stepper randomly reversing - ≤3.5.0-r1 #942

Closed
T3P3 opened this issue Jan 10, 2024 · 2 comments
Closed

1LC - stepper randomly reversing - ≤3.5.0-r1 #942

T3P3 opened this issue Jan 10, 2024 · 2 comments
Assignees
Labels
bug Bug that has been reproduced
Milestone

Comments

@T3P3
Copy link
Contributor

T3P3 commented Jan 10, 2024

As described in this thread:

https://forum.duet3d.com/topic/34351/1lc-stepper-randomly-reversing-3-5-0-r1

@T3P3 T3P3 added bug Bug that has been reproduced requires reproducing Not yet reproduced, or needs a more concise reproduction method. labels Jan 10, 2024
@T3P3 T3P3 added this to the 3.5.0 milestone Jan 10, 2024
@Exerqtor
Copy link

I've ran upwards to 150hours of prints on 3.5.0-beta4 now without anything happening. So I'm quite positive the issue causing this behaviour got implimented as of rc1.

@dc42
Copy link
Collaborator

dc42 commented Mar 13, 2024

Issue was caused when moves with zero duration were received. This resulted in a floating point division by zero, which ended up with segments being created with infinite length, causing the extrusion distance brought forwards being infinite. Most likely the behaviour when zero length messages were received changed when the floating point maths library was switched to Qfplib which happened between 3.5 beta4 and rc1.

The zero duration moves probably occur because moves generated by the main board have the durations of the acceleration. steady and deceleration segments rounded to an integer number of step clocks to send over the CAN message. So a move with very small duration may get rounded to zero duration.

Fixed by checking for zero duration moves when they are received and changing the duration of the steady speed segment to 1 clock when they occur. Doing this ensures that any small amount of extrusion requested will get added to the extrusion pending. Also changed the way that the acceleration and deceleration distances are computed, to force them to zero if the corresponding numbers of clocks are zero, guarding against possible miscalculation (e.g. due to rounding error) if the full calculation is done.

@dc42 dc42 closed this as completed Mar 15, 2024
@dc42 dc42 removed the requires reproducing Not yet reproduced, or needs a more concise reproduction method. label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that has been reproduced
Projects
None yet
Development

No branches or pull requests

3 participants