Faraclas wrote:
> Thanks rolfk, I will do the reading. But just to make sure you don't misunderstand
> me, everything works beautifully in LabVIEW.
I gathered that. But reading through the description gave me the
impression that a few conversions/typecasts may actually be superfluous
without any change to the actual data.
> The problem I am having is trying to open up these files in C++. This system has
> been around for a couple of years now, so I cannot change the data structure in
> the LabVIEW programs (well I could but I don't want to because it is really a very
> flexible system that works well).
Well, it really isn't that difficult, it just won't be a one hour job
for sure. A few guidelines:
1) LabVIEW flattened data contains the actual data as is for all fixed
size elements (scalars and clusters of scalars). Any variable sized data
(strings, arrays) is prepended with an int32 for each dimension
containing the number of elements for that dimension.
2) LabVIEW flattened data is always in Big Endian (Most significant Byte
first) format. This means for normal C(++) programs developed on an x86
system you will have to byteswap every single 16 bit and 32 bit integer.
3) LabVIEW Typecast really is similar to Flattened data but no
prepending of the number of elements is done for variable sized data.
And Typecast can't convert any type containing variable sized data, but
any arbitrary complex datatype only containing fixed size data, or a
simple array or string can be typecasted.
Rolf Kalbermatter