LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace with the use of "bundle by name"

Hello! I am going to replace an element in a cluster and uses the "bundle by name" VI. To do this I connect my cluster to the "input cluster" and the new data to the correct element. But nothing happens! The manual says that the input cluster must be wired but not the output cluster. My technique should therefore work but it does not! If I make a local variable of my cluster and connects that to the output cluster it works but it should not be necessary. I have tried both to have the cluster as indicator or control and the opposite with the local variable. Can someone explain this?
/thomas
0 Kudos
Message 1 of 5
(2,893 Views)
Do you mean that when you change a cluster element, you want the front panel indicator (or control) to show this change? If this is what you're after, then you'll need to wire the ouput cluster to the indicator (or local variable of the indicator), just as you described. When it says the output does not have to be wired, this is true in that your vi will run even if it's not wired, as opposed to inputs - your vi will not run (broken arrow) unless all inputs are wired.

Tim
0 Kudos
Message 2 of 5
(2,893 Views)
The "Bundle by Name" function replaces the element(s) in the input cluster with the data input to the element input(s) and puts the result in the Output cluster. It does not change the value in a control or indicator. You must write the values directly to the control or indicator either directly or by using a local variable. The "Bundle by Name" is useful for creating a cluster of a given format or for changing values in a cluster for programmatic use.

John
0 Kudos
Message 3 of 5
(2,893 Views)
Thank you very much! But what is the meaning with not wiring the output? Nothing should happen!?
/thomas
0 Kudos
Message 4 of 5
(2,893 Views)
There's really no point in not wiring the output, but most (if not all) functions work this way. A vi will run this way - but not necessarily the way you want.

Using the bundle & unbundle functions, I often use a cluster of "configuration" type parameters passed thru a shift register. I update new data and / or read different variables as I need them in different parts of the program, and often never show the cluster on the front panel.

Tim
0 Kudos
Message 5 of 5
(2,893 Views)