LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do LabVIEW Example Projects use Global Variables?

Solved!
Go to solution

So you can queue in a sub-vi and dequeue in the top level vi while the sub is still running ?     Did not know that.

 

What about notifiers ?

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 21 of 25
(1,655 Views)

@dacad wrote:

So you can queue in a sub-vi and dequeue in the top level vi while the sub is still running ?     Did not know that.

 

What about notifiers ?


Yes - provided the top-level dequeue loop is independent of everything else.  Sure, I think notifier would work, also.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 22 of 25
(1,650 Views)

@dacad wrote:

 

What about notifiers ?


Notifiers are best when you have a single data source that you need to broadcast to multiple parallel processes (demultiplexing). In your case, queues would be the better choice, as they more easily facilitate the use case of multiple data sources with one data sink (multiplexing). Since the data is for UI notification purposes only, I'd recommend setting a maximum queue size and using the Lossy Enqueue Element function, since (I'm assuming) it's not critical to see every single status update that occurs.

 

All of this is food for thought for the future, since your global-based implementation seems to be working fine.

Message 23 of 25
(1,643 Views)

If you're using LabVIEW 2013 or later, you can check out these shipping examples for more information:

 

examples\Synchronization\Queue\Using a Queue As a Multiplexer.vi

examples\Synchronization\Notifier\Using a Notifier As a Demultiplexer.vi

 

Note that the queue example doesn't use the Lossy Enqueue I described earlier, but it could be modified fairly easily to do so.

0 Kudos
Message 24 of 25
(1,641 Views)

Will have to try this as I actually am having issues since I just had to upgrade to a win7 machine and updated to LV 2013.  Major display update glitches with occasional delays in code execution. (all being dealt with in another thread so won't detail here)

 

Thanks....

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 25 of 25
(1,627 Views)