Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert Waveform format to binary files read by MatLab?

For various customers I am required to provide either ASCII files of 2-channel waveform captures or binary files of the same. My ASCII configuration works fine, but converting waveform format data to binary has been unsucceful during readback in MatLab either in-house or at the customers site. Is there a specific technique for feeding a waveform data stream into a binary file and knowing the exact format of that file?
0 Kudos
Message 1 of 6
(4,168 Views)
Hi Andy,

By wiring the output of a waveform directly into the Write File.vi, the format will by default by binary. You can extract out each piece of the waveform using Get Waveform Components.vi and then writing each of those components into the file in binary format. However, you will need to find out the format of the binary file that Matlab is expecting.

I have attached a simple VI to demonstrate what I have suggested above.

Thanks and best of luck!

Kileen C.
Applications Engineer
National Instruments
Message 2 of 6
(4,168 Views)
Kileen-
Thank you for the help. Unfortunately, I am running LV 7.0 not 7.1. The upshot is - I can't open your file! Would you 'dumb' it down to 7.0 for me?

Andy
0 Kudos
Message 3 of 6
(4,168 Views)
Hey Andy,

Sorry about that! New VI library is attached. 😃

Kileen C.
Applications Engineer
National Instruments
Message 4 of 6
(4,168 Views)
Kileen-
I hate to be a pain, but the VI's are still in v7.1. I get:

"LabView load error code 9: VI version (7.1) is newer than LABVIEW version (7.0)."

Something I'm doing?

Andy
0 Kudos
Message 5 of 6
(4,168 Views)
Hey Andy,

Alright, we should be good now! Let me know if this still doesn't work.

Kileen C.
Applications Engineer
National Instruments
Message 6 of 6
(4,168 Views)