LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read binary file

Can LabVIEW only read the binary file written by LabVIEW??

 Actually I am trying to read a binary file written by a C++ program and it gives error of truncated data. May be that's because there is no data size information at the beginning. (which I think is appended by Write Binary File VI in LabVIEW).

 

Regards

0 Kudos
Message 1 of 3
(2,186 Views)

You can read any kind of binary file with LabVIEW, but you need to know the structure of the file (data type, byte order (little endian vs. big endian) etc.).

 

Can you tell us a bit more what the file contains? Can you attach a small file sample?

0 Kudos
Message 2 of 3
(2,174 Views)

Alann wrote:

Can LabVIEW only read the binary file written by LabVIEW??


 

I saw this issue a little while ago, when someone was trying to transfer binary data between LabVIEW and Matlab.
The issue (as Altenbach suggested) ended up being the endianness. Check if c++ writes/reads using little endian or big endian.

LabVIEW has a function to convert back and forth between little and big

 

Message Edited by Cory K on 12-01-2008 12:16 PM
Cory K
0 Kudos
Message 3 of 3
(2,127 Views)