DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Editing large text (*.CSV) files

I inadvertently created a 3.5Gb file with data using the Write Characters to File.vi and giving it a *.csv extension.  I have seen some info on the forums dealing with files this large but noticed that they point to Open G for the most part.  I was wondering if someone knew how to quickly divide this file up possibly using the DOS "TYPE" command with echo turned off?  This seems to open the file but echoing to the screen takes a really long time.  I tried downloading other text editors with not much luck, EditPad Pro 6 (2GB), and UltraEdit which I forced closed after 10mins.
 
The wild thing is LabVIEW let me create this large file but an't edit itSmiley Very Happy
 
The data format is as follows:
 
1, 21, 2, 9, 16.865280
2, 21, 2, 10, 16.834560
.
.
.
 
Regards,
 
-SS
 
 


Message Edited by ShotSimon on 08-11-2008 12:09 PM


0 Kudos
Message 1 of 4
(3,607 Views)
Sorry wrong forum.  -SS


0 Kudos
Message 2 of 4
(3,602 Views)

Hi SS,

My recommendation is to immediately convert that 3.5 GB ASCII file into a binary file.  You could do this in LabVIEW by reading 1000 lines at a time in a loop and appending the parsed block of values to the end of a TDMS file with the TDMS Write.vi.  You probably won't be able to load all the values from that file into RAM, so that's why I suggest you load the data buffer by buffer fromt he ASCII file and convert each data block from ASCII into binary.  A binary file should be smaller and will load MUCH faster into all possible environments (LV, DIAdem, Excel), but still you probably won't be able to load the whole data file into RAM.  So you'll need to either process/graph the data in batches, or you'll need to condense each set of N values into one representative value (average) or perhaps two representative values (min and max).  This is what DIAdem calls loading with data reduction, and it effectively results in a downsampling of your data set to reduce its size.  If you acquired your data 5 times faster than you strictly speaking needed to, say, then condensing N values into 1 would result in no loss of information but would enable LV or DIAdem to load the roughly 700 MB of resulting downsampled data into RAM.  You could even do this in your ASCII to binary conversion loop to create a much smaller binary file right away.

DIAdem offers serveral methods for dealing with large data sets, but no application is going to deal well with 3.5 GB of ASCII data.  Let us know if you're interested in exploring any fo the DIAdem options.

Brad Turpin
DIAdem Product Support Engineer
National Instruemnts

0 Kudos
Message 3 of 4
(3,588 Views)

Brad,

Thanks for the reply, sorry I accidentally posted to the DIAdem forum instead of LabVIEW.  Turns out that LabVIEW can create a 3.5GB file just fine.  Also I was able to break it down into 1MB chunks using code from this reposted thread.  So the short answer is it's probably not good practice but LabVIEW can do it depending on your system resources and which file handlers you use.

Regards,

-SS

 



0 Kudos
Message 4 of 4
(3,584 Views)