LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read binary files, saved by Labview as complex waveform data, into Matlab

We recently purchase the NI record and playback system. The system saves data to a binary file as complex waveform data. Does anyone know how to read these files out in Matlab, and or what the format is? I know that the basic waveform data is t0,dt,Y,attributes, but how many bytes does each one take up?

 

Thanks

0 Kudos
Message 1 of 3
(3,769 Views)

Hello,

 

As for reading those files back, we will need to know how you are saving them. Are you using the RF Record and Playback Reference Application? In this application, it explains how it builds the binary file in the notes for the example as well as the Developerzone called Introduction to RF Record and Playback. Are you using this application? If not could you state what VIs you are using and some more information about how you are saving the data?

 

 


Jim St
National Instruments
RF Product Support Engineer
0 Kudos
Message 2 of 3
(3,746 Views)

Jim,

 

Thank you for the reply. I think that I am all set. I am using a "write to binary file" vi to write a "complex waveform" from a niRFSA Fetch IQ vi. After looking at the complex waveform more closely, and documentation on timestamps, and attributes, I wrote some Matlab code that seems to work. It looks something like this (below).

 

Thanks again.

 

% My undestanding of the Labview complex waveform data is as follows:
%
% U64 - Fractional part of seconds since 12:00 am, Friday Jan 1, 1904 UT
% U64 - Seconds since 12:00 am, Friday Jan 1, 1904 UT
% float64 - delta t 64 bits
% int32 - array size (this might be an un-signed?)
% float64 - Y real (element 1)   % A
% float64 - Y imag (element 1) % R
% float64 - Y real (element 2)   % R
% float64 - Y imag (element 2) % A
% float64 - Y real (element n)   % Y
% float64 - Y imag (element n) %
% uint32 - attributes 4 bytes, handle to an internal labview data struct

0 Kudos
Message 3 of 3
(3,737 Views)