From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting to Producer/Consumer Loop

Hello,

I am hoping I could get some feedback on a project I'm working on. In short, we are using a DAQ assistant to obtain. The thing with our project is that it is acquiring a lot of data. The attached image is what we are currently doing at the moment. Our end goal is to take the numbers from the DAQ, sample compress it so that we don't have too much data, then average those numbers every X minutes. We just found out that possibly using the producer/consumer loops can be beneficial for our large data. The thing is, I'm just not sure how to go about it. We have lots of components in our coding that needs to be taken into consideration, would those all be going into the producer loop as well? Since the only thing we would want in the consumer loop is from the sample compression to the write to measurement file?

 

Any help/advice would be extremely helpful!

 

Thank you! 

0 Kudos
Message 1 of 2
(2,215 Views)

The thing with a Producer/Consumer is that you can create stages.  Generally, you just want your first loop to acquire the data and dump it into a queue.  The second loop should dequeue that data and process it.  The second loop can then enqueue its data into another queue so that a third loop can record the data.


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 2
(2,192 Views)