James
James

Reputation: 753

Read LabView binary of a 1D array of Waveform into MATLAB

I have a VI that uses the Write Waveforms to File (1D) vi to give me a binary file with my n channels of data (waveform of double). I couldn't find any settings in LabView about endian-ness or anything, though I think it's BE by default. I'd like to read this into MATLAB. I've been working on this for a day and haven't made much headway. Does anyone have any information about the header content of a default bin file or some suggestions of how to read the data?

Upvotes: 0

Views: 886

Answers (2)

nekomatic
nekomatic

Reputation: 6284

If you have the option of changing the LabVIEW code, a TDMS file would be the better format to use for this data. This is documented and there is example code for reading it in MATLAB.

If you can't change the format in which the data is written, have you tried the code in this question or this question and answers?

Upvotes: 0

MarcoM
MarcoM

Reputation: 1204

I don't have an answer right away, just a few considerations.

Write Waveforms to File (1D) is essentially saving into a Datalog file (just open the block diagram and you'll see).

So you question is more general and about data format of Datalog files.

National Instruments is warning us to "use datalog files to access and manipulate data only in LabVIEW"

In fact I could not find a clear format specification on Datalog file format, but only someone else asking.

Upvotes: 2

Related Questions