LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RPM Calculation


@SwamyM wrote:

Hello,

 

Thanks for the VI ,it working good. But if i change the sampling frequency the rpm values also chages.hoe to fix this.?

 

Thanks,

Mallikarjuna


This could be an issue with undersampling, or debouncing (or many other things).

 

I don't know how quickly your pulses come in or how quickly they go from low to high to low again.  For instance if your pulse duration is only 1ms, then sampling anything slower than 1KHz could cause a the pulse to be missed, and even at 1KHz could be missed due to slew rate issues.  Nyquist says to take 2X but in actual practice 10X is more reasonable.  This means that for a 1ms pulse you should have a 10KHz sample rate.  These 2X and 10X rules a generally for analyzing analog signals but it doesn't hurt to take too many samples but it is a problem if you take too few.

 

The other issue of debouncing could be because as a pulse goes up it may toggle back and forth between just under 1V and just over 1V.  The software would then consider that many pulses.  Some kind of filtering (software or hardware) can help with this.

 

My example was not meant to be a drop in program, just a guide to get you started.  Look it over, read the comments, and try a few things.  If you are still stuck then post back what you are seeing and what you've tried.

0 Kudos
Message 11 of 11
(610 Views)