문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top