LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Main Front Panel Cluster reference in Sub VI

Solved!
Go to solution

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 ???

 

0 Kudos
Message 1 of 18
(3,327 Views)

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.

0 Kudos
Message 2 of 18
(3,326 Views)

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.

 

0 Kudos
Message 3 of 18
(3,324 Views)

Post your main and sub VI's so we can poke around in them and investigate.

0 Kudos
Message 4 of 18
(3,310 Views)

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

 

0 Kudos
Message 5 of 18
(3,305 Views)
Solution
Accepted by Ben_01880

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.

0 Kudos
Message 6 of 18
(3,297 Views)

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. ?

 

0 Kudos
Message 7 of 18
(3,292 Views)

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.

0 Kudos
Message 8 of 18
(3,289 Views)

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

 

0 Kudos
Message 9 of 18
(3,285 Views)

You're welcome.

0 Kudos
Message 10 of 18
(3,283 Views)