LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A little advice with an array of cluster of array of clusters

Solved!
Go to solution

Hello,

 

I am working on a VI and currently drawing a blank, so hoping for a little advice.

I was originally working with an array of a cluster. And that worked well for my original scope.

 

Now I need to expand to have multiple versions of that working, and originally I thought of making my control a 2D array, but I am not happy with that. So I decided to make it a deeper array of cluster....

 

So now my control is an array of a cluster of an array of clusters

 

I can set the values and everything as I need, so that's not an issue. But what I would like to be able to do is get the scroll bar position of the inner most array, as shown in the attached VI.

If I cannot, I will work around it. It's not 100% necessary. But I kinda want to know now. I played around for a bit but I just wasn't seeing it how to get it.

 

I can get the index of the array, which is the more important piece of info I need.

Download All
0 Kudos
Message 1 of 8
(427 Views)

Given that LabVIEW multi-dimensional Arrays have "square" edges, the only thing that makes sense to me is that you are changing some element of the Cluster.  But since every element of an Array has to be the same type, how can you "mix" Clusters of different types?

 

One way could be to have your "Array payload" be a Variant, and have the "outer" Cluster include an Enum that says which of the possible Payload Types is in the Variant.  This can get a little tricky -- it might be simpler to not try and "mix and match", but instead to have a separate TypeDef for each "type" of Array of Clusters and use other logic to know which of these types is needed for a particular function.  Of course, "wires" (and Shift Registers) make it easy to know "Oh, this Wire is carrying my Type One Array-of-Clusters, and that Wire has my Type Two Array-of-Clusters".  [A handy "Feature" I learned, but haven't used much, is that if you make your Array of Clusters an Object/Class (I'm a bit fuzzy on the terminology here), you can make the "wires" have a unique appearance in Color and Pattern, to help keep the wiring neat.

 

Bob Schor

 

 

0 Kudos
Message 2 of 8
(412 Views)

Not sure what you want.  Is the attached what you are looking for?

In your original, the horizontal scroll bar was useless because you arranged the array vertically.

Note that there's something funky about your block diagram; I can't access it.

0 Kudos
Message 3 of 8
(394 Views)

You mean the vertical scroll bar? If you want its position, link the property node to the inner array, not the outer.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 8
(387 Views)

Yeah, the vertical scroll bar.

The reason was is I might link it to another control to have scroll bar position on each match each other.

The example I provided is a smaller version of what I am thinking to do.

 

It was pointing to that inner array I couldn't put my finger on how to do to GET that property.

0 Kudos
Message 5 of 8
(385 Views)
Solution
Accepted by DBISI

@DBISI  ha scritto:
..

It was pointing to that inner array I couldn't put my finger on how to do to GET that property.


Not sure about your problem: are you talking about linking to Unit Array in?

 

pincpanter_0-1753337263258.png

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 8
(340 Views)

That gets me the properties of the array, yes. But I don't see a property for the scroll bar position... I can set one for the label scroll bar, and for the array element scroll bar, but both of those just return a 0...

 

DBISI_1-1753390286104.png

 

It's not a big deal. I already opted to just not use it and move on. It was an option that worked but wasn't required for my project.

 

0 Kudos
Message 7 of 8
(307 Views)

I just realized that what I was looking for was actually "Index Values" as opposed to the scroll bar position. My bad.

So that works good.

 

I kinda confused myself... I guess.

0 Kudos
Message 8 of 8
(297 Views)