Quote:
Originally Posted by Tom Line
The best tuning of the bang-bang (combination of filter and slew rate) nets us approximately +/- 60 RPM.
|
Try this: get rid of the speed filter
*, get rid of the time-based slew around the control point, and put all three of these operations in the 10ms Timed Structure, in this order, with no other code:
1) read encoder counts from FPGA
2) compute (unfiltered) speed
3) send either 0.0 or 1.0 to motor controller** depending on whether unfiltered speed is above or below the setpoint
* you can filter the speed for purposes of display or logging or control of other logic (such as when to shoot), but don't use the filtered speed for the bang-bang logic
** get rid of all possible overhead in the library, like "motor safe" etc.