View Single Post
  #8   Spotlight this post!  
Unread 14-04-2012, 20:08
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Encoders on Drive Train DON'T WORK.

Quote:
Originally Posted by Ether View Post
What type of encoders are you using?
Where are the encoders mounted?
What language are you using?
Are you trying to measure speed or position?
Are you using 1x, 2x, or 4x decoding?
If you are trying to measure speed, what method are you using?

We are using US Digital... I asked Matt to get the model numbers...
The ones giving failure are mounted on the drive... its yer basic tank drive.

We are assuming 4x as we had success with that for last years robot... Unfortunately I'm the software guy and do not know for certain what encoders we have yet... (awaiting reply from Matt)

We are using wind-river c++ the GetRate() method in WPI library... I am confident the software works because we use the same exact code for our last years robot with proper read back.


In regards of what method we are using... We have another encoder problem that I was thinking of posting, but it may be related.

I have attached two dumps which show two different methods of capturing the rate... one of which is the GetRate() which uses the GetPeriod technique. The second pw2... is using the GetDistance() where it gets the delta each 10ms iteration (The t= shows the time per iteration). And that then is divided by the time where both show units of RPS. I've verified that both techniques work properly on the other robot (I can attach this dump if you want to see). Anyhow, there is another anomoly that this dump presents where every 2 iterations the pulses fail to update... I'm surprised how well GetRate() kept the average. I believe the GetDistance technique show a real problem... as even with the GetRate() the faster speeds looked choppy. I want to try the 1x 2x speeds to see if that will solve it.
Attached Files
File Type: txt RateDump1.txt (28.7 KB, 11 views)
File Type: txt RateDump2.txt (12.1 KB, 5 views)