キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Why do LabVIEW Example Projects use Global Variables?

解決済み
解決策を見る

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 件の賞賛
メッセージ21/25
1,917件の閲覧回数

@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 件の賞賛
メッセージ22/25
1,912件の閲覧回数

@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.

メッセージ23/25
1,905件の閲覧回数

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 件の賞賛
メッセージ24/25
1,903件の閲覧回数

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 件の賞賛
メッセージ25/25
1,889件の閲覧回数