LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW picture control - many updates - memory problem

Solved!
Go to solution

Hello,

 

I have limited experience with LabVIEW and I'm currently using a picture control in one of my applications.

The idea is that certain regions (rectangles) inside the picture control get updated all the time with different colors. (depending on a measured parameters)

 

I have a main while loop which holds a shift register containing the picture control.

I noticed that the different "Draw Rectangle" operations I'm performing are accumulated so the memory keeps increasing...

 

I've made a small example program that demonstrates this behaviour.

 

I want to keep updating the picture control all the time in an easy way. How can I make sure that the memory does not get accumulated? Are there functions with which I can replace a part of the picture control with new pixel values instead of simply adding these new values each time to the picture control?

 

Thanks in advance for all your help!

0 Kudos
Message 1 of 3
(2,672 Views)
Solution
Accepted by topic author k_tunsten

Hi k_tunsten,

just remove the shift register. The result is the same, but the performance is much better and the memory will not increase.

OK it's not really the same, but the indicator buffers the old image, so that it looks like the same.

 

Hope it helps.

Mike

0 Kudos
Message 2 of 3
(2,663 Views)

Adding to the above...

 

THe Picture control has a property "Erase first" that can be set to always erase, don't erase and erase once now that can be used when you need to re-build the image.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 3
(2,658 Views)