LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data read error around 2GB Binary File

Hi all,

I am using labview 8.6 and I have been reading around the forums trying to find a solution to why my vi is reading in bad data. I have a raw binary video file that can get quite large (I16 data type), upwards of 7 GB as we are running 500 frames per second. The issue is that when I try to read this file in, around 2GB (position varies from 1.8GB - 1.9GB) I get a few bad frames that look like garbage data, lines of black and white pixels are the output of the video file. I have tried loading this video file into a program written in C and it works fine, there are no actual bad frames. So it must be an issue with labview.

 

After the couple of bad frames the data picks up again and runs fine for the rest of the video. Problem is that those couple of bad frames are in random locations within that readin range and it throws off my centroid tracking. I have included a snap shot of the method I am using to read in the data. About every 1000th frame (~30MB) I refill the buffer using this subVI.

 

Let me know if you need anymore info, thanks for any help guys!

 

Joe

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

There may be a mix of Gibi(2^30) and Giga(10^9) bytes.  Since your binary file is made of I16, each count takes 2 bytes.  2GB = 1.86GiB, which falls in your range of issues.  The overflow of an I32 is around this range too.  Not sure how LabVIEW handles file offsets, maybe this will give someone else an idea.


--Using LV8.2, 8.6, 2009, 2012--
0 Kudos
Message 2 of 3
(2,478 Views)

I was just reading the file again in an offline analysis program and apparently there are bad frames 😞 So it must be an artifact of how the data is being captured, I will have to look into that code as I didn't write it. Thanks for the advice though.

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