LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

design consideration with two parallel loop systems

Hello, 

 

I have a conflict about the parallel loop designs and data pass between two while loops. 

I have developed a DAQ system software. Two while loop executes in my program.One of them is a detailed user interface which produces a channel list to scan by DAQ system. Channel list will be available when user press a button is called load channel list. This button is placed in a event structure.  Another one is coded for data acquisition. These loops starts to execute at the same time but in different rates. Data acquitision loop rate can be changed from the user interface. Here I need to execute two loops together and pass the channel list to the DAQ loop. I have known that it can be possible with queues, notifiers and local variables. Also I am aware of that their pros and cons. 

 

The problem here is when I use notifier or queue DAQ loop waits button to execute. But I need that two loops should execute and when I load a new channel list, the data acquisition process should be updated with nnew channel list. 

 

I am looking forward to hearing solution suggestions 

 

Thank you in Advance. 

 

King regards

"You live in a graphical world. Why not program in one?"
0 Kudos
Message 1 of 4
(2,378 Views)

Have you had a look at this? http://www.ni.com/white-paper/14116/en 

This is a good starting point and it will allow you to change channels, acq rates etc.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 4
(2,372 Views)

I think you don't really understand the concept of running two loops in parallel => producer (UI) / consumer (DAQ)

You can find more information about that here : https://www.ni.com/en/support/documentation/supplemental/21/producer-consumer-architecture-in-labvie...

 

Try to understand what is happening with the queue's.

 

Furthermore, try to avoid Local variables to a minimum.  There are plenty of other, better ways of sending data from one loop to the other..  e.g. Functional globals : https://forums.ni.com/t5/User-Group-Resource-Center/Everything-You-Ever-Wanted-to-Know-about-Functio...

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 3 of 4
(2,368 Views)

@ABCPrograms wrote:
Furthermore, try to avoid Local variables to a minimum.  There are plenty of other, better ways of sending data from one loop to the other..  e.g. Functional globals : https://decibel.ni.com/content/docs/DOC-21226

If you have a queue mechanism in place, I would use that to pass data from Producer to Consumer. And use a user event to communicate the other way round if need be.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 4
(2,361 Views)