NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Active Participant
dbaechtel
Posts: 285
0 Kudos
Accepted Solution

Probe provides incorrect information about Queue Status

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?

Trusted Enthusiast
tbob
Posts: 4,073

Re: Probe provides incorrect information about Queue Status


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
Trusted Enthusiast
TCPlomp
Posts: 3,085

Re: Probe provides incorrect information about Queue Status

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!
Active Participant
dbaechtel
Posts: 285
0 Kudos

Re: Probe provides incorrect information about Queue Status

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.

Knight of NI
Knight of NI
Ben
Posts: 16,091
0 Kudos

Re: Probe provides incorrect information about Queue Status

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

Ben Rayner
Who is NOT John Galt... yet... just building Rayner's Ridge

Active Participant
dbaechtel
Posts: 285
0 Kudos

Re: Probe provides incorrect information about Queue Status

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.

Trusted Enthusiast
tbob
Posts: 4,073

Re: Probe provides incorrect information about Queue Status

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
Active Participant
Hueter
Posts: 296

Re: Probe provides incorrect information about Queue Status

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

Trusted Enthusiast
AristosQueue
Posts: 2,427
0 Kudos

Re: Probe provides incorrect information about Queue Status

 


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.

 

Trusted Enthusiast
AristosQueue
Posts: 2,427
0 Kudos

Re: Probe provides incorrect information about Queue Status

[ Edited ]

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.

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page