Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

use case and document of CNiMath::RMS() function

I have Measurement Studio 2013 Enterprise version for C++ program development and am looking for explanation on CNiMath::RMS() input parameter and use case. The first input parameter is "data to process" according to inline comment. Most API's specify whether time domain signals or power spectrum are expected. This one API does not explain. Would appreciate anyone who has ever used this API to share your first-hand experience. Basically, I need a function to calculate the average power of a sinewave. Thanks in advance.

0 Kudos
Message 1 of 5
(5,303 Views)

Hi,

 

Thanks for your post! I have found a different function, that may be better for you to use. Please reference the below link:

 

CycleRmsAverage Method

http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/5722f565/

 

Also, what device are you using for application?

Kevin S
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(5,290 Views)

Thanks but your suggestions are good for Visual Basic and C# programmer. I use C/C++ for code development. Also, I am not using any physical device. I am doing post processing on recoreded wave file.

0 Kudos
Message 3 of 5
(5,287 Views)

Hi,

 

I was unable to find a definite answer regarding whether this input needs to be a time domain signal or a power spectrum signal. Can you try to use this function and let me know if it works for a time domain signals, frequency spectrum, or both? What type of data is in your recorded file?

Kevin S
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(5,268 Views)

Recorded are 16-bit PCM wave. Analyze left channel and right channel separately, if stereo.

0 Kudos
Message 5 of 5
(5,266 Views)