LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read binary array from a file

I write a vi to read binary array  from a file, but it doesn't work. I upload my vi and hope someone can fix it, Thanks.
0 Kudos
Message 1 of 7
(3,920 Views)
Hi:

I couldn't see your VI since it's made in LabVIEW 8 and I work on LabVIEW 7. I've made a VI that generates and Array of Random Data and writes it to a file. Then the file just written is read and displayed. Hope it helps you.

Regards.

Robst



Robst - CLD

Using LabVIEW since version 7.0


Download All
0 Kudos
Message 2 of 7
(3,914 Views)
What kind of binary data do you have? If it is a 2D array if I32? How did you write it? (Can you attach that VI too?).
Can you attach a sample binary file and tell us what kind of data is in it?
 
Maybe the attached VI will do what you need? (LabVIEW 8.0)
 
(From the way you set the array indices, I am assuming you want the data in a 10x10 I32 array. Of course the array indices only determine what element is displayed in the upper left of the container, it is purely cosmetic and has nothing to do with the array content or array size).
0 Kudos
Message 3 of 7
(3,913 Views)

to Robst:

    Thanks, I have read your vi, and it works, but if I want to read three 3*2 array one time ,how to do it?

0 Kudos
Message 4 of 7
(3,901 Views)

to altenbach:

     Sorry I didn't give the detailed information. I want to read 14bit(U16) images(320*240) for a big file. Your vi works, but I want to use the data type and count parameter to determine the array size. I just don't know how to do it ,can you help me ?

0 Kudos
Message 5 of 7
(3,901 Views)


@trinight wrote:

I just don't know how to do it ,can you help me ?


As I said, please attach one of your binary files. 🙂

There is no universal standard for binary files, so we need to know the exact structure.

Do you know if the file contains array dimension information or is it just a flat binary representation of the image as 320*240*2 Bytes? Where do these binary files come from? (If you create them with LabVIEW, attach the VI for writing them.)

0 Kudos
Message 6 of 7
(3,884 Views)
hi, altenbach, I attach a data sample  from a big file. If I want to read 10 binary array with array size 3*2, and   I want to use the data type and count parameter to determine the array size, how to do it? The data came from a data grabber and has no array dimension information, just data. 
0 Kudos
Message 7 of 7
(3,864 Views)