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 Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
ozimmer

Easier access to cluster content (from global or VI icon view)

Status: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.

 

Here we consider a global cluster (first use case) or a function that outputs a cluster and is viewed as icon (second use case).

 

NOW : GLOBAL VARIABLES POINTING AT TOP LEVEL GLOBAL CONTROLS ONLY

In order to access one item within this global cluster, I have to put on my diagram a global variable pointing to the cluster, and use the "unbundle" function to extract the desired element. Right clicking on the global variable only allows to browse top level controls contained in the global VI (can not directly point at cluster components).

 

BETTER : GLOBAL VARIABLES THAT CAN IMPLICITELY UNBUNDLE ANY GIVEN GLOBAL CLUSTER COMPONENT

First you would put on your diagram the global variable, pointing to the cluster. Then right click on it and choose in a tree-form menu (alike the menu to choose among properties/methods of an object) that allows to select not only top level controls, but also controls contained within clusters. The global variable would then point directly at the cluster compponent with a name like "Cluster.Component".

Using unbundle function is cumbersome and can be nicely avoided in this situation.

 

OTHER USE CASE : ICON VIEW VI THAT CAN IMPLICITELY UNBUNDLE ANY GIVEN OUTPUT CLUSTER COMPONENT

For VIs that output clusters (e.g. when the number of outputs is big), the same trick could make it easier to reach specific output cluster contents without the need for an unbundle_by_name operation, at least when the function is viewed as icon.

 

Sorry, not time for artist views 😉

oz

 

3 Comments
AristosQueue (NI)
NI Employee (retired)

Hm...

I can certainly see how the global having dotted access to cluster elements improves diagram space.

 

I can also see how this would improve performance -- currently LV must copy the entire cluster to your local diagram and then unbundle just your needed fields (we have to do that during debugging so that the value on the cluster wire can be probed... we could optimize with debugging off, but no one has ever applied that optimization... globals create so many inefficiencies that there has been little effort to optimize them further... this would let us do the optization even when debugging is on since there'd be no cluster wire to probe).

 

I'll give it my kudos.

 

Standard caveat: this feature is, of course, only if you're using globals. Don't use globals. If you're one of the rare exceptions to this rule, you'll know by having exhausted all other options first. If you think you've exhausted all other options, check with an architect or the forums first! 🙂

AristosQueue (NI)
NI Employee (retired)

I gave the idea my kudos, but I want to add a comment specifically about point #3:

> OTHER USE CASE : ICON VIEW VI THAT CAN IMPLICITELY

> UNBUNDLE ANY GIVEN OUTPUT CLUSTER COMPONENT

 

I'm not sure that this would have any real advantage over the existing Unbundle node. Editor wise, you'd jump through the same number of hoops to right click on it to pick a given terminal and change it out. My optimization arguments don't apply since the underlying subVI has already computed the whole cluster for the output. And it would be this weird appendage hanging off the side of a node, possibly blocking access to other terminals on the subVI. So while I like the global cluster dotted access part of this idea, this last bit strikes me as not such a good idea. If you think this could be viable, a picture showing how you would squeeze it in with other terminals would be needed.

(Splits like these are why it is best to put separate ideas in separate Idea Exchange entries.)

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.