04-25-2018 06:03 AM
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
Solved! Go to Solution.
04-25-2018 06:20 AM
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…
04-25-2018 06:31 AM
I thought it was that simple.
Thanks for the clarification!