LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I read from a file longer than 2.14 GB?

Hello,
 
I would like to use Labview to process a file which is longer than 10 GB.   In particular, I have tried to put a READ FILE vi in a loop and step through the long file reading short sections as I go.  This has failed because all of the file I/O VIs accept I32 cables and as a result, I can never read from a file position greater than 2147483647 bytes.  Is there a way to surpass this limit? 
 
Possibly useful info:  the files were written by Labview; the data is I16 format;  everything works fine up to this 2147483647 byte limit.
 
Thanks in advance for any advice.
Cheers,
Woodrow
0 Kudos
Message 1 of 7
(3,362 Views)
Hello,

Let me point you to OpenG, one of the LLB is LargeFile and it provides many functions that would certainly help you, find attached the "LargeFile Read.vi" just as an example of what it brings.

Hope this helps 😉

BTW, I think many veterans here use OpenG, so it may be worth to ask if somebody uses the OpenG LargeFile functions ; personnaly I have this LLB installed but I have never used it yet.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 7
(3,360 Views)
Hi Woodrow,
 
You may have to follow TiTou's advice.  Although I have never used it, I remember reading about it being a solution.  >>Thanks TiTou<<
The limitation is actually because of Windows.  There is a limit to the file size, ~2 or 4 GB. 
 
JLV
Message 3 of 7
(3,348 Views)
Thanks for the advice.
 
It turns out there is a relatively simple solution:  As long as I never point the read vi to a specific position in the file (i.e. specifying a numerical value at the  OFFSET POS terminal), Labview will happily read a file with indefinite length.  I simply put the read vi in a loop with the POS MODE terminal wired to "current postion".  The loop may be stopped with user defined parameters (knowledge of file to be read) instead of an EOF recognised by Labview.
 
Cheers,
Woodrow
Message 4 of 7
(3,340 Views)

Hi Woodrow,

Yes, of course the offset..  🙂

Thanks for sharing!

JLV

Message 5 of 7
(3,329 Views)
If you would like more information and example code, check out Managing Large Data Sets in LabVIEW.  The end of the tutorial discusses accessing files over 2GBytes in size.  Note that another way to do it easily is upgrade to LV8 Smiley Wink, which supports 64-bit file access.
Message 6 of 7
(3,311 Views)


@DFGray wrote:
Note that another way to do it easily is upgrade to LV8 Smiley Wink, which supports 64-bit file access.


Very smooth ad 😉
Message 7 of 7
(3,300 Views)