Quote:
Originally Posted by Ether
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.
|
Reading the encoder with the getrate from the labview getrate ntroduces a large amount of noise that counteracts any positive effect from the bang-bang (for us). What you suggest is how we started out, and there's a huge amount of error (+/-100rpm).
We'll play around a bit more at 10ms using our own rate calculation and not the FPGA. Perhaps that will improve our results.