LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Averaging Dynamic Data and Saving to Measurement File

I am trying to save data every second while measuring data at a rate of 1000 Hz from three DAQ assistants and using the write to measurement file express VI. I am trying to use a producer/consumer style architecture where the producer loop is measuring data from sensors connected to a cDAQ 9178 (NI 9205, NI 9214, and NI 9361) and the consumer data is averaging the data to save to a .lvm file. Because the sampling rate is relatively high, I want to average the 100 samples that I take over 1000 seconds and record a single value for each physical channel every 1 second. I am uncertain as to how to do this, and have attached my .vi below.  

0 Kudos
Message 1 of 4
(2,366 Views)

I wanted to bump this post again in the hopes of receiving some help. Is there a typical way this is done with a producer-consumer loop or LabVIEW example that I may want to look at?

0 Kudos
Message 2 of 4
(2,319 Views)

I can't open your file as I'm still using LabVIEW 2018 but I would suggest switching away from the DAQ assistants and use DAQmx. It's really not that difficult, and you don't have to deal with that dreadful dynamic data.

Message 3 of 4
(2,317 Views)

Yes that's a good sugestion from John, use DAQmx instead.
On another note:
You have a constant "Sampling Rate (Hz)" that's wired to the consumer, but the way it's wired it will only reach it when the producer stops.

Send it over with the your data Queue or if it will not change it's value take out of the producer loop and send it to both loops.

 

Saludos.

Message 4 of 4
(2,303 Views)