01-29-2018 05:23 AM
Hi all,
I hope this is an easy question but I can't find a solution. I would like to create references for all front panel objects and indicators located in Tabs in my application so I can access and control these in subVi's. There are multiple charts/controls/indicators to read/write. The easiest way I can think of to do this would be to select all the items, Right-click and Create References. I can wire all the references to a cluster and I would be able to access these easily in my VI's.
I'm trying to do this programatically using Tab Properties -> CtlsonPage to create an array of references (or convert to cluster?). The issue I'm having is identifying the control & indicators as they don't have unique identification labels so I know which reference to use. Is there a method attaching labels to references so I know which item I am accessing?
Cheers,
Dave
01-29-2018 05:54 AM
Hi Dave,
two notes:
- you can use a property node on each FP reference to read the label of the control
- I suggest not to use ArrayToCluster just to get the elements of an array, use IndexArray (or autoindexing loops) instead!
01-29-2018 05:57 AM
Feed each reference to a generic property node (from the Application control palette), then select the Label.Text string property.
You will get "Number", "ON/OFF" or "Chart" depending on the control the reference is related to.
01-30-2018 06:12 PM
The short answer is 'No'. Because the property "CtlsOnPage" is an array, all elements contain identical label information (all elements of an array must have identical properties (except for Value and Position)).
01-31-2018 03:01 AM
Thanks for the help people, I've decided to stick with the "bundle in to cluster" method for now, it requires a bit more work to maintain but it does what I want.
Cheers,
Dave