Showing results for 
Search instead for 
Did you mean: 

Labview 8.2 Xcontrol Array

Was wondering if Labview 8.2 supports arrays of Xcontrols. This feature would save me some time and might convince my boss to upgrade sooner. I read the release documents and could find nothing that might indicate either way. If anyone knows if/when this was done that would be great. I am running Labview 8.0 Professional. I figured this would be something i could not test running labview over the internet.
0 Kudos
Message 1 of 8
From what I can tell, you cannot have arrays of Xcontrols in LabVIEW 8.20
Of course you could try to make a new XControl that is an array of your basic xcontrol. Have you tried that? (Not sure if this works. Possibly place the items first in a cluster container).

Message Edited by altenbach on 08-29-2006 06:54 PM

0 Kudos
Message 2 of 8
What a drag, 8.5 still does not support arrays of XControls. Wish I had read about this limitation before I went to all the trouble to create an XControl I cannot use in this project. I created an XControl of a combo box that I have extended the funtionallity to automatically save the last ten items used. Needed this as part of an array of channel definition clusters - oh well. So for now continue to think of the "X" in XConrtol as "Not"Control but a subpanel.
0 Kudos
Message 3 of 8

Still does not work with 2009!

- Jimmy
0 Kudos
Message 4 of 8

XControls can be but in an array, set them in clusters first and then in a array. 

0 Kudos
Message 5 of 8

I just tried putting an XControl inside a cluster inside an array in 2010, and it didn't work. It did work with a regular numeric control. If there's a trick to getting that to work, I'd like to hear how. Can you post an example VI with an XControl somehow embedded in an array (via a cluster, or otherwise)?

0 Kudos
Message 6 of 8

I have to be short in my explantation is fairly late in the Netherlands at the moment so I will only show the basics of implementing arrays of XControls.


The basics are:

First of all it is important to know that an cluster is an array of different elements. Thus a cluster is basically an array.


Each XControl has its own instance (context in LabVIEW code). The key is to keep multiple instances of the XControl in the array. The example demonstrates the array functionality in a cluster. (available in less then 5 min). Each element can be changed on two principles. The principle of data flow and the principle of object orientated programming (VI server).


To change a single element in a array you want to change the individual element and not the base object. The array has a base object that works like a template for the rest of the array. This is why the data flow principle will never work on XControls in arrays and thus not really usable. Therefore the cluster (data can also be represented by a variant if you like and later on loaded into a array of XControls) will act like a bounded array. This way you can use data flow to program arrays of XControls.


To change a single element by reference in an array seems a hard thing to do, and well it actually is. But left in a cluster you can make XControls visible or hide them based on the number of elements you have. By reference you don't have to worry about setting the elements in the right position by building a new cluster/array. The only real problem is that when the value is changed each element can be changed individually. When the source changes all elements will change at once.


So if you really want to make an array of XControls for short development time I recommend using clusters as arrays. An array example will follow when I have some spare time 😉

0 Kudos
Message 7 of 8

Thank for your quick and helpful reply, _wolf_. I look forward to seeing your array example.

0 Kudos
Message 8 of 8