LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Uneven 2-D Array

Solved!
Go to solution

@MrHappyAsthma wrote:

I understand the difference now, but I think I favor their approach.

 

If you have an array of clusters of arrays, you can reference each cluster by index as well.  (To remove a whole row for example).

 

I don't believe there is any way to unbundle by index, is there?  For example, remove array #2 from a cluster of 5 arrays?


Ah yes. There it is! And when your arrays are very big, you don't want many unbundles with only one connected terminal around. I see now. Smiley Happy

Message 11 of 19
(1,488 Views)

I still cannot figure out how he made his array...  I tried some stuff but it turns out much uglier than his haha:

 

arrays to cluster array.jpg

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 12 of 19
(1,485 Views)

@MrHappyAsthma wrote:

I still cannot figure out how he made his array...  I tried some stuff but it turns out much uglier than his haha:


I actually hate dealing with arrays/clusters on the front panel. Especially when you have an Array of Clusters of Arrays, there's so many different aspects of it to change.

 

I'd almost rather just have a bunch of single entry things and then build them into array/cluster/whatever…

0 Kudos
Message 13 of 19
(1,477 Views)

I just try to avoid clusters period... I mean, I know C so its kinda like a struct.  But the various functions and VIs on the pallette for the clusters just confuse me.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
Message 14 of 19
(1,475 Views)

@MrHappyAsthma wrote:

I just try to avoid clusters period... I mean, I know C so its kinda like a struct.  But the various functions and VIs on the pallette for the clusters just confuse me.


The right way would be to get familiar with the cluster tools to end the confusion once and for all. Right?

0 Kudos
Message 15 of 19
(1,466 Views)

Thats the goal!  But I learn best by seeing and then doing.  But unfortunately no one has posted code to help me master the scary beast that is clusters.


I mean I've read through some of the basic documentation, but it barely scratches the surface.  I know about as much as bundling and unbundling of data.

 

Once we start getting into multi-layered clusters and throw a few arrays in there as well... yeahhh... I get lost 😛

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 16 of 19
(1,455 Views)

Well, a cluster is just a container that can contain all types of assorted things, even clusters. The elements have a defined order (that you can change). It is recommended to label the elements with logical names, so you can later access them by name for automatically self documenting code. Clusters often greatly simplify the diagram if you bundle things that belong together. One wire can replace a huge mess of wires.

 

Similarly, you put all your money in your wallet, all your gym clothes in the gym bag (sure you can just throw everything directly in the trunk of the car, but it will be more difficult to keep track of it all). You put all spoilable food in the refrigerator (and Inside the refrigerator, you have the veggies in the vegetable drawer, the milk and soda in the door, etc.).

 

 

0 Kudos
Message 17 of 19
(1,441 Views)
Solution
Accepted by topic author MrHappyAsthma

Here ya go 😃 this is at least a starting place...

 

 

Message 18 of 19
(1,439 Views)

@altenbach wrote:

Well, a cluster is just a container that can contain all types of assorted things, even clusters. The elements have a defined order (that you can change). It is recommended to label the elements with logical names, so you can later access them by name for automatically self documenting code. Clusters often greatly simplify the diagram if you bundle things that belong together. One wire can replace a huge mess of wires.

 

Similarly, you put all your money in your wallet, all your gym clothes in the gym bag (sure you can just throw everything directly in the trunk of the car, but it will be more difficult to keep track of it all). You put all spoilable food in the refrigerator (and Inside the refrigerator, you have the veggies in the vegetable drawer, the milk and soda in the door, etc.).

 

 


Because one wire can replace a huge mess of wires, clusters are indispensible when using subVIs.  Imagine unbundling your error clusters, for instance.  If you did that, you'd be using six connectors instead of two!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 19 of 19
(1,424 Views)