03-02-2011 09:40 PM
If I create a reference to a cluster and then create a Sub Vi, I can change
the cluster variables from the sub vi. All works well - Until I modify the Cluster.
This breaks the sub vi with a wire class error. Can I fix this ???
Solved! Go to Solution.
03-02-2011 09:45 PM
Yes. Re-create the reference control in your subVI. The reference control was created for the original definition of the cluster, now you have to create it for the new definition.
If you haven't done so already, you should create a typedef of your cluster. It will help keep any controls, indicators and constants that use that cluster definition consistent throughout your VI's.
03-02-2011 09:53 PM
I did indeed. I deleted the offending reference.
Create a new one of the modified cluster and
reconnected it to the sun vi. Same error.
03-02-2011 10:17 PM
Post your main and sub VI's so we can poke around in them and investigate.
03-02-2011 10:50 PM
Here is a folder with 5 simple VI's.
They progress in the order of what I was trying to do.
When I hit Ver 3, I thought I was golden.
Then it was - not so fast Bucko....
Thanks for any help
03-02-2011 11:41 PM
Hi Ben,
You got a broken wire just because you used a property node for strict type definitions (not for generic). The VALUE of the property node that you used includes the information of cluster data type.
My suggestion is to use a type def cluster, and use this cluster constant for "Variant to Data" in subVI. By using this type def cluster, you do not need to modify the main part of your subVI. You only need to change the unbundle item when you add/remove new element of the cluster.
03-03-2011 12:00 AM
Man.......That's a mouth full of words.
I tried the same set of examples with a
"Strict Type Def" custom control and
got the same results. Should I have defined
the control as "Control" or "Type Def" . Is there an example
floating around I could find. ?
03-03-2011 12:11 AM - edited 03-03-2011 12:12 AM
Have you token a look on my example code? There is a Type Def cluster constent in the sub VI for "Variant to Data".
Typd Def control identify the correct data type for each instance of a custom control or indicator. When the data type of a type definition changes, all instances of the type definition automatically update.
03-03-2011 12:28 AM
Sorry I didn't.
When I looked at the attachment name, which
was the same as mine, I skipped past it thinking it was.
I'll look at it in the morning. My 9 year old
gets up way to early for me.
Thanks in advance,
Ben
03-03-2011 12:31 AM
You're welcome.