07-30-2017 09:17 PM
I am using Write Waveforms to File (1D).vi to write some data to a binary file. This uses the vi Write WDT Array Dlog File+.vi, which in turn seems to write using the Write Datalog file. How can I read that binary file in some other format, eg. MATLAB without having to first convert to an ASCII?
07-31-2017 01:30 AM
Hi James,
you need to parse this file format using those other tools…
Datalog files use a lot NI-internal data structures to write additional information on your datatypes into the datalogs. Datalog files are also "unsafe" as NI might change the way datatypes are organized and so a newer LabVIEW version might have problems to read Datalogs from an older LabVIEW version (this has happened before several years ago)…
In your case you store not only t0, dt and your sample data, but also information about the waveform datatype (how many elements in this "cluster", how many elements in the samples array, any additional information stored in the variant and its attributes)!
So I see two options:
- Write a parser in MATLAB to filter only the relevant parts of your datalog files.
- Use a different way to store waveforms in LabVIEW, I recommend to use TDMS files! TDMS is way more "open" to be read from other (programming) tools!