LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing DI states from main.vi to sub panel VIs

Hi Raghunathan,

Sorry, here is the LabVIEW 8.0 version.
I am not sure if you configure the queues as size one (i.e. max number of elements = 0). Probably you can use highlight execution (increasing the wait time more to see the effect) to debug this. I used a property node for opening the front panel of the Sub VI and hide the sub panel for the moment.

There is a similar shipped example you can play with called "simple queue.vi" you can use for further understanding.

Message Edited by Yardov on 08-18-2007 11:37 PM

Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 21 of 22
(420 Views)
Hi Raghunathan,


1. I tried to run the example VIs posted. by you after selecting the right path for the subVI. But I got an error at the first Invoke node which said "Strings not found ". I then removed that invoke altogether and ran it again.


Yes - bug - forgot to create a Strings array on FP of SubVI - I think that's the best way to pass this constant array.


  This time the Queue ref worked alright but when the ten iterations were over the sub VI raised an error before closing.

 This is by design!  The error occurrs when the caller destroys the queue before terminating.  Some people don't like using this forced error as a "quit" signal.  I do it because it's reliable and helps minimize code.  The day something else (besides the deliberately destroyed queue-reference) causes a dequeue error in one of my apps, I'll start examining the error-code in the error-case before quitting.


2. In the meanwhile I repeated my original VI by changing the Queue element value to 20 and set the main VI timed loop to 250ms and the subVI timed loop to 1000ms. But this time i set a DeQueue time out of 100ms. Now I lost quite a bit of data Smiley Wink

3. With all of above remaining same I once again changed the queue element to "1" again.  No loss of data. And the main took about 20 sec to finish.

Frankly I am NOT trying to loose data. I am just trying to understand what happens to the "unconsumed " data due to a mismatch in the producer-consumer rates,  when you set the queue element size to 1.


Glad to hear you do want the queue after-all! To be honest, I don't remember ever needing/wanting to limit a queue's size, and experimenting with your app has been a learning experience for me too. Smiley Wink 

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 22 of 22
(413 Views)