usage of "get queue status".vi

usage of "get queue status".vi

Post by labmaste » Wed, 30 Jul 2008 16:10:07


I want to show the current status (busy indicator) of my program (producer/consumer routine).
In consumer routine, I checked the current queue status by # element in queue in "get queue status.vi".I anticipate "non-zero" value in the number of queue when one or more event was happened.(As you know in the attachment, I force to insert a time-consuming code for 2 sec to stay in the same iteration number.)
 
Strangely, as you can see the values,  I can't check the event (only 0 of # element at an event) although the event value was passed to consumer routine.What should I check to realize my purpose????? 07-29-2008 02:05 AM? labmaster? ?? ?????


yahoo1.jpg:
http://www.yqcomputer.com/
 
 
 

usage of "get queue status".vi

Post by MikeS8 » Wed, 30 Jul 2008 16:40:05

Hi labmaster,
how many time elapsed between read the status and receive the element? It could be that you read the status and nothing is in there, but your dequeue function has a timeout of -1 so it will wait til it receives the next message.
Mike

 
 
 

usage of "get queue status".vi

Post by smercurio_ » Thu, 31 Jul 2008 05:10:08

Why don't you want to use a timeout in the consumer loop? As it is, the code will only work if there is a timeout so that the consumer loop spins around so you can catch the element having been placed in the queue.