Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Input frequency measurement

Dear Everyone,
 
Is there a way to measure a frequency from an analog input module, I mean programatically? 
I am using a cDAQ-9172 & Visual C++.  My analog input modules are NI 9205 & NI 9201.
 
Regards,
A
0 Kudos
Message 1 of 2
(6,461 Views)

A,

Since your device only measures voltage, you must use software algorithms to convert those measurements to frequency.  Keep in mind that the DAQmxReadAnalogF64 returns an array of samples and not a waveform.  You can take 1/sampling rate to find dt (the time between samples).  You will then need to find the number of samples that make up one period of the signal and multiply it by dt.  If you then take 1/period time you should recieve the frequency of the signal.  This is an algorithm that you will have to implement, though.

0 Kudos
Message 2 of 2
(6,444 Views)