Go to Post NASA rarely launches another rocket just so the programmers can see if they've fixed a bug. - Greg McKaskle [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 04-01-2013, 11:37 PM
meltbox360 meltbox360 is offline
Registered User
FRC #4302
 
Join Date: Jan 2012
Location: Chicago, Il
Posts: 32
meltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of light
Consistent Encoder RPM Issues

Hi all. I am trying to figure out how to get encoders to read consistent values for speed. We have 250 count encoder (e4p) on there and using getRate() they read correctly at low RPMs but once it starts hitting 6000 rpm then we start seeing variations of around 15 revolutions per second. These are mounted on a mini cim. I don't really know what to do at this point. I have tried varying them from k4X to k1X with no real difference. My other thought was doing some kind of

reset
wait
get elapsed ticks
get elapsed time
calculate rpms

as I am under the impression that the variation could be due to the miniscule time frame between ticks that WPIlib uses to calculate the rate? I couldn't figure out how to spawn a new task to do this is and I do not want to block my code. Essentially I have run out of experience and I couldn't find much in the way of code examples or a clear solution to my problem.

So here is my goal:
Get a clean rpm reading useable in PID or other algorithm to ramp up a frisbee shooter to the desired speed.

My problem:
Highly variable readings at higher wheel speeds.

Thanks,
Team 4302
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:42 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi