01-29-2015 04:44 AM
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!
Solved! Go to Solution.
01-29-2015 04:48 AM - edited 01-29-2015 04:51 AM
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).
01-29-2015 06:57 AM
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.