LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array inside cluster doesn't have a name?

Solved!
Go to solution

Hey, hopefully this is a quick one (I tried googling but couldn't get an answer).


In my code I'm using a cluster of various data types, one of which is an array. The issue I'm having is I can't use unbundle by name to access the array- because it has no name.

The array starts off by being initialised using the initialise array subVI. I've attached a screenshot (ignore the rest of the code). 

 

Is there a way for me to assign a name to this array so that I can unbundle it by name? It would make certain parts of my code a bit neater as at the moment I have to use a regular unbundle.

 

Thanks!

 

0 Kudos
Message 1 of 6
(2,811 Views)

Hi nishalc,

 

right-click the middle terminal of the bundle node -> create constant. In this cluster constant you set the label of the array…

(You should create a typedef for your cluster and use (Un)BundleByName anyway!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,805 Views)
Solution
Accepted by cna

Do it like this.

cluster.PNG

========================
=== Engineer Ambiguously ===
========================
Message 3 of 6
(2,800 Views)

 

 

EDIT: Just saw the other reply which explains it, never mind

 

What would be the advantage of making my cluster a typedef?

0 Kudos
Message 4 of 6
(2,792 Views)

Hi nishalc,

 

when you change the typedef all instances of this typedef will automatically adapt…

 

(This becomes even more handy when you use subVIs to handle your cluster!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 6
(2,767 Views)

@nishalc wrote:

 ....

 

What would be the advantage of making my cluster a typedef?


I wrote a Nugget to answer that question that can be found here.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(2,751 Views)