LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D Waveform Array and Memory Growth

Solved!
Go to solution

Hello,

 

I'm trying to resolve a memory growth (or leak) issue. I know which VI is causing it. I did some trial and error by disabling each part of the VI and observing how memory usage changes. Then I noticed that even when I disabled the entire code inside the VI except the controls and indicators, memory was still growing. Only when I disabled the entire VI icon from its caller VI, memory was stable.

 

I thought the culprit must be this 2D waveform array input. It is coming from Read Multiple Elements from Stream. Most of the time (maybe 99+% of the time), there is only one row. If the loop is delayed for some reason, there may be two rows, which I don’t want to miss. The number of columns is fixed at 64.

 

1.png

 

It is the Process DAQ Data VI in this loop below.

 

2.png

 

I took some array manipulation loops out of the Process DAQ Data VI so that there is no 2D waveform front panel control. It did not help.

 

3.png

 

When I connected the 2D waveform input to a dummy constant value, then memory was stable.

 

4.png

 

5.png

 

Any insight to resolve this problem will be appreciated.

 

0 Kudos
Message 1 of 2
(5,173 Views)
Solution
Accepted by topic author Arcanix

I tried using Read Single Element from Stream twice per loop instead and the memory issue disappeared.

 

6.png

 

So I can use 2D waveform arrays as long as their row number is predetermined.

0 Kudos
Message 2 of 2
(5,138 Views)