Hi, I have created a datalog file containing string i/p and having extension ".exl". File size is around 50 MB. When I read this file using LabVIEW, it takes 1/2 hour to display data in Array. How can I minimize this read time in LabVIEW. Or is there any options available to create large datalog files with string i/p and read it fast?
Do you need to display all of the array (50MB worth of data) in the front panel? You can monitor your VI's performance by going to Tools -> Advanced -> Profile VIs and see where it is spending the most time. It would be helpful if you could post your VI that reads your datalog file.
Thanks and have a great day! Shakhina Pulatova Applications Engineer National Instruments
To read large files, use File Open, File Read, File Close vi. Open file for read (the vi should return the file size), next, inside either a while loop or for loop, read the file continuously, every time read a certain number of bytes, last, when finish reading all the data, close the file.
Yes, the lower level VIs are faster (Read From Spreadsheet VI eventually calls Read File anyways). You can get an idea from the shipping examples Write to Text File.vi and Read from Text File.vi (just ignore the graph and timestamp parts).
Good luck! Shakhina P. Applications Engineer National Instruments
What kind of file is it? If you are writing datalog files, there is no reason for giving them excel (.xls) extensions. Excel cannot read datalog files. The other way around, native excel files cannot directly be read by Labview. In general terms this is what you may look into: -use a compact file format like (real)datalog, fully binary or at worst plain ascii text file. -you do not have to read the whole file into memory at once, depending on your application. -look at your (RAM) memory space: it sounds like you are running very low on memory and the OS needs to pagefile most of it. Try closing all unnecesary programs and/or buy more memory. Also look for memory hogging inside your code: releasing data that is no longer needed will free memory used by labview. "Uninitialized" arrays for example may seriously slow down a computer.
Correct me if I'm wrong, but I think you are misusing the term "datalog file". A datalog file is a LabVIEW file type, with binary contents. It is NOT an Excel file, regardless of what extension you give it. I can open a 20 Meg Datalog file and display a 13000-sample graph from it in about 3 seconds. You need to clarify what you want to do.
Steve Bird Culverson Software - Elegant software that is a pleasure to use. Culverson.com
If you are reading in a 50MB text file, you need to seriously rethink how you are storing and displaying your data. I would recommend the tutorial found here (search for "large data labview" in the main ni.com search bar if the link doesn't work). I would also strongly urge you to use a binary solution.