Closed DreiDe closed 1 year ago
Thanks for reporting and same issue here. I have added it as another example. Just with my hw configuration.
Still investigating about the root cause. v0.24.2 works v0.25.4 works v0.25.5 works v0.25.6 fails v0.25.7 fails
v0.28.2 will fix this issue.
For a given acceleration, the speed jumps from 0 to a value appropriate for the first step (call it v1). If now the requested new speed v is lower than this first step speed v1, then this speed setting was just ignored. The fix was to set the speed to the requested speed v, if the ramp generator cannot reduce the speed anymore.
Ok, great, that was an instant fix :D Thanks a lot for your quick support! I just tested it and can confirm that the speed update works again.
I'm changing the speed of an ESP32 controlled moving stepper multiple times a second in intervals between ~100Us/Pulse - 40000Us/Pulse without a real acceleration phase in between. While at the beginning the stepper keeps following the set speed as expected, after some changes further updates are ignored and the old speed is kept.
From a feeling I would say it takes maximum 10 updates until it starts happening and higher rotation speeds are more likely to persist, however I couldn't find any real pattern. When the stepper movement is stopped and restarted speed updates again work at first but are ignored then.
This behavior occurs no matter if I'm using
runForward()
,runBackward()
,moveTo()
,move()
setSpeedInUs()
,setSpeedInMilliHz
.Did you ever experience this behavior @gin66? Or do you have any idea what the cause could be? And especially how it can be prevented/fixed?