11-13-2014 10:56 AM
Hello all!
I am acquiring two continuous data signals, one from a NI-9211 and the other from a USB-6002. The NI-9211 is set for 3 samples to read at a 3 Hz rate. The USB-6002 is set for 1000 samples to read at a 1 kHz rate with a 0-5 V signal input. The reason the USB-6002 is set for such a high rate is that the voltage signal has a lot of variability in the mV range.
What I want to do is take an average of the data points from each signal at 1 second intervals. The averaged data is then being used to calculate a third value.
Then I want to do the same thing, but at 2 minute intervals. The two minute interval data will be saved to an Excel file.
The reason I want both 1 second and 2 minute intervals is that I want to view the data in real-time. However, since my testing is about 24 hours in length and I am not expecting large changes, I want to save averaged values every 2 minutes.
The problem I am having is averaging the waveform data from the signals. Any help would be greatly appreciated. Thanks!
11-13-2014 11:10 AM
11-13-2014 11:32 AM - edited 11-13-2014 11:37 AM
Will be your friend
11-13-2014 11:35 AM
Sorry, I forgot to attach the code. See attached to this post.
11-14-2014 02:10 PM - edited 11-14-2014 02:10 PM
Thanks for the idea. I tried implementing your design using a simulated DC signal but I only got one set of samples from the signal even though it was set on continuous. See attached vi.
Would it be easier to average the 1000 data points I get every second and then average 120 second chunks of data?
11-17-2014 10:01 AM
Hi CalebWG,
Try putting the DAQ-Assistant inside the while loop. You can discard the queue’s functions. Let me know if this is what you needed or if I misunderstood your requirements.
Luis C.
National Instruments