LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read file with size > 2Go : Pb

I'm using a loop with Read Vi to seek in the file. It works well, But When my file is greater than 2 GB, I got a memory error (mémoire insuffisante pour terminer l'opération) when I try to read for example 263000 singles data.

This error appears when I want to read my 263000 values (not when seeking).
I don't understand why, because it runs well with a file less than 2 Gb even if I want to read more values.

Please find attached the example vi. Choose a file and run it : if your file size is less than 2 Gb (but have enough datas (ex : file size 10 Mb), it's ok, but if you run it with a file size more than 2 Gb you have the memory error.

Help please ...
Eddy DUCHENE
12 F Chemin de Boutary
69300 CALUIRE ET CUIRE

educhene@laposte.net
0 Kudos
Message 1 of 2
(2,642 Views)
Hi Eddy,

There are all kinds of fun issues with files greater than 2 GB. The reason is that files greater than 2 GB can't be directly indexed by using a 32 bit integer (the largest integer type LabVIEW currently has). There are a number of solutions. If you are using an NTFS file system, you should be able to continue reading and writing sequentially as long as you don't wire anything up to the position inputs, however, this usually isn't really practical, since it gives you no random access, and accessing 2 GB of data sequentially is going to be kind of tiring.

Anyhow, the best solution to your problem would be to use a 64-bit file library. You can install one of these, the HWS library, from most newer versions of the Driver CD which ships with almost all NI products. For a detailed description of the issue and the possible solutions, check out this tutorial:

http://zone.ni.com/devzone/conceptd.nsf/webmain/6A56C174EABA7BBD86256E58005D9712

Regards,
Ryan K.
Message 2 of 2
(2,607 Views)