Quote:
Originally Posted by jfitz0807
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.