LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read very large csv File

I am a new fish for the Labview...

 

I made a DAQ acquisition system. And sampling rate is 100k samples per seconds, I captured 60 seconds..

And the CSV file is too big to read it back into the labview(Memory is full).

 

How to read a very big csv file in labview(alomost 350MB)?

 

Thanks Guys!

0 Kudos
Message 1 of 7
(4,155 Views)

Hi,
you can

use the offset and length to read a part of your large file : then you divide your laarge csv in several small csv which can be opened with LabVIEW...

Best Regards,

V-F
0 Kudos
Message 2 of 7
(4,150 Views)

Thanks for your reply,

 

I want to plot the csv in the labview using the waveformgraph.

Is there a specific vi can set the offset and length?

0 Kudos
Message 3 of 7
(4,146 Views)

How are you reading your csv file?

 

did you try using the Read Text File function and Set File Position function? you will have to set the number of characters to read in the count input for Read Text File. You can set the offset in Set File Position

 

 

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 4 of 7
(4,141 Views)

I'm using the read drom spreadsheet file function..

0 Kudos
Message 5 of 7
(4,136 Views)

Several points:

 

a) a file of 300+MB IS readable in one piece, if you make sure that your application creates no or a very limited number of copies of that data. I would expect your application to create more than one copy of that data. Improving code for performance could solve the issue (maybe unlikely).

b) Obviously, you are running LV 32bit on a 32bit OS. You can swap to 64bit OS and use LV 64bit. This should solve the issue (still, code might be unclean).

c) "Read from Spreadsheet" reads by default the whole file at once. You can use the input "max characters/row' (optional input) to limit the number of values to be read. You of course have to iterate on the function and move the "start of read offset" (also optional input) to the next junk to read.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 7
(4,128 Views)

As Norbert said, it is possible to read large files.

 

Read from Spreadsheet File brings the file in as a string and then converts it to a numeric array.  As a consequence it makes several copies of the data.  That, and the way it handles errors makes it less suitable in my opinion for use with large arrays or in robust applications.

 

If you are going to read in chunks anyway, go to the low level file and string to number conversion functions and control your data copies yourself.

 

Lynn

0 Kudos
Message 7 of 7
(4,102 Views)