View Single Post
  #2   Spotlight this post!  
Unread 14-11-2014, 13:44
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: VEXPro 3-CIM Ball Shifter encoder?

Quote:
Originally Posted by jfitz0807 View Post
We are almost done building our practice chassis and we have included encoders for the first time. We ordered the Grayhill 63R series 256 encoders.

The 4 sample averaging is a great suggestion that we will implement. I presume this is just reading the encoder in teleopPeriodic() and keeping a running average of the last n samples.

Can you elaborate on the 1x decoding or 4x decoding?
All of the decoding happens in hardware in the FPGA, including the rolling sample average. All you need to do is configure the encoder object in your code to use 1x decoding or 4x decoding with 4 sample averaging as Joe suggests.

In Labview, this happens in Begin.vi when you call the Encoder Open block. In C++ or Java, these are either parameters for the Encoder object constructor method, or have corresponding set methods to be called after instantiation.