View Single Post
  #21   Spotlight this post!  
Unread 19-06-2014, 13:41
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: Encoder rate noise

Quote:
Originally Posted by Ether View Post
...because you can't tell which edge came first, so you don't know the direction.
Correct. Also for noise rejection. If you get a bounce or even a little electrical noise around a transition, you may count that edge more than once (you could use digital filtering, but that drops the max rate even further).

Quote:
Originally Posted by Ether View Post
I suppose it could just assume the direction hasn't changed, and go ahead and use the data. But I can imagine scenarios where that might be fraught with peril.
That would break noise rejection and could also be an invalid assumption. The point is the decoder simply doesn't know.

Quote:
Originally Posted by Ether View Post
Unless you setup the FPGA to do averaging over a large enough sample size?
Perhaps, depending on your requirements. Generally it is the wrong approach for very fast encoder signals.

Quote:
Originally Posted by Ether View Post
Are there code examples how to do this in all 3 supported languages?
Not that I'm aware of. I don't even know that DMA was implemented at the API level in WPILib for C++ and Java.
Reply With Quote