LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cluster of control references: want to access the control value

I want to be able to save and set control values that are saved (XML). I have my controls on about 5 sub vi's. So I thought it'd be a good idea

to put all the control references in a cluster from the several sub vi's and save and read from one point.

 

I can get the cluster values (i.e. the references to the controls), but how to proceed from here? If somebody has a better idea it is very welcome.

I have also read Ben's nugget here, but it deals with references to controls in a cluster, not references to a reference of a control in a cluster 🙂

 

Message 1 of 7
(3,226 Views)

You want to set the controls to a certain value obtained from the XML...?. Is that right or You want to do something else....? One thing I want to get cleared you are having Cluster of Reference or Reference to the Cluster of Reference....?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 7
(3,221 Views)

Actually I am putting the control references now directly into a functional global, which leaves me with an array of references. I think with this I can now acces control

properties from the control over all sub vi's and save data to file.

 

For example, I want the user to be able to switch language and hence change control captions.

 

 

0 Kudos
Message 3 of 7
(3,216 Views)

Yes you can do so by the unbundle function and access each property of each control...

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 7
(3,208 Views)

Thank you for reading that Nugget!

 

I use a GUI Controller in many apps so I can grab refs in sub-VI's.

 

Here are some screen shots of them in use.

 

7_Get_Refs_In_Use.PNG

 

The first "GUI Cnt" is a wrapper around the AE and invokes the action "Set Analysis mode" then another call let me get a cluster of the refs so I can choose based on the name.

 

6_Get_Refs.PNG

 

This image shows what that action does.

 

THis is what happens when going into collection mode.

 

5_Set_Visability.PNG

 

That is a small set of what you will find in my image gallery Feel free to browse (yes I know there is a lot of Olivia in there Smiley Wink ) and ask if anything catches your interest.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 7
(3,195 Views)

I like your error combiners Ben, very neat Smiley Happy

 

very much off topic, but:

I noticed you unbundled each item with a sepertate Unbundle - for neatness. Is there any expense to that, as opposed to unbunding in one Unbudle?

Richard






0 Kudos
Message 6 of 7
(3,178 Views)

@broken Arrow wrote:

I like your error combiners Ben, very neat Smiley Happy

 

very much off topic, but:

I noticed you unbundled each item with a sepertate Unbundle - for neatness. Is there any expense to that, as opposed to unbunding in one Unbudle?


One of those sub-VIs is called "Error Fork Stacker" and is Open source and posted by Mike Porter in this thread. I will leave it as an exercise to the reader to create the other version Smiley Tongue.

 

The sepearte unbundles are not any less expensinve than a single unbundle node. I also use sepearte unbundles for "documentation" purposes since it puts a nice offical lable right next the the node.

 

 

Ben

 

 

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 7
(3,171 Views)