LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Byte stream conversion using variances

I'm reading data recoded on a Sun system (and running labView natively on the Sun... therefore no endian conversions are necessary). I'm using the "read characters from file" vi to accept data in the form of a string. I'd like to typecast the string as:

U8, U16, U8, U16, CHAR[24], CHAR[10], U32

Unflattening from a string (with a cluster as a data type) won't work because of the way labview stores data internally (See application note 154). How do I do this using variance vis?

Philip
0 Kudos
Message 1 of 3
(2,786 Views)
I don't think that variants will do what you want either. The only way I can think of is to extract the string subset (or split string) for each field and typecast it an item at a time.
Stu
0 Kudos
Message 2 of 3
(2,786 Views)
Hope that attached will do.
The key is to use combination of LabVIEW tools for complex non-LabVIEW structured data. There are several possibilities to work with such a data, depending on your style.
Sergey
0 Kudos
Message 3 of 3
(2,786 Views)