I have a complicated GUI with many contols and sub VIs. I pass the values of my controls to the sub VIs and when I need to change some property of the controls (i.e. disable them), I pass the references.
My Block Diagram is far too big. So I want to use global variables. Then I could display the sub VIs as icons and save a lot of space on the diagram (my sub VIs have a lot of inputs).
But what should I do about the controls whose properties I want to change (now I pass references to them instead of just values)? When I use a global variable, I can get only its value, nothing more.
I could create global references to all my controls and use them in my sub VIs, but then the sub VIs would be very unclear and I want to avoid it.
So how can I create a global control in Labview?
Edit: I have a control called "Motor ID" in my main VI. When I want to connect to the motor in a sub VI, I pass a reference to that control. In the sub VI I use the property "disabled" to disable the control if the connection was established.
When I use a global variable to hold the motor ID, all I will be able to do is to get the motor ID and connect with the motor. But I won't be able to disable the control in my main VI.
Based on your comments I would say you can not change properties of your controls/indicators using globals.
Remember Globals transfer only the VALUE of the controls not ever properties associated with them. You have to pass control references to subVIs to be able to change control's properties on the FP.
I can suggest you to group all your controls in one Cluster, create the reference of that cluster and pass one reference to your subVI to avoid code complication. Or you can just group all references of your controls into cluster and pass one wire to your subVI.
Hope this will help.