Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use NI-DAQmx measure audio signal RMS/frequency/THD in VB.NET language?

Would you please tell me how to use DAQmx measure audio signal(AC signal) RMS/frequency/THD in visual basic.net?
Could you give me  examples for the case?
Look forward to hearing your reply!
0 Kudos
Message 1 of 5
(4,259 Views)

Hi Kelven,

If you have Measurement Studio, getting these values is very simple.  You can get both the THD Values as well as the fundamental frequency by using the Measurements.HarmonicAnalyzer method found in the NationalInstruments.Analysis.SpectralMeasurements Namespace.  The RMS value can be gleaned from the Statistics.RootMeanSquared method which is in the NationalInstruments.Analysis.Math Namespace.  The help on these functions should give you most of the information about the parameters to send to the methods, but if you have additional questions, please feel free to repost and we'll help out you as much as possible.  Thanks and have a good one.

Adam B.
Applications Engineer
National Instruments

0 Kudos
Message 2 of 5
(4,243 Views)
Hello Adam B.

Thanks for your attention!

How about measuring the audio signal amplitude and DC value else?

Thanks
0 Kudos
Message 3 of 5
(4,221 Views)

Kelven,

The best way to get the DC value is to use the Measurements.ACDCEstimator Method.  More information about this method can be found in the Measurement Studio help by entering in:

ms-help://NI.MeasurementStudio/NINETAnalysis/html/NationalInstruments.Analysis.SpectralMeasurements....

Amplitude is a little more difficult, but the best way is to use the PeakDetector class twice, once to get the maximum peaks and once for the minimum peaks, and then subtract the maximum from the minimum.  More info about the PeakDetector can be found in the help here:
 
 
Let me know if you have additional questions.  Thanks and have a good one.
0 Kudos
Message 4 of 5
(4,209 Views)
Hello Adam B.
The attached please find is my doubts about VB.net,could you please help me?
 
 
Best regards,
 
0 Kudos
Message 5 of 5
(4,123 Views)