09-14-2009 11:05 AM
Morning,
I am having some trouble with my VI's locking up when using a queue. I have one main test application VI which calls a number of support VI's via the Invoke Node. Each VI is running independent of the main test application. I am using queues as the primary method of passing messages back and forth between the main VI and the support VI's. I was trying to save CPU cycles, so I wanted to have all the support VI's only react when a message was enqueued. The way I understand queue's to work, I just need to set the timeout to "-1" of the get next queue VI. However, as soon as I do this, both the support VI and the main VI lockup. So for some reason unknown to me, the queue in the support VI is keeping the main VI from executing. I have included a simplified version of my VI's here. I would love to know when the heck I am doing wrong.
I think I have included all the files.
Thanks
09-14-2009 11:26 AM
The QMH subVI's are missing.
Without seeing what is going on in those VI's it is impossible to tell what might be wrong.
09-14-2009 12:30 PM
I downloaded the QMH VI's from NI's site. I tried to post it but it is apparently too big (ie > then 5.12MB). So instead I attached the help doc. I will try and find a link to it soon.
Regards
09-14-2009 01:18 PM
I cannot open the VI because I dont have LabVIEW on this computer but this is what I suspect is going on:
If you have a Dequeue Element inside a loop, with -1 wired to the timeout, there is no timeout.
This means that unless there is an element in the queue, you will never exit that iteration.
So rather than polling and checking the queue periodically, it will wait indefinitely at the first iteration.
09-15-2009 06:27 AM
09-16-2009 08:57 AM