Question

I am interfacing a LabVIEW VI with an Arduino Leonardo that reads a bunch of sensors and ADCs, collects the data, and then sends the result over the serial port in a single comma delimited sentence. My LabVIEW sub-VI takes the sentence and uses the Spreadsheet String To Array function to split it up into a vector of doubles. Since there are currently 20 readings per sentence, I would like to turn the array into a cluster with Array to Cluster and pass the cluster out of the sub-VI.

The problem with this approach is that the elements of the cluster are named [0], [1], etc., which is not helpful. Is there a way, short of unbundling and then rebundling, or indexing each array element and then bundling, to add a name to each element?

I'm using LabVIEW 2009.

Was it helpful?

Solution

You can create your cluster as a constant (preferably a typedef) and typecast the unnamed cluster into the named cluster. Example:
enter image description here

EDIT If your number of cluster and data type match you don't even need the type cast.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top