05-25-2011 10:32 AM
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
05-26-2011 05:10 PM
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?
06-01-2011 06:33 AM
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