From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RPM measurement with Quad encoder

Solved!
Go to solution

Hello,

 

 

 

I think i'm overlooking something simple but would like clarification on measuring RPM via a quad encoder.

 

I have created a DAQmx task to read quad encoder angular position. I have configured the DAQmx task to read angular position in Revs. Samples are read via continuously buffered samples at 1kHZ rate and reading 100samples at a time with no issue. 

 

 

To convert to RPM, I take the first (0) and last (99) sample from the 1D position array, calculate deltaRevs over the sampling period to get deltaRevs/deltaT and then convert to RPM. 

 

Since I'm reading 100samples at 1kHz, I'm believe I should be using a time period of 100ms. However, this produces a 1% error in RPM reading. It seems like I need to use 99ms as my time base to get the correct result. 


What am I missing? 

 

Regards,
Dave

0 Kudos
Message 1 of 3
(2,188 Views)
Solution
Accepted by topic author DavidT

Hi David,

 

between sample #0 and sample #99 are 99 dt intervals…

(From sample #0 to sample #1 it takes 1× dt, from sample #0 to sample #10 it takes 10×dt, from sample #0 to sample #99 it takes 99×dt.)

 

Usually you compare sample #0 from current data block with sample #0 from previous data block and use your calculated 100ms per data block…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,186 Views)

I thought it was that simple. Smiley Embarassed

 

Thanks for the clarification!

0 Kudos
Message 3 of 3
(2,183 Views)