LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initializing array's elements to different data types

Solved!
Go to solution

Hi!

 

Receiving data sring and write it to array. Data sting consist of different data types, so now i have to intialize my arrays element somehow to correct data type. Forexample array:

 

char

char

int

int

float

float

 

Is it possible somehow? Or do i have to use formula node or something alike?

 

Thank You ! (again) 🙂

Message Edited by Alias A on 05-28-2009 01:24 AM
0 Kudos
Message 1 of 2
(3,164 Views)
Solution
Accepted by topic author Alias A

This data looks like a cluster, to create such a cluster you can build a cluster constant on the BD and use the typecast function to fill the cluster. Some things you need to be aware of:

What is the size of the Int?

What is the size of the float?

What is the endian-ess of the data.

 

Here are two examples:

 

Ton

 

Message Edited by TonP on 05-28-2009 08:44 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 2
(3,156 Views)