|
Re: PID vs Bang-Bang for Shooter Consistency
Here is our slightly modified code. With the minimum value being at 0, this caused a more inconsistent shooter since the wheel would turn off and on with too much of a difference between the two speeds. Therefore we changed 0 to -0.3.
(Keep in mind, our values are negative simply because this is how our code is written. This can be fixed in the Begin.vi if needed but this is working for us.)
By changing the value to -0.3 it makes it impossible (based off of this code) to shoot below 30%. However, the Frisbee will barely go anywhere at that percentage anyway, therefore that number is perfect for us.
Since the minimum value was changed to -0.3, this caused the wheel to spin at a constant speed of 30% if the desired RPMs were ever lower than that. Thus we added the =0 select value into the code to make sure that when we do not want the wheel to move, it doesn't.
As for the rest of the code, it is the same as using a tachometer and the more basic code so graciously provided by billbo911.
|