LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

not enough memory to plot wav. file

Hello....
 
I'm new in LabVIEW and i'm try do a simple v.i. that reads a wav. file and plots it also makes spectrum analyze.
Because the wav. that i use is ultrasound with a sampling freq. 250KHz,1channel,16bits when i open a 9 second file the V.I. plots it; but when i open an 1 minute duration file i get the "not enought memory" error.
 
My system is a laptop pc with 2gb ram.
I attach the V.I.
 
Do anyone know how can i make this work?
 
Thnks
0 Kudos
Message 1 of 13
(5,056 Views)
If I did my math right (not sure with this new calculator that I just got) that comes out to 444MBytes of RAM required. That's 444MB of contiguous memory. My guess is that you don't have a contiguous chunk that big. What's the longest length that you can read? Try shutting down extraneous programs.
0 Kudos
Message 2 of 13
(5,050 Views)
Thnks for the interest.....
 
I had read many tutorials that they say that LabVIEW needs contiguous memory but i was wondering if there is any solution.
With this V.I. when i close all the programs i manage to read and the 1 minute file but the proplem comes when i want to plot bigger files.
I want to make it atleast to plot 6 minutes files.
 
Also this is a part of one project that will records,analyzes and plays those files with the DAQ 6062E hardware.
I allready manage to modified the standard LabVIEW V.I.'s and make one  that can plays a 6 minutes file but this works only for the playback.
Now for the analyzing the waveform graph does not like the files.
 
Please don't tell me that is an unsolve problem.... 😞
 
I attach the V.I. of playback.
0 Kudos
Message 3 of 13
(5,041 Views)
Can you calculate and plot the envelope of the signal at lower sample rate first (so you can plot all signal in full), and then plot the signal at the full sample rate only in the range that is of interest to you.
 
Your screen/printer resolution will not be able to distinguish points at your full sample rate anyway.
 
Ian 
0 Kudos
Message 4 of 13
(5,034 Views)

I allready thought about that but the problem is that i need all the range because i have sound until 110 - 120KHz so this sample rate is the lower i can use without other problems from alliasing.

0 Kudos
Message 5 of 13
(5,028 Views)

I did not mean you should down-sample the signal.

Here is what you can do,

1) Pick 250 points,

2) Find max and min of these 250 points, append them to a Max Array and a Min Array.

3) Pick next 250 points

4) Repeat steps 2) and 3) until the end of the signal is reached.

5) plot out the Max and Min arrays at a sample rate of 1kHz, which is the envelop of your signal.

Hope this helps

 

Ian

 

 

0 Kudos
Message 6 of 13
(5,017 Views)
Ok....I will try this tomorrow because now is late here in Greece (30 minutes before midnight) and i hope it works...
 
Thank you for your answers and goodnight
0 Kudos
Message 7 of 13
(5,007 Views)
Hello again.....
I try the solution you gave me and i built this V.I. (see attachment)...........BUT........when i load a file it starts with a good speed to read it and fills the slider.After few thousands of samples it starts to become slow and i don't know why.The amound of ram that uses its the same and also the amount of proccesor.
 
If anybody can help i will be very happy.Thanks.
 
0 Kudos
Message 8 of 13
(4,966 Views)
oohhhh.....and one question that it comes now...How do you calculate the amount of ram that a file needs?For example 1000 samples of a sound file of 250000KHz s/r-16 bit depth?
0 Kudos
Message 9 of 13
(4,964 Views)
Hi,

I have similar problems when trying to keep a big amount of high frequency sampled data in memory and plot it. The enveloping method that was mentioned may help in my case so I will try it. Are there any built-in functions in labview to easily create an envelope like this?

Brgds
Terje Lundsten
0 Kudos
Message 10 of 13
(4,930 Views)