View Single Post
  #2   Spotlight this post!  
Unread 04-02-2016, 08:15
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Finding RPMs with encoder

Quote:
Originally Posted by Sparx030 View Post
I am trying to set up an encoder to tell me the RPM of a shooter, the encoder is a US digital s4t - 120 - 250 encoder and 4x decoding. I see the multiple ways to get information from an encoder (getRate(), getPeriod(), get()) but what should I use to find RPMs with this encoder. Also, I don't know what to set as my setDistanceperpulse(), is it asking for how far the motor will move per pulse and if so by what unit of measurement is it asking?
S4T is the model... nothing interesting there.

120 is the Counts Per Revolution (CPR). That's the resolution of the encoder per 360 degrees of rotation. So it will provide 120 counts/pulses/ticks per 360 degrees... or one count per every 3 degrees.

I'm not sure what language you're using, but I'm only familiar with the LabVIEW libraries.

The getRate() function will provide you with a counts / second value while getPeriod() will return the inverse, seconds / count. I imagine get() returns the total counts since the encoder count value was reset. The setDistancePerPulse() function should take in either degrees or radians equal to 3 degrees.

Finally, 250 is rather boring to this control mentor. It's just the shaft size, 250 mils or 1/4" shaft diameter.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote