LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the maximum size the of files we can use for reading and writing

Hi
i have attached a vi which i use to read and write reports.

My system would run continuosly for more than 2 days, typically i expect a file size of 30MB per day. I keep on appending the data in the file.
The VI everytime opens the file appends it and closes.

Does this affect the performance as the file size increases?
What is the effective way to do it?
Is there any file size restriction in windows?
0 Kudos
Message 1 of 4
(2,854 Views)
First: The performance by increasing file size depends from the file system (FAT32 or NTFS) you are using. NTFS will be better if the file size increases. Also the size of the partition will have an effect on this.

Second: The effective way will be not to close and reopen the file. Use "File I/O > Advanced File Functions > Flush File" to write the file to the system instead of File Close and File Open. Flush File will force the file system driver to write the file to disk and update the file information on disk. On NT based systems this will be done with a latency time of 4 seconds. This is even true if you close the file and the time cannot be changed.

Third: There are file restriction to the lenght which do not depend on Windows, they depend on
the file system. FAT32 can handle files until 4 GByte (2^32) and NTFS can handle 2^64 Bytes. Since LV is platform independent the LV file functions can handle only 4 GByte. The offset parameter in the file functions has a I32 data type.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 2 of 4
(2,854 Views)
Dear Sir,

I Thank you for the valuable suggesstion.

I have one more clarification, in using the flush file.
1. How do you send in the data to write in flush file.
2. Do we need to open the file using open file.vi to
generate and close it after the operation. In that
case how does it very from my attached vi.
0 Kudos
Message 3 of 4
(2,854 Views)
I cannot see your attached VI but I can clarify the sequence.
After your application started you use the following sequence:
Open File, Write File, Flush File, Write File, Flush File .... Close File.
Then you can stop your application.
Flush File does not accept any data it forces only to put previously written data and file information to disk. The runtime librarys and file system drivers have buffer to minimize the access to the disk so data written to a file will not be necessarily written to disk. Closeing a file forces this and releases the file. Flush file does the same but do not release the file. You avoid all the overhead which is done during the open of a file especially checking the access rights.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 4 of 4
(2,854 Views)