LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extremely large files

Smiley Happy
Hello, guys, how do you save and read extremely large files (e.g. >10 million data points), without overusing the physical memory and slowing down the program? Currently I'm using "write to/read binary file" but only below 5 million data points it works well.
 
Thank you very much.
 
best
Camu
0 Kudos
Message 1 of 20
(4,842 Views)
What happens if it "doesn't work well"?
 
10 million data points are not that much....
 
What is the datatype of your data (U8, extended precision complex, etc.).
 
What is your OS? Can you show us some code?
0 Kudos
Message 2 of 20
(4,841 Views)
altenbach



What happens if it "doesn't work well"? 
 
10 million data points are not that much....
 
What is the datatype of your data (U8, extended precision complex, etc.).
 
What is your OS? Can you show us some code?
 
 
Hi, Altenbach, the memory will corrupt when i'm trying to read a binary file containing more than about 5 million DB data points (time information in ps) to build a histogram. I'm using Labview 8.2 on a computer with Xp and a 2GB memory.
thank you for answering.
 
best
Camu
Download All
0 Kudos
Message 3 of 20
(4,835 Views)
This is not a reliable way to store binary data, use the LabVIEW binary VIs instead.

Or even better go for TDMS.
As Altenbach has mentioned 10 Million points isn't that much.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 20
(4,820 Views)
Please provide more information on how you do things (saving, histogram, etc). Do you use express VIs?
 
The attached (downconverted from 8.5.1, I hope it still works ;)) generates 10M random DBL date in the range of 0..100 and then calculates a simple hinstogram.
  1. Directly
  2. After saving to a binary file and reading it back.

I always get matching results.

0 Kudos
Message 5 of 20
(4,817 Views)


TonP wrote:
This is not a reliable way to store binary data...

Did you actually figure out what "this" is here? 😄
0 Kudos
Message 6 of 20
(4,809 Views)


@altenbach wrote:
Did you actually figure out what "this" is here? 😄


Me or Camu?
Anyway, using the Get characters from string for this function isn't right I believe honestly.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 7 of 20
(4,805 Views)

HI, Altenbach, Thanks very much for providing this example.

It works really well. However, when I want to generate more DBL data (20M), then the computer slows quite a bit down and the memory almost corrupt (the computer I'm running the example vi has only 1GB memory). I think there is a limit for indexing at a for loop.

I will attach the details of my programs quite soon.

best

camu

0 Kudos
Message 8 of 20
(4,801 Views)


@TonP wrote:


@altenbach wrote:
Did you actually figure out what "this" is here? 😄

Me or Camu?
Anyway, using the Get characters from string for this function isn't right I believe honestly.

LOL, I meant you. I must be blind then, because all I could see in the question was "Currently I'm using "write to/read binary file" ".

Where did you see the use of "Get characters from string "?

0 Kudos
Message 9 of 20
(4,790 Views)
I openend up the Read routine  and it uses the 'Read Characters from file' routine which get typecasted. This is IMHO a very unreliable way to read binary data.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 10 of 20
(4,787 Views)