View Single Post
  #5   Spotlight this post!  
Unread 01-04-2013, 03:19
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Voltage Counts Range 0-970

Quote:
Originally Posted by Jefferson View Post
Now that we have slip rings on our swerve modules, we spend some time at the roll-over point of our analog encoders (the point where it rolls from 5V to 0V). We were surprised that there was significant "chatter" around this point and chalked it up to a bug in the PIDContoller to be found latter.
In trying to debug some different weirdness observed in crab, I started looking more closely at the values reported for GetAverageValue from the modules. I was surprised to find that the encoders never report anything greater than 970, but roll over all the way to 0.
A few things we checked:
Encoders are providing a full 0-5V output range.
GetValue provides the same range.
Is there any reason you are not using the GetVoltage entry-point? That will take into account factory-calibrated scaling coefficients unique to every module. You will get far more accurate results using that method. At the very least, try that and see how closely it matches your DMM at that max value.

Also keep in mind that the range of the module is -10V to 10V.

Joe
Reply With Quote