02-19-2020 03:31 PM
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.
02-20-2020 01:14 PM
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?
02-20-2020 01:25 PM
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.
02-20-2020 03:38 PM
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.