LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialize cluster with different datatypes (a lot of data)

Solved!
Go to solution

Hi

 

I have data, which consist of different datatypes. First i have initialize cluster with those datatypes and then "printed" it to indicator (picture). In picture case data is carrying 8 chars ja 4 floats. That was easy to intialize, but here comes the question: How i can do this same if i have data which look like this (examble):

 

float value

char name [32]

Short value [16]

 

Do i have to create loooong cluster which have one float, 32 chars, 16 shorts? Or can i create those "tables" in some other way?

 

Thx again 🙂

 

-Aa-

0 Kudos
Message 1 of 2
(2,473 Views)
Solution
Accepted by topic author Alias A

I'd suggest using array-to-cluster and configuring the cluster size to match the size of your arrays, then bundle those clusters together.  In terms of LabVIEW's storage, there's no difference between a cluster of

 

float value

char name1

char name2

...

short value1

short value2

...

 

and a cluster of

float value

-> embedded cluster of

     char name1

     char name2

     ...

-> embedded cluster of

     short value1

     short value2

 

So you can use array-to-cluster to get the right sizes instead of creating all those values individually in one giant cluster.

0 Kudos
Message 2 of 2
(2,458 Views)