LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Data to SubVIs: W/O clusters?

Solved!
Go to solution

Dear all,

I have 40ish measurement (real) values  and 30ish boolean values continuosly coming from a measurement. I need to pass them to various subVIs for processing the data. I intend to bundle this data in order to not have 70 wires an SubVI-Terminals.

 

What am I recommended to do?

 

I like the bundle/unbundle function for clusters, but any change in cluster shape during development brings a huge effort to fix all folowing VIs. This is not practical.

 

I could pack all data of the same type in big arrays, but i would have to manually "unbundle" them via "index array" (no? is there another way?)

 

What is a practical solution to this?

Thank you!

 

 

0 Kudos
Message 1 of 3
(2,632 Views)
Solution
Accepted by topic author OPCer

Hi OPCer,

 

use a cluster with two arrays. One array holds "real" (aka float or DBL) values and the other holds the boolean values…

 

I like the bundle/unbundle function for clusters, but any change in cluster shape during development brings a huge effort to fix all folowing VIs. This is not practical.

Well, when using clusters you should always think of type definitions! There's a reason we have those…

 

I could pack all data of the same type in big arrays, but i would have to manually "unbundle" them via "index array" (no? is there another way?)

There are key-value datatable implementations available. You may have a look at them…

And yes: there's no other way then using IndexArray to get elements from an array (apart from using autoindexing in loops).

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,623 Views)

You could use Variant Attributes to hold all of your values.  They use a string as the lookup and then you just supply what the data type of that attribute should be.  It is a very powerful mechanism.

 

Though, I am wondering if you should be breaking up your code better.  That many IO typically means multiple systems or subsystems.  You should break up your data to mimic those.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,597 Views)