From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Advanced Plotting Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Plotting Toolkit and memory problems

Hi,

I have a very big problem and after one week I have no idea if there is a solution for that problem at the end.
Over the last 15 months I developed a simulation tool that ends up with some stacked barplots (~100 bars of 6 single stacked bars). Now I have to create ~ 4500 pictures (or screenshots) of the different results...to use them in a web application. The problem: after creating 80 pictures the LabVIEW application is out of memory (error 402901 @ View.vi). Even if I don´t show the pictures and only save them, a out of memory problem occurs. Even if do the picture generation it in a SubVI and deallocate the memory after a single plot. The max number  of pictures depends on the picture size if visible and the number of elements in the picture. Is there a other way to deallocate the memory after using the advanced plotting tool kit ?

Help needed...
Make my day with a good idea! Ralf

 

0 Kudos
Message 1 of 8
(5,125 Views)

That shouldn't happen, but to help we would need to see your code.

Craig

0 Kudos
Message 2 of 8
(5,077 Views)

Will Labview 64 bit version help you, since it can allocate a lot more memory?

0 Kudos
Message 3 of 8
(5,069 Views)

I´m using LabVIEW 2018 Version 18.0f2 (64bit)

That doesn´t help


@studer wrote:

Will Labview 64 bit version help you, since it can allocate a lot more memory?


 

0 Kudos
Message 4 of 8
(5,054 Views)

Thank you: I prepared a Vi for the discussion:

This is the subVI I want to call for 4500 times. The Array with the cluster inside on the left side has  max.103 elements. The five "For Loops" on the left side (white) are only necessary to sort and name elements for the final picture.The green "For Loops" create  max.103 stacked barplots and ~Text-labels.

The result is shown in the second jpg File.

After calling that subVI, I deallocate the memory in the main vi.
I can call the SubVi ~72 times... than the error occurs.
If I reduce the bars I can call it more often...

PS. The small SubVi under the second green For Loop is only writing the property node for the text labels,... couldn´t be the  problem

I tested:

It has the same effect on different computers
It has the same effect when I build an exe file
Taking a look into the Task Manager of Windows I see that the amount of memory the VI uses is increasing the whole time

Any ideas....?

Ralf

 

Download All
0 Kudos
Message 5 of 8
(5,047 Views)

Those are just pictures of your code, not a VI that can be improved and tested.  😉

 

I think that at sometime an error occurs somewhere in your code and you aren't handling the error.  It might not be related to your plot at all. You are generating a huge string (APT just sends a formatted string to MatplotLib) but without error handling it would be hard to track down when and where it happens.

 

I'd suggest you use a program structure like the attached.  Clean up your code and add it to the subvi.  To clean up that code, use commonly accepted labview style guidelines to make it easier to understand.  Inputs on left, output on right, wires run left-right as much as possible.

 

Craig

Download All
0 Kudos
Message 6 of 8
(5,031 Views)

Thank you!

I want to follow your recommendations but actually I have no time because of other projects... I hope I can come back to that problem in October...

 

I am very sure that the error did not occur at another part of the code, but I will test it.

 

...commonly accepted labview style guidelines..

I reduced the code for a better understanding of the problem... without a clean up. Sorry.

 

0 Kudos
Message 7 of 8
(4,994 Views)

Hopefully you can get it sorted out eventually. 

If you have time, attach the actual VIs and some test data and I might be able to help.

 

Cheers.

Craig

0 Kudos
Message 8 of 8
(4,987 Views)