Replies: 1 comment 4 replies
-
The queue only contains stepper commands (generate steps at a given rate or execute a pause) and no acceleration value changes. The StepperTask is filling the queue, so that at least
So there could be these two approaches:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am building a PID system to invert a pendulum, similar to shown the one shown in this video these. I am using the FastAccel library, but I am struggling to figure out how structure my acceleration commands.
What I want is if the PID code decides to make an action, i.e. provide an impulse, than I would like the stepper to accelerate in the desired direction, at possibly a varied acceleration rate. The problem I was thinking would occur is that these PID measurement and reaction cycles take place about every 10ms, so if I use moveByAcceleration, the stepper queue is still likely to be working on the previous commands, and if the PID command dictates that a direction command needs to take place, than the queue will have to go through all previous acceleration commands to get there.
I think what I am wondering is there a method through this library that I can have the stepper accelerating at a rate, and then continue at that rate, or change either the rate or direction, at a rate of once every 10ms?
Beta Was this translation helpful? Give feedback.
All reactions