I wanted to sum this information up for some of the team members (since a couple of the kids on my team didn't understand a lot of things in this post).
First - the getrate implementation (at least in labview) oscillates because it has a very short time period. To obtain a more stable rate, you canput the calculation function in periodic tasks and run it at its own loop speed. This function should be:
(current encoder count - past encoder count) / loop time = count rate
To smooth this rate further, you can average the samples over several loops, or you can extend the time (calculate the count over 2 or three loops and the time over 2 or three loops). Both may give you somewhat delayed results, depending on your loop rate.
Next, a speed PID varies mainly in that you need to send the setpoint from the last speed loop into the new loop and modify THAT value. This prevents wheel reversal. The derivation from Jared on team 341 can be found here:
http://www.chiefdelphi.com/forums/sh...7&postcount=13
It shows the derivation and implementation of a velocity PID loop.