View Single Post
  #21   Spotlight this post!  
Unread 30-01-2013, 11:07
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Measuring motor speed

Quote:
Originally Posted by pfreivald View Post
They got it counting yesterday, now just need to figure out how to report rates. Thanks for the help, folks!
Use the GetPeriod() method in the Counter class. This will give you the elapsed time (in seconds) between the two most recent pulses*. Take that elapsed time (call it T) and use it in the following formula:

RPM = 60/(T*CPR),

... where CPR is the number of counts per rev (in your case, CPR=1).


*assuming you are not running in semi-period mode
and you haven't modified the FPGA sample averaging from its default value of 1