Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to calculate Total Harmonic Distortion

Are there any packages in Measurement Studio to calculate total harmonic distortion?
 
What is the best way to read a signal at 2 kHz while reading several others at 1 Hz?
 
Thank you.
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 1 of 4
(4,042 Views)
Hi, You could use NationalInstruments.Analysis.SpectralMeasurements.Measurements (NI Measurement Studio .NET Class Library)
"Only a life lived in the service to others is worth living..." - Albert Einstein
0 Kudos
Message 2 of 4
(4,038 Views)
I figured that much out, but I can't find any example code.  All I could find was the function call and the parameters.  Do I have to figure out how to do it based off of that?  I'd also like to know the best way to set up a task to do it.  ie read over a certain period like 500 ms and then process it so I can get 1 second updates...
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 3 of 4
(4,026 Views)

Hi SCXI,

It sounds like you need to be using the Spectral Measurements methods (NationalInstruments.Analysis.SpectralMeasurements.Measurmenst) with the HarmonicAnalyzer method. Locate information about this method by opening the Measurement Studio help, switch to index tab, and type harmonicanalyzer. There is an Power Spectrum example that uses this method located at C:\Program Files\National Instruments\MeasurementStudioVS2003\VCNET\Examples\Math\Power Spectrum.

Hope this helps!

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 4 of 4
(3,983 Views)