LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to array of controls.

Hi,
I have an array of clusters to which I have to be able to read and write data. However, clusters can be only indicators or controls, not a combination of two. Maybe changing a control to indicator dynamically or somehow managing to put different types of vi components in one cluster can do the job? Please tell me of a way to do this. Thank you.
0 Kudos
Message 1 of 5
(2,966 Views)
If you want the user to be able to use the cluster to enter or edit data, the cluster (and the array) needs to be a control. Programmatically, you can use write local variables or property nodes to write to a control. Look at some of the local variable example VIs that ship with LabView. Just be aware that using local variables to update a large array will cost you a big performance hit.
With the cluster as a control, every element of the cluster is a control: you can't stop the user from updating any item. However, you can programmatically restore the value of cluster items you don't want the user to modify. You may need to use an event structure to impliment this.
Message 2 of 5
(2,966 Views)
A cluster cannot contain both controls and indicators but you can both read and write to a cluster. A local variable can be used. See the attached picture for an example with a local and an unbundle by name in order to set a particular control in a cluster.
Message 3 of 5
(2,966 Views)
Hi Al S,
The problem that I have is that I have an array of clusters which contains edit boxes controls, and a single graph to display the data. However, because the graph is in a single cluster with controls, it is also a control and doesnt allow me to display any data. Is there any way around this? Thank you.
0 Kudos
Message 4 of 5
(2,966 Views)
Okay I figured this out. Thank you very much for your help!
0 Kudos
Message 5 of 5
(2,966 Views)