LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Probe provides incorrect information about Queue Status

Solved!
Go to solution

In LabVIEW 2009, the Probe provides incorrect information about Queue Status. I Obtained and Unnamed Queue, did a Flush Queue and the Enqueued  double precision zero values 5 times. A Get Queue Satus function shows 5 elements in the queue, but a Probe placed on the Queue Out (Queue Refnum) wire displays:

     "   [11] queue out     Unnamed - 0 enqueued elements  -   0xbd600008  "

 

I can not seem to get a Probe to properly display the number of enqueued elements when I place it on any of the Queue Out wires.

 

Why does the Probe display the wrong number of enqueued elements?

0 Kudos
Message 1 of 13
(5,166 Views)
Solution
Accepted by topic author dbaechtel

@dbaechtel wrote:

 

Why does the Probe display the wrong number of enqueued elements?


Because its a bug.  I was able to duplicate dbaechtel's findings.  I tried probing at several places and got "0 enqueued" at all places.  Naming the queue does not affect the probe outcome.  This has got to be a bug.  The # elements in queue output from the Get Queue Status is correct however.

 

20457iE57AFFA9D3CF3EC1

 

- tbob

Inventor of the WORM Global
Message 2 of 13
(5,158 Views)

A queue is limited to be used only inside the application instance that created the probe (I think that changed in 8.5 or 8.6).

Probes run in a private application instance, so they cannot be used to really see what happens inside a queue.

Creating a custom probe and getting the info should return an error on the status.


I think this is an unwanted side effect of a valid security measure by NI.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 13
(5,152 Views)

The info that the Probe displayed about the Queue status is incorrect and misleading. It caused me to do some debugging that didn't need to be done. If it can't display accurate info, then it should display nothing at all.

 

I would be very helpful if it would display the number of enqueued elements properly.

0 Kudos
Message 4 of 13
(5,147 Views)

i have to concur with Ton about the context of the probe vs the queue but I am wondering if we are looking at simantics issue (the meaning of words).

 

In very busy apps we may not be able to insert something into a queue (see queue status for number pendining insert) right away do to the size of teh queue being limited when created.

 

So I have to ask out loud:

 

Does that value tell us,

 

 how many elements are in the queue and can be dequeued

or

how many are waiting to be inserted?

 

I don't know the correct answer and only someone with access to the Ivory tower can tell us what value really means and then can we hob-nob re: its bugness.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 13
(5,110 Views)

I think that the Probe should provide the same value as the Queue Status function does. Unless it provides more information, like how many are enquired and how many are waiting to be engueued.

 

Anything less would be confusing and would probably be misinterpreted.

0 Kudos
Message 6 of 13
(5,099 Views)

What Ton said might be right, but that means that probing a queue is useless.  One would expect that probing a queue would give the number of elements inside the queue waiting to be dequeued, or even a list of what is in the queue.  After all the wording in the probe says "0 enqueued elements".  It doesn't say "0 elements waiting to be queued".  Maybe it isn't a bug due to what Ton said, but the information it shows is very misleading.  If it can't accurately display the number of enqueued elements, then it should not display that phrase at all.

 

- tbob

Inventor of the WORM Global
Message 7 of 13
(5,098 Views)

Hey guys

 

This probe behavior is not particularly helpful and I just wanted to let you know I have reported this to LabVIEW R&D for further investigation (CAR 248107).

 

Hunter
Applications Engineer

Message 8 of 13
(4,982 Views)

 


@TCPlomp wrote:

A queue is limited to be used only inside the application instance that created the probe (I think that changed in 8.5 or 8.6).

Probes run in a private application instance, so they cannot be used to really see what happens inside a queue.

Creating a custom probe and getting the info should return an error on the status.


I think this is an unwanted side effect of a valid security measure by NI.

 

Ton


 

This is all false. Custom probes run in the same context as the VI that they are probing. They always have since we introduced probes in LV 8.0. They still do in LV 2010. Open the attached "RunMe.vi" on your machine, and then probe the only wire on that diagram using the attached custom probe. It should return TRUE no matter which VI you attach it to, indicating that the probe and the VI are in the same context.

 

I'm not sure where the other problems you're seeing are coming from. I'm going to have to take a closer look at this thread, but I can definitely say there isn't a problem with the probe and I seriously doubt that there's a problem with the Queue Status primitive if only because that hasn't changed in a long time, and we would've heard more complaints about it before now.

 

Download All
0 Kudos
Message 9 of 13
(4,878 Views)

Wow. I take it back. The Queue Status "elements" output appears to return an empty array going back to LV 8.5 -- that's in probes or anywhere else. 

 

Nevermind. I forgot to set "Return Elemetns?" input to "true." Once I did that, everything works fine.

0 Kudos
Message 10 of 13
(4,870 Views)