LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What are the rules for connecting clusters?

Hello,

 

  I am using Labview 8.2 and I am havings difficulty connecting clusters. I have a sub-vi that analyzes data and creates a 24 element cluster that is a output(indicator) that I want to insert into a larger cluster for the main vi. The main vi uses a large cluster so this is a cluster within a large clusrter. I cannot get all of the elements to transfer correctly. so here is what I have done so far to get the data to transfer correctly.

 

  1. The cluster of the subvi is the same name as the cluster within a cluster of the main vi
  2. Each element of both clusters (the subvi indicator and the cluster in the main vi) has the same element names.
  3. Each element in both clusters are the same data type.

  Connecting "cluster to cluster" does not work. The only way I have found to get the data to transfer correctly from the sub vi to the main vi is to use "unbund by name" and "bundle by name" for each of the 24 elements to get the data correctly. 

  Any ideas why "cluster to cluster" does not work?

Regards,


Kaspar
0 Kudos
Message 1 of 5
(2,304 Views)

Hi Kaspar,

 

I think the order of the data or data count is different in your both cluster. In this condition only it give error.

You can make Cluster to Cluster by using bundel function.

 

For more clearification please attached your VI.

 

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 2 of 5
(2,294 Views)

The names of the items are irrelevant, but the datatypes and their order is important. Tip #1 is always to create a type def and use it in all instances (it's fine to use type defs in type defs and clusters and so on) and you'll avoid this problem and get automatic updates of your whole program should you need to change the cluster.

 

That said, you'll need to r-click the cluster border and select "Reorder controls" and make sure their numbers the same.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 5
(2,285 Views)

Are you using a typedef of the cluster you are passing to and from the sub VI? 

_____________________________
- Cheers, Ed
0 Kudos
Message 4 of 5
(2,284 Views)

In addition to the using typedefs I think it is also important to ask your sefl if all of this data SHOULD be in a cluster together. If you are using a very large cluster to contain all of your application's data you are probably putting too many unrelated things together. The more tightly coupled your system is the more difficult it becomes to maintain and reuse code. In addition you can run into both performance and memory issues if your data set is very large. You should try to design your clusters to contain only the necessary data for a given task/module. They should not be viewed as large buckets to simply carry stuff around.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 5 of 5
(2,261 Views)