LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Types - a comprehensive guide

I am new to labview and have been trying to find a comprehensive guide to all the data types labview uses and how to convert between them
0 Kudos
Message 1 of 8
(3,647 Views)
Hi,
you must read some PDF files from:
"YourLabVIEWDir\manuals\"

1. datastrg.pdf
This manual describes how LV stores all the possible data types and gives you a lot of info about data formats.

2. lvuser.pdf
General LV user manual. Here you can read a lot about LabVIEW.

Also what you may need is located in following palettes:
1. "Functions->Numeric->Conversion"
2. "Functions->Boolean" includes such functions like "Number to boolean array" and so on.
3. "Functions->String->String/Number Conversion"
4. "Functions->String->String/Array/Path Conversion"
5. "Functions->Array" and "Functions->Clucter" include functions which convert clusters to arrays and back.
6. "Functions->File I/O->Advanced File Functions" includes some string 20 path conversion function
s.
7. "Functions->Advanced->Data Manipulation" includes functions which allow you to change the interpretation of the data, for example they can extract bytes from words, or treat the byte array as a long string and so on.

Good luck.

Oleg Chutko.
5.
0 Kudos
Message 2 of 8
(3,647 Views)
Note NI can (and often has) changed the way data is represented internally. If you decide to bit-bang things yourself to do complex conversions you'll need be sure to check that your conversions work whenever you upgrade LV.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 8
(3,647 Views)
Mike:
What data types have you seen a problem with? The only time I've done bit manipulations have been on intergers (signed or unsigned), and I haven't had a problem through 8 years of LabView upgrades.
0 Kudos
Message 4 of 8
(3,647 Views)
Hi,

I also never noticed any change. Beside that, the conversion functions have
'old' verions after upgrading a VI (e.g. the type cast will have a red 4
over it after upgrading to 5). This is also true for the flatten to string
function, and other functions.

Regards,

Wiebe.


"Al S" wrote in message
news:50650000000500000086E40000-1042324653000@exchange.ni.com...
> Mike:
> What data types have you seen a problem with? The only time I've done
> bit manipulations have been on intergers (signed or unsigned), and I
> haven't had a problem through 8 years of LabView upgrades.
0 Kudos
Message 5 of 8
(3,647 Views)
Hi again,
read this article
Handling Different LabVIEW Data Types



Good luck.

Oleg Chutko.
0 Kudos
Message 6 of 8
(3,647 Views)
The problems appeared in complex datatypes like arrays of clusters of arrays--that sort of thing.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 8
(3,647 Views)
Typecast, Flatten, Unflatten, Read File and Write File have all the option to manipulate 4.x data. The only difference between 4.x data and higher version is how the booleans are packed. In 4.x booleans arrays are bit packed 8 booleans/byte; in 5.0 and higher, booleans are byte packed 1 boolean/byte. So if you manipulate flattened data or file data that has been written in 4.x format, you must recover it checking the 4.x option of the nodes.
For example, an array of 80 booleans written on disk in 4.x as [length U32]+ 10 bytes. In >=5.0 it is [length U32]+80 bytes.


LabVIEW, C'est LabVIEW

0 Kudos
Message 8 of 8
(3,647 Views)