10-16-2012 02:01 AM
@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
10-16-2012 02:08 AM
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