LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to determine a datalog file structure?

I have a file which is an old version, and I do not know the exact structure of the datalog file.  Is there a way in labview to look at the file, and determine the cluster structure, so that I can open it up?
 
Thanks,
Rob Hoffman
Message 1 of 6
(3,417 Views)

Do you know what are the things stored in the file, and corresponding data types. what is the size of file.

If the things are totally alien to you then it is almost impossible to find the format. else you can do some RnD by opening that file in notepad or in some hex editor.

If you are trying to write some tool to find the format of datalog file then i think its almost impossible.

 

i ll think on this, and after doing some experiments i will get back to you

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 2 of 6
(3,390 Views)

Do you know what are the things stored in the file, and corresponding data types. what is the size of file.

If the things are totally alien to you then it is almost impossible to find the format. else you can do some RnD by opening that file in notepad or in some hex editor.

If you are trying to write some tool to find the format of datalog file then i think its almost impossible.

 

i ll think on this, and after doing some experiments i will get back to you

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 3 of 6
(3,388 Views)

I knew enough of the structure to open up the file in NotePad and decipher some of it.  However, I am still very interested in trying to develop some sort of code to look at a log file that was created in labview, and determine the file structure.  Looking at the files, it seems like there is header information which stores the file format, then each entry of the log is written after that.  It would be very nice to have a way to decode that header without prior knowledge of the structure.


Thanks!

Rob

0 Kudos
Message 4 of 6
(3,376 Views)
hi there,
 
if you write a cluster to a file the number of bytes written are exactly the sum of the bytes of all elements, so there is no extra information about the data format written to the file, just the pure data. so, if there are 8 bytes in the file you can't get any information that these are 2 DWORDs, 4 WORDs or 8 BYTEs. same thing for other types. and think of dynamic data types like arrays or strings!
 
so if there's no extra information about the files structure i think it is in general impossible to rebuild the structure of the cluster just from the data, except the cases where you have just luck.
 
 
 
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 5 of 6
(3,368 Views)
You could try to peek in the datalog file to identify where is stored the datatype of the stored data. Once you have identified it, format the data type into an array of I16 and use the VI located at \project\_NewProbeWizard.llb\Get Contorl Form Type Descriptor.vi [sic]  (*** Warning: this VI could crash LabVIEW if you input an ill-formed Type Descriptor.***)
This VI will create a new control on the front panel of the referred VI of the same type as the one in the datalog file.


LabVIEW, C'est LabVIEW

0 Kudos
Message 6 of 6
(3,357 Views)