‎07-08-2023 05:00 AM
Hello I did give a few queue's a name and bundle them, when I want to un-bundle them they all have got the same name "queue out" how can I change this ?
This might be a strange question and it should be very easy but I can find it
thank you all !
‎07-08-2023 06:14 AM
There is no bundle in your picture. All you probably need to do is change the label of the cluster element.
‎07-08-2023 06:16 AM
Well, I am going to ask you why that is a problem for you?
I mean, you would bundle an array of queue references to enable downstream code to have access to the queue. But, wouldn't it be a LOT EASIER to just Obtain a reference to your named queue where you use it? That is why you named the queue in the first place!
If you REALLY want to have a single wire containing all queue references by name, don't use a cluster! Use a Void Variant and set the attributes as Object Name : Reference to Object. The red green tree lookup is even faster than bundle unbundle and you can mix in a whole lot of named things besides queues
‎07-08-2023 02:12 PM
@~Its_Me~ wrote:
Hello I did give a few queue's a name and bundle them, when I want to un-bundle them they all have got the same name "queue out" how can I change this ?
This might be a strange question and it should be very easy but I can find it
thank you all !
I think I understand your question, but if not sorry.
The name you specify for the queue is NOT the name of the output queue wire, it is an alias to the queue reference number. By naming a queue, you can obtain another reference to it in your program using Obtain Queue and the same name; thus you don't need a wire connecting two different parts of your program. There are advantages and disadvantages of using named queues, but that is another discussion.
‎07-09-2023 01:48 AM - edited ‎07-09-2023 01:48 AM
I think OP is trying to set the wire name (the thing shown in Unbundle-By-Name) rather than use the "Named Queue" feature. If so, what OP can do is right-click on their Bundle and "Create Constant" and change the named of items in that constant to the desired names.
‎07-09-2023 01:57 AM
@JÞB wrote:
If you REALLY want to have a single wire containing all queue references by name, don't use a cluster! Use a Void Variant and set the attributes as Object Name : Reference to Object. The red green tree lookup is even faster than bundle unbundle and you can mix in a whole lot of named things besides queues
Unbundle is zero overhead, so nothing can be faster than it.
‎07-09-2023 02:04 AM
@drjdpowell wrote:Unbundle is zero overhead, so nothing can be faster than it.
It can and usually does cause a data copy so zero cost is not quite right. For small data it is close enough to zero cost to still count as that but large strings or arrays is a different story.
But this data copy would happen in most other cases too except when retrieving entire queue items for instance.
‎07-09-2023 05:01 AM
@rolfk wrote:
@drjdpowell wrote:Unbundle is zero overhead, so nothing can be faster than it.
It can and usually does cause a data copy so zero cost is not quite right.
I'm pretty sure that unbundle by itself is no data copy. I've verified that with the DETT tool and large arrays. Even unbundle-change-bundle will usually be done in place, with no copy.
‎07-09-2023 09:17 AM
@drjdpowell wrote:
@rolfk wrote:
@drjdpowell wrote:Unbundle is zero overhead, so nothing can be faster than it.
It can and usually does cause a data copy so zero cost is not quite right.
I'm pretty sure that unbundle by itself is no data copy. I've verified that with the DETT tool and large arrays. Even unbundle-change-bundle will usually be done in place, with no copy.
Nice info but, since the queue is named, there really is no reason to carry the reference around on a wire! LabVIEW handles all the backend stuff for you like creating and destroying the queue memory space behind the scenes. Worse, if you do carry the queue reference in a cluster or variant attribute, you risk having the reference become invalid if all instances of Obtain Reference are matched with a close or a Close is called with force destroy? T. Running a named queue reference wire around can be a nasty way of shooting off your own toes and should be avoided.
‎07-09-2023 02:59 PM
@JÞB wrote:Nice info but, since the queue is named, there really is no reason to carry the reference around on a wire!
Or, since the Queue reference is carried around on a perfectly good wire, there is no reason to name it.