LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring Vrms using the NI-9220 and the DAQ assistant?

Is there a simple way to measure rms values for voltage inputs using the NI-9220 and the DAQ assistant? I wrote a basic program (I'm very new to labview) to run the DAQ and log voltage data, however it needs to work for both AC and DC values. It works well for DC, however the DAQ assistant claims that it can handle AC measurements the same, but polls and does not output either the peak nor the rms. Is there any simple way to fix this? I only want it reading every second ideally, so if there is a solution that does not involve polling at high speeds, that would be ideal.

 

(I know DAQ assistant is not the best system, however this is a basic program and I do not have time at this moment to learn the more complex system, so please no comments on using DAQ assistant vs not)

 

Thanks!

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

Look in the Signal Processing->Waveform Measurements palette.  There are at least a couple of VIs in there that can take in a signal and calculate the average (DC) and RMS values.  So if you read enough samples during your 1 second period, you can get a good measurement from this calculation.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(1,678 Views)

Thanks for the reply! I was having issues with buffer overloads when I ran the program faster or with more samples, which is partially why I picked the 1 s period (I am only need to log the data every 1 sec, which is why the faster speeds didnt add any benefits at the time). Any advice on how to handle this while still increase the sampling rate?

0 Kudos
Message 3 of 5
(1,673 Views)

Please, post your code so we can give you more precise suggestions.

0 Kudos
Message 4 of 5
(1,634 Views)

If you want 1 second worth of data, then read the same number of samples as the sample rate.  If you are sampling at 1kHz, read 1000 samples each iteration.  As long as you aren't doing something else that takes a very long time or trying to read at a very high rate, this should work fine.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(1,650 Views)