LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can multiple vis share input from a DAQ simutaneously


@Yogesh_Redemptor wrote:

When you want to acquire the data and share the data to multiple loops, 'Queue' is not a option; instead 'Circular Buffer' is the option for you.

 

The 'Circular Buffer' data structure is used to share the data between multiple loops but with same synchronized manner.

 

(...)

 


Or perhaps my own implementation using DVR's:

 

https://decibel.ni.com/content/docs/DOC-20403

 

Br,

 

/Roger

 

0 Kudos
Message 11 of 12
(339 Views)

A single element queue works a lot like a global variable (with the same caveats).

 

o Create a queue using Obtain Queue and set the "max queue size" to 1

o Put an item in the queue with the "Lossy Enqueue Element" function (old value is discarded)

o In the subvis, use the "Preview Queue Element" function to read the queue (does not consume the data)

o Use data flow to ensure that only new queue values are fed to the subvis.

 

Along with the data, the queue data structure could contain flags to determine which subvis to to run.

 

steve

 

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 12 of 12
(337 Views)