Measuring frequency of a series of pulses from analog input

One method would be to run your 100 msecs worth of samples throught

the "Threshold Peak Detector.vi" and use the resulting indices and

count to figure out the frequency. The count output tells you how

many threshold crossings you had which should equal the number of

pulses. Then, subtract the first element of the indices array from

the last and multiply by the "delta t" (take the reciprocal of your

sample rate for that channel) to get the time period. Now you know

how many pulses (count) per time period. Divide the count minus one

by the calculated time period to get the frequency. Remember to

subtract one from the count and be careful about choosing your

threshold.

I know you want to do that with AI, but the counter / timers are

really designed for that sort of thing. If you have any on your DAQ

board, they are itching to take this measurement.

Dan Press

www.primetest.com