From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bundle by name input cluster elements do not match constant

Solved!
Go to solution

See the attached png.  Whenever I make a cluster of strings as a constant and then link it to the bundle by names input cluster shown it does not then give me a match for the elements to select in the function.  When I try to just build it (the cluster constant) from scratch it does not show up any of the elements, and if I copy and paste then replace names the attached happens where old elements are still there.  I used this method a few months back and it all seemed to work fine so I am scratching my head here or just being really dumb?

 

 

0 Kudos
Message 1 of 7
(2,944 Views)
Solution
Accepted by topic author labstew

It looks to me like you are changing the value of the strings when you mean to be changing their labels. Right click >> Visible Items >> Label and then change that.

0 Kudos
Message 2 of 7
(2,931 Views)

I really hate pictures like this!  I have no idea what you are trying to show, things are covered up, I can't "play" with the picture and try to understand what you might be doing wrong.  But you are definitely doing something wrong, or don't understand something about clusters, defining them, using them, arranging them, something.

 

Here's what I suggest:

  1. Open a VI.
  2. Create the Cluster on the Front Panel.  Populate it with what you want in your cluster.
  3. Use the Cluster you just defined in some way.  One possibility would be to wire it into the top of a Bundle by Name function, whereupon you should see the Cluster Elements become visible (you may have to drag down to get all of them).
  4. Alternatively, wire the Cluster into the input of an Unbundle by Name function.  Again, you should see the Cluster elements.
  5. If all of this works, what different are you trying to do?  Do you want to rearrange the order of the Cluster elements?  Do you want to see only 2 of the 6 elements?  What problem are you having?  [Sorry, it wasn't clear to me, probably my lack of understanding ...]

Bob Schor

0 Kudos
Message 3 of 7
(2,926 Views)

Each of those cluster elements has its data set to a value, but you need to set its label.

For each element in turn, right click it, and enable visibility on its label, then change the label text.

 

The default label it gets assigned is where-ever the constant came from, so if you had one location that was correct, and you did a right-click to "create constant", you'll get one that works.  But I'm guessing you made this constant from somewhere with similar but not exactly matching labels?

 

Edit: Sheesh, 2 other replies happen while I'm typing mine... guess I need to type faster...

0 Kudos
Message 4 of 7
(2,925 Views)

As an additional note, you can select multiple elements in a cluster and then right click and choose Visible Items > Label.

This saves you a few right click and hover motions.

The end output can be like this (note no data values are necessary, as has already been hinted, and labels are required, as already explained)

Cluster Constant and Unbundle by NameCluster Constant and Unbundle by Name


GCentral
0 Kudos
Message 5 of 7
(2,881 Views)

Yes that it the labels in the constant were "old" or if I made a new string constant and put it in then it just had the default "element 1" name though it was not shown. I think I generally modified them in the front panel as a control then changed it to a constant where label was visible and it was clear what was being changed label vs data instead of trying to modify it as a constant though it is kinda strange that the default is no label hah.

 

 

Appreciate all the responses!

0 Kudos
Message 6 of 7
(2,853 Views)

I recommend that you make your cluster into a typedef. Then wherever you need it you just put down the typedef, and if you need to change a label it will propogate to all of the clusters of that typedef.

Message 7 of 7
(2,842 Views)