LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1 occured at get queue status

Hi all,

 

I am getting the error message "Error 1 occured at get queue status" in my LabVIEW program where it is dequeuing. I have attached screen shots of the error, the place where it is occring in the program and the VI.

 

1) The error occurs in the wire 107 as could be seen from the attached picture. I will be really happy if I get help to resolve this error. 

 

2) This program write only the starting time stamp but I want to have a time stamp of all the data being written. Can someone help me do it.

 

Many thanks,

Ramji

0 Kudos
Message 1 of 6
(6,203 Views)

Error 1 is an invalid input.  For a dequeue as you have shown, you probably have an invalid queue reference.  You will need to trace back to find where it goes bad.  Check the error output of the previous queue operation.  It is probably also bad.  If you created your queue reference elsewhere, it may be cleaned up before you use it, resulting in the error.  You may not have connected it somewhere (using required inputs on VIs helps this).  There are lots of reasons this may be happening.

 

Note, you can check whether a queue reference is good by creating a custom probe and checking the queue status in it.  Do not dequeue anything in the problem.

0 Kudos
Message 2 of 6
(6,161 Views)

Your problem is likely that your Producer loop is completing before your Consumer loop.  That in itself is fine except for the fact that you are killing your queue as soon as the producer loop is complete.

 

First of all, you don't need the Queue Status at all.  Just use the Dequeue Element.  It will sit there and wait for data to come in.

Secondly, if you want to process ALL of your data, you need to use the queue to tell the consumer loop when to exit.  In your instance, I like to send an empty array.  Then after the consumer loop is complete, kill the queue.

 

Attached is a modified version of your VI.  It is far from complete, but it will hopefully show you what I mean.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(6,154 Views)

Just one more thing.

 

There is a data dependency between the two loops.

The timestamp (Time stamp 5) is going out of the producer and into the consumer.

The consumer will never start before the producer is finished.

 

0 Kudos
Message 4 of 6
(6,152 Views)

@dkfire wrote:

Just one more thing.

 

There is a data dependency between the two loops.

The timestamp (Time stamp 5) is going out of the producer and into the consumer.

The consumer will never start before the producer is finished.

 


Nice catch.  I can't believe I missed that.  I guess I was too focused on the queue.

 

So what you really want to do here is have the queue accept a cluster.  The cluster should contain your 2D data and the timestamp.  Then you don't have to pass the timestamp via a wire between the two loops and you will have the correct time stamp for your write.

 

Another thing I noticed, you do not need the To/From Dynamic Data nodes in your producer loop.  The graph will accept the 2D array just fine.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(6,150 Views)

I have read all your suggestions/corrections. I will edit my program after 6 hours from now and keep you all updated.

 

Thank you so much for taking time to looking into it.

 

Many thanks,

Ramji

0 Kudos
Message 6 of 6
(6,132 Views)