01-25-2014 08:31 PM
See the attached!
For a *.ctl (control) that's a cluster:
1. How is Index Display added? For the attached example, I know it is displayed by Right Click -->Visible Items. But when created from scratch, this option is unavailable.
2. Why would one use and Index Display on such a control?
3. There's a number in the upper RH side of the icon of the *.ctl. What does this indicate and how does it change?
01-25-2014 08:38 PM - edited 01-25-2014 08:39 PM
It is typically preferable if you could attach an actual VI (or control) instead of pdf documents.
01-25-2014 08:44 PM
You have an array of clusters. The cluster (I'm assuming that's what you have since that is what you said) is saved in the .ctl file as a typedef. There was an array container dropped into the block diagram, and the control was dropped into that and set to show as an icon.
01-26-2014 02:19 PM
I am not seeing this comes from an array. It's a cluster with Index Display. The code is from the 2012 cRIO Developer's Guide you can download here
ftp://ftp.ni.com/evaluation/crio/compactrio_developers_guide
01-26-2014 10:40 PM
As already stated, it's an array of clusters. Not sure why you don't believe this, but since you don't, look at the type of the wire. Wire that constant to the edge of a for loop. Turn on context help (control-h) and put the cursor over the wire. You'll see that the data type on the wire is an array of clusters.
01-27-2014 10:59 AM
Just be careful - remember that when programming on RT there is no front panel in an RT app (except when you're remotely connected). In RT you cannot reference front panel objects via property nodes or the like, but you can reference them like variables so long as you're just using it as data storage like a global variable but in a more "local" scope. When using front panel objects, be very careful and be sure to keep to RT programming best practices.
-Danny
01-28-2014 08:43 PM
Nope, it's not an array. Download the code and have a look for yourself.
01-28-2014 09:02 PM
What you have is an array, of which each element is a type defined cluster. The array contains the cluster. When you right click the array and open the type definition, it opens the element definition, which is a cluster. The item on the block diagram is an array that contains that cluster type as the array element.
To generate the same thing yourself, drop an array constant on the block diagram. Then drop the cluster type definition onto the block diagram as a constant. Drag the cluster into the array and you'll see the result matches what you already have.
01-28-2014 09:07 PM
I've already tried that experiment. It's a cluster. Open Recipe Phase.ctl from the project tree under the RT target under the TypeDefs folder.
01-28-2014 09:21 PM