12-27-2008 12:09 AM
Solved! Go to Solution.
12-27-2008 12:22 AM - edited 12-27-2008 12:25 AM
Abdel2,
The solution to this is create a typedef control for the cluster and use the typedef cluster in you subVIs to create the array of clusters. Later if you want to add or remove elements from the cluster, just open the typedef and edit it, and say 'Apply Changes'. All loaded VIs referrring the typedef will get updated automatically.
To create a typedef of the cluster, right click on the existing cluster and select Advanced>>customize. Once the control opens in a new window, set the control type to Typedef. See attached image.
12-27-2008 03:12 AM
Thanks. I just tried it but it still gives me an error after I modify the cluster elements. How should I create an array of cluster control in the subvi so it automatically gets updated after modifying the original cluster?
Right now, I right click on the array reference and click "Create control". Then I copy the resulting control to the subvi. It puts a little orange start on the front panel control icon. Not sure if that's what's causing the error.
'
12-27-2008 03:48 AM - edited 12-27-2008 03:49 AM
12-27-2008 08:45 AM
Hi Abdel,
See the video attached. You can open this video with internet explorer.
12-27-2008 09:05 PM
I tried loading the video in both Mozzila and IE but it didn't work. In IE, it just shows a very small empty box. In Mozilla, it doesn't run and show any thing but I can see that it's 21 seconds long.
So what I understand is that with typedef I can create a input in the subvi that contains the value of a custom control (typedef). It will also update the input type if I modify the typedef. What I am trying to do is pass a reference to the array of clusters rather their the actual value because I need to change the array's properties. To do this, I have to create a control that is a strict array reference. Typedef doesn't seem to make any difference.
12-27-2008 10:36 PM - edited 12-27-2008 10:46 PM
Ok...You will need flashplayer
Try to follow this...
1. Create a typedef of the cluster and save it as a .ctl.
2. Open a new VI.
3. Create an array control with element as the typedef cluster.
4. In the controls palette, go to refnum pallete and place a Contol refnum on the front panel.
5. Right click on the control refnum and select 'Show Control'.
6. Drag and drop the array control into the refnum.
7. Right click on the control refnum and select 'Show Icon'.
8. Use this refnum in your subVIs.
12-28-2008 12:19 AM
Thanks, it seems to work great now!