04-12-2007 03:36 PM
04-12-2007 03:46 PM
Of course you can! That's what they're for. Right click the control and select Advanced -> Customize. At the top of this window you will see a dropdown box that says "control." Change this to "Type def." Edit the control as necessary and save it. Now go to any sub VIs that use it and replace each control with the new type def. The easiest way to do this is to right click the control, then select Replace -> Select a Control. Browse to your newly created typedef and select it.
Now when you want to edit the control, you can right click an instance of it and select "Open Type Def." Any changes you make will affect all instances of the typedef.
04-12-2007 04:15 PM
Okay, I have the controls converted to strict type definitions. But when I update the controls, my links where I'm passing a cluster of control REFERENCES to my subVI's breaks. To fixes I have to remake an indicator from the build cluster function, convert it to a control, and place it in the subVI's.
Or do you mean, I can make my cluster of control references be a type definition?
Ken
04-13-2007 07:33 AM
04-13-2007 10:15 AM
04-13-2007 10:39 AM
Ok, I see what you're doing wrong. The cluster with the references needs to be a typedef. When you change one of the clusters of controls, the reference type changes. This will make the cluster of references change. So for your example, all of your clusters should be typedefs. It may seem confusing with all these typedefs, but trust me it's worth it when you figure it all out.
Also, you might as well just bundle the 2 clusters you have into one cluster to pass to the sub VI if you really want only one input. There's no need to use references just to get the values in the sub VI.
04-13-2007 11:03 AM
04-13-2007 12:20 PM
04-13-2007 02:37 PM
Thank you for your help, my example is working. Please look the my revised example and let me know if I'm making it more complicated than necessary. In order for it to work,
1. I created a cluster on my front panel to hold the control group reference numbers,
2. Converted it to typedef,
3. Used bundle with name to stuff the control reference numbers into my RefCluster,
4. Used the RefCluster typedef in my subVI,
5. In the subVI, I had to add a variant to data command before using the data.
I also extended the example to actually change values on the front panel to verify that it worked as I intended.
Ken
04-13-2007 03:59 PM