Quote:
Originally Posted by vamfun
The function gen is a good idea, but you can use your GetDistance() to make an accurate estimate of the average rate. Could save you a little time.
|
If you used a large enough dt, true. However, 1x or 2x using GetRate returns perfectly fine data and takes less time to implement. The point of using a function generator is simply to verify that it is indeed the encoder, not the FPGA code, that is the problem.
I could also just fix my stupid 2nd probe and look at the encoder output on the scope...
BTW, the FPGA code could be changed to account for the phase lag. It's actually a very easy fix, although it would require you to experimentally determine the phase lag and pass it to the FPGA. Determining this would simply require spinning the encoder at a constant speed and look at the channel B phase offset.