LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW memory is full

Solved!
Go to solution

Hello GregFreman

 

Thanks for your concern, 

 

I am little confuse about your suggetion but what I suppose is if I would use a reference of array and propery node to pass a value of array in my loop  it would help with contigous memory issue. If yes than it is gonna be really useful to my application. 

 

Thanks once again. 

CLAD
Passionate for LabVIEW
0 Kudos
Message 11 of 20
(1,330 Views)

Thanks DF Gray,

 

This link is really useful to deal with memory issues. 

CLAD
Passionate for LabVIEW
0 Kudos
Message 12 of 20
(1,330 Views)

Hello ToeCutter, 

 

I have done exactly you did and now I believe this is proper way of displaying data to get your self saved from falling into  memory issue. 

CLAD
Passionate for LabVIEW
0 Kudos
Message 13 of 20
(1,325 Views)

@Now_With_Underscores wrote:
...
There's a way to show all memory copies (Tools»Advanced»Show Buffer Allocations) in LabVIEW... I recommend using that to see where the real memory shark is.

 

Hi,

I couldn't find this option, neither for Front Panel, nor for Block Diagram. I am facing the memory problems in my application, and came across this thread while looking for some solution.

 

I would try to define my SubVIs as "subroutine" priority. However, my problem is in fact the large arrays. One of them is with 1.5 million string elements, another 2D array with 550,000 rows and 4-5 columns of U8 elements (the smallest possible, since I only store 0 or 1). And a corresponding string array with the same number of rows 550,000. But when I have to write these two arrays into a single file, I merge the two arrays into a single 2D array where the first column is those strings and remaining columns are those U8 values converted into String and then I use the Write Spreadsheet File. It gave an error of memory full. So I am not very sure if the subroutine or DVR will help. I am redesigning my system so that I don't need such large arrays. It's a machine learning application, nothing to do with waveform charts (the typical examples provided for memory management).

 

Any suggestions are welcome.

Thanks ahead!

Vaibhav
0 Kudos
Message 14 of 20
(1,250 Views)

You probably should have started a new discussion because your problem is slighlty different and this thread is already marked as solved.


@Vaibhav wrote:
I couldn't find this option, neither for Front Panel, nor for Block Diagram. I am facing the memory problems in my application, and came across this thread while looking for some solution.!

 It is in the menu of the diagram windows in all recent LabVIEW versions. What version of LabVIEW do you have?


@Vaibhav wrote:
But when I have to write these two arrays into a single file, I merge the two arrays into a single 2D array where the first column is those strings and remaining columns are those U8 values converted into String and then I use the Write Spreadsheet File. It gave an error of memory full.

There is no need to combine the arrays and use "write to spreadsheet file". This is wasteful. Usel lowlevel file IO on the original two arrays.

We probably would need to see some code.

 

0 Kudos
Message 15 of 20
(1,240 Views)

@Vaibhav wrote:

@Now_With_Underscores wrote:
...
There's a way to show all memory copies (Tools»Advanced»Show Buffer Allocations) in LabVIEW... I recommend using that to see where the real memory shark is.

 

Hi,

I couldn't find this option, neither for Front Panel, nor for Block Diagram.


Untitled.png

 

First thing as far as i know "subroutine" priority will not help you in terms of memory. It is that vi takes control of calling thread and gives it back when finishes, so it can be used for the vi which needs to run very fast.

Second , why do you want to dump whole data at once in a file , what you can do is to write data to disk in chunks.

 

 

 

Message 16 of 20
(1,239 Views)

I guess the strings are hard to do anything about, the U8 2D array can be optimized to a 1D U8 array by masking and bit shifting the values (so that the previous 2nd column is 2nd bit and so on).

Dont merge the 2 arrays, wire both to a loop and merge/write each element to avoid big data copies. This ofcourse requires you to ditch Write to spreadsheet file and use Format into string and write to file instead.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 17 of 20
(1,234 Views)

Thanks @altenbach and @Neon

 

I use LabVIEW 2013 SP1, but as Neon showed, this option is in a different location, not where I was looking for based on that original comment.

Yes, since yesterday, I am reading anything that I can find on this topic (memory management, writing to files in chunks etc.). Also saw the low level functions to write to file. But I'd appreciate any tips on that.

 

Yes, I thought of creating a new thread, but asked here because I couldn't find that buffer allocation link on the location mentioned here. So I asked here because of the context.

I will soon make a small program to show the problem area and create a thread with that.

 

Thanks.

 

Vaibhav
0 Kudos
Message 18 of 20
(1,231 Views)

Ok, I have posted the questions with my small subprograms on this new thread

 

http://forums.ni.com/t5/LabVIEW/Memory-Management-for-Large-Arrays/td-p/3006955

 

 

Thanks for your time!

Vaibhav
0 Kudos
Message 19 of 20
(1,201 Views)

@Yamaeda wrote:

I guess the strings are hard to do anything about, the U8 2D array can be optimized to a 1D U8 array by masking and bit shifting the values (so that the previous 2nd column is 2nd bit and so on).

Dont merge the 2 arrays, wire both to a loop and merge/write each element to avoid big data copies. This ofcourse requires you to ditch Write to spreadsheet file and use Format into string and write to file instead.

/Y


Hi Yamaeda,

 

I have uploaded a couple of sample programs on that new thread. If you can spare some time, I would appreciate your feedback on those two programs about your masking process and then file writing process (I have uploaded two separate programs for these two tasks). Altenbach and Lynn have already given their updates on those programs, and others have also given their suggestions, which I am studying at the moment, but I am as well curious on your suggestions. Since this is a "closed" thread, I think it's better to discuss there as Altenback also suggested.  

 

Yhanks!

Vaibhav
0 Kudos
Message 20 of 20
(1,182 Views)