08-25-2022 01:05 PM
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!
08-25-2022 01:25 PM
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.
08-25-2022 01:27 PM
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?
08-25-2022 01:40 PM
Please, post your code so we can give you more precise suggestions.
08-25-2022 02:10 PM
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.