Advanced Plotting Toolkit

Showing results for 
Search instead for 
Did you mean: 

Advanced Plotting Toolkit and memory problems


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 use them in a web application. The problem: after creating 80 pictures the LabVIEW application is out of memory (error 402901 @ 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

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


0 Kudos
Message 2 of 8

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

0 Kudos
Message 3 of 8

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

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....?



Download All
0 Kudos
Message 5 of 8

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.



Download All
0 Kudos
Message 6 of 8

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

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.




0 Kudos
Message 8 of 8