08-18-2007 11:34 PM - edited 08-18-2007 11:34 PM
Message Edited by Yardov on 08-18-2007 11:37 PM
08-19-2007 03:20 AM
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
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.
Cheers!