LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read a spreadsheet file up to 140MB?

I can not  read a 141MB spreadsheet file  for my application. I got a LabVIEW message : Not enough memory .
How can I do ?
0 Kudos
Message 1 of 11
(3,779 Views)
How are you reading the file? How many points are in it? How is the file structured? What is your LabVIEW version? Did you write the file with a LabVIEW program?
 
0 Kudos
Message 2 of 11
(3,778 Views)
Additionally: What are your computer specs? How much RAM? What else have you got running?

Questions, questions.
0 Kudos
Message 3 of 11
(3,752 Views)
I am reading my file with readspreadsheet file.vi LabVIEW 8.0. The file was created by LabVIEW 8.0, too (using write to spreadsheetfile.vi).
It includes 1500 rows, each row has 10,000 points. I attach my LabVIEW program.  I have tried it again and  number of rows =800 : it 's OK!!
 
0 Kudos
Message 4 of 11
(3,730 Views)
OK, you need to change your coding habits!
  • First, get rid of that stacked sequence.
  • In the loop in frame 4 you create way too many data copies and you spin the loop every nanosecond. Use an event structure and spin the loop only of one of the three controls has changed.
  • That "times 1" on top creates a new data copy of the 2D array. Delete it!
  • The three "index array" nodes can be combined into a single one with three outputs. Just resize it.
  • Don't do all this bunding and escalating to complex data structures. Make a plain 2D array with three rows and feed it directly to the graph. Set x0 and dx via a property node ONCE.
  • Use a state machine architecture.
  • ...
0 Kudos
Message 5 of 11
(3,725 Views)
OK. I really have little experiences doing with event structure. Your guidance is helpful. I am trying to improve my program.
0 Kudos
Message 6 of 11
(3,702 Views)
Here's a quick draft I made a few days ago. It's not fully tested, so you might have to adjust some things.
 
Can you show us a few lines of the spreadsheet file? How many significant digits do you have? Maybe SGL would be sufficent for the data?
 
A couple things should be changed. Currently, the program is linear, but it should be a state machine that allows reading new files and saving the current data without having to stop the program.
0 Kudos
Message 7 of 11
(3,670 Views)

I have just tried my file (140MB) with your modified VI you sent me. it works well. Of course it takes more than 10 minutes to finish processing the file.

I used format %.3f when writing file.

I attach the VI that I used to create my file. I also attached the file (30MB) but in vain maybe due to too big file.

Thank you very much for your help.

0 Kudos
Message 8 of 11
(3,644 Views)
0 Kudos
Message 9 of 11
(3,643 Views)
Well, your exclusively dealing with I32 integers (Actually, if your data is typical, all you need is I16! (4x less memory than your DBL). Now, if you would use a binary file, the file would be much smaller and reading it would be much, much faster!
Even if you want a spreadsheet file, you should stich with integers (use "array to spreasdheet string" with the desired type and write a plain text file and vice versa for reading).
 
The same coding rules I showed in my other attachment apply here too. You use way too many locals and sequences. None are needed!
 
Also many things can be dramatically simplified. For example look at your inner while loop. The entire thing can be replaced by essentially an atomic operation!
 See if it makes sense! 🙂
 
(for my alternative, I am using I16. Modify as needed).
 
 
 


Message Edited by altenbach on 04-17-2008 07:35 PM
Download All
0 Kudos
Message 10 of 11
(3,639 Views)