LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Memory is full

Solved!
Go to solution

The reason you have a variant is you forgot to wire the new datatype into the obtain queue function.

 

Wire up the constant, and now the queue is no longer the default datatype of variant, but the actual datatype you want and you won't need to use the Variant to Datatype function to turn it back into your data.

 

Message 11 of 19
(4,131 Views)

Hi Ravens Fan,

 

Thank you so much for your help.

By your guidence, I have resolved most of the big issues with the code.

 

I have few things left to fix yet that I have to ask but not right now.

Your guide lines made huge difference in the performance of this code, and I really appreciated your time and generosity,

 

 

 

Best Regards,

Shaheen.

Message 12 of 19
(4,110 Views)

Hi I was wondering if someone could help me with a similar problem. I've attached the VI's to this post. I'm currently running Labview 10, 64bit with 8GB RAM on windows 7. Randomly I get a Labview memory full error make big 2d array, (this filename is one of the Vi's attached that it  must be referencing form the main vi textcontrol.vi

 

. I don't really know why it occurs since it comes in burst when running long experimental measurements for time vs. current and  voltage.

 

The VI I'm running is text control, if anyone can look at it as it's an inherited VI and point out the problem it would really be helpful

 

Sincerely

kal

 

0 Kudos
Message 13 of 19
(3,871 Views)

kal,

 

You would probably be better off starting a new thread.  When an old one is marked as solved, many people do not pay much attention to it. Also your problem is likely quite different other than getting the same error message.

 

How much data do you get every time you call the Output or Transfer VIs? There is a lot of memory reallocation going on in there with the way the arrays are (mis)handled. Arrays in LabVIEW must be in contiguous memory locations so growing and combining arrays can quickly fragment memory.  Even though you may have large amounts of memory if there is not a contiguous space large enough for the next allocation you will get the error.

 

Use the Show Buffer Allocations tool from Tools >> Profile to help see where allocations occur.  In the Download VI there are 7 large allocations for strings and arrays.  That VI is called 5 times in Transfer which may make its own copies of the 5 arrays. Then Big Array adds its copies and allocations.

 

Lynn

Message 14 of 19
(3,860 Views)

@johnsold wrote:

There is a lot of memory reallocation going on in there with the way the arrays are (mis)handled.


There is some real Rube Goldberg code in there:

 

  • You stack three to five "insert into array", starting with an empty array. That entire thing could be replaced by a singe "build array" node.
  • Your 1D-2D array cold be acieved by a simple "reshape array". Even if you want a FOR loop autoindexing would be much better than building in a shift regsiter.
  • That small while loop in the upper left, is a simple spreadsheet string to array with "space" as delimiter and a 1D array of strings as type.
  • lost and lots of duplicate code.
  • ...

Overall, you are constantly slicing, dicing, and building arrays. That's not good in general. Still, I don't see where most of the memory is consumed without knowing the data sizes. Can you do some profiling?

0 Kudos
Message 15 of 19
(3,853 Views)

Hi

 

Sorry wasn't too clear on how to make a new post, also this was a pre-written VI, so I don't know to much about it and I don't have any labview programming exp. I checked the buffer allocations as suggested and boxes for array and clusters is checked. Also each file that is saved transfer is 13K and sample is 15K. I'm not too sure if that was what you were asking.

 

I re-ran program yesterday and it worked for no apparent reason, but I agree its badly written and failure can occur again at any time wasting valuable experiment time, so any help is really welcomed.

 

Thanks

kal

 

0 Kudos
Message 16 of 19
(3,827 Views)
0 Kudos
Message 17 of 19
(3,820 Views)

Hi Kal,

 

I started this thread but marked as solved after my issue was fixed. I can propose the solution I found.

In you mentioned vi, I see "write" in the loop, I recommend you add another loop to this vi and shift this "write" to the new loop that

way your collected data will be written by the newly created loop. In other words, the data will be prcessed in parallel meaning it will

be collected by one loop and written by another loop. I am confident that this will resolve you issue as it did mine.

 

Let me know if it works and refer me to the new thread if you create.

 

 

Good Luck,

Shaheen.

0 Kudos
Message 18 of 19
(3,810 Views)

Thanks will see what happens

 

 

0 Kudos
Message 19 of 19
(3,786 Views)