Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Memory is full

The attached picture shows a vi that build a waveform for the analog out module of a compact daq.  LabVIEW pin the problem at the for loop that generate the time array in the build WF case.  It is saying that memory is full.  Do you know what's wrong?  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 7
(3,671 Views)

Maybe memory is full! I don't know much about Labview, but since you're building an array perhaps you really have exhausted memory. It's possible that the way you're building it is fragmenting memory, which would result in filling memory earlier than you might think it should happen.

 

Have you checked the VI Memory Usage topic as suggested in the alert?

John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 2 of 7
(3,662 Views)

Any suggestions?

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 7
(3,645 Views)

Did you check the VI Memory Usage topic as suggested in the alert?

John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 4 of 7
(3,642 Views)

Thanks for trying to help, and I have gone through that.  I need specific tips.  Specified things to look for.  I had attached a snap shot of my code in the previous code. 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 5 of 7
(3,636 Views)

As I said, I know just about nothing about Labview, but no one else has answered...

 

First, how big is the array you're trying to make? If it is gigantic, it might be that it is simply too big to fit in memory.

 

Second, even if it should theoretically fit in memory, it may not fit if memory is fragmented. A new memory allocation must by contiguous- it has to be allocated in one piece.

 

I can't really tell what's happening in that picture. But if you're slowly building an array inside a loop, it is highly likely that memory is fragmented. If the array has to be grown every time through the loop, then the memory has to re-allocated. Since the new size is too big for the old memory location, it will allocate an entirely new block of memory. After a while you can get quite a few empty blocks of memory too small to be used, but still taking space in your address space.

 

The solution would be to compute the eventual size of the array and allocate it in one step. Then run the loop to fill the array.

John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 6 of 7
(3,633 Views)

Hi jyang,

 

I'm not sure if this is your problem, but I have seem this error before when passing empty arrays to some LabVIEW primitives, like your exp and cos there.  I would debug the VI to make sure you don't have any unexpected empty arrays.  I couldn't reproduce the error with a simple copy of your code, but I didn't do all of the DAQ stuff.

------
Zach Hindes
NI R&D
Message 7 of 7
(3,606 Views)