LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help converting a labview vi to python/matlab/c++ script

Hi,

 

I'm working with binary .DAT files produced from Labview Vis, however I'd like to import the files into python to continue data analysis. I have a labview VI (Data2Ascii004.vi, attached) that converts the .DAT file to an ASCii file, but I would really like to be able to interact directly with the .DAT files through python or other language - i've attached an example file that contains 4 channels of 20,000 datapoint-long sweeps x 30. 

 

I assume the information I need - how the binary file is contructed -  is present in the converting vi. But unfortunately, I have absolutley no experience with Labview and cannot work out how the .DAT file is being converted. I would appreciate it very much if someone could either point me in the correct direction, or take a look at the vi and let me know the steps the file is taking to convert the file, so I can implement them in python/matlab/c++.

 

Thank you,

 

Jonathan

Download All
0 Kudos
Message 1 of 4
(5,173 Views)
Why not just read the binary data directly. The format LabVIEW uses is well documented and easy to decode.

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 2 of 4
(5,141 Views)

@mikeporter wrote:
Why not just read the binary data directly. The format LabVIEW uses is well documented and easy to decode.

Um, that's exactly what the poster asked for help doing... " I would really like to be able to interact directly with the .DAT files through python or other language"

 

Unfortunately it appears that the software that creates the files uses the Datalog format. Others have asked on this forum for the format of those files, but it appears that NI considers it proprietary information and has not released a specification. You could attempt to reverse engineer it - according to the code, in this situation each datalog record corresponds to a cluster of a string and a 2D array, where the string contains some kind of timestamp - but that may be difficult, especially because of the variable size of the array.

0 Kudos
Message 3 of 4
(5,119 Views)
I thought the datalog format was the same as flattening the structure to a string. Yes that does change everything.

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 4 of 4
(5,108 Views)