View Single Post
  #13   Spotlight this post!  
Unread 26-03-2012, 12:04
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,073
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Rockwell sensor as a encoder/counter

We use the "getPeriod()" method in the Counter class. Something (in Java) like:

Code:
public final static double kTicksPerRevolution = 2.0;
private Counter counter;

double getRPM()
{
   return 60.0/(counter.getPeriod()*kTicksPerRevolution);
}
The factor of 60 converts between revolutions per second and RPM.
Reply With Quote