Quote:
Originally Posted by Ken Streeter
The problem with incorrect rates was present in both the C++ and the LabVIEW code. A workaround for this was released in the most recent official update to WPILib (for both C++ and LabVIEW). For C++, I know this was addressed in "C/C++ Update 3.0.1718". (See http://first.wpi.edu/FRC/frcupdates.html ) Discussion on this matter can be found at http://forums.usfirst.org/showpost.php?p=26395 as Joe Ross mentioned.
However, due to the manner in which the length of the "most recent" pulse is used to determine the rate, the fact that the encoder pulse widths are asymmetric leads to significant rate errors when using 2x and 4x pulse decoding. Accordingly, I personally would suggest using 1x decoding when using the encoders for rate measurement.
A few people are working on a software workaround to the pulse asymmetry issue by averaging a greater number of periods, which has achieved some improvement, but not as much as expected. (See http://forums.usfirst.org/showthread.php?t=12218 for further discussion.)
|
Great info. I have definitely noticed the "noise" in the rate signal from our encoders at 4x as well, and got around the problem by low pass filtering. But asymmetry coming into play makes perfect sense.