LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

removing array from memory

I have an 2Darray (typically of ~ 1000 elements) that stores data to plot.
I did :  Data Operations > Empty Array & then Data Operations > Make Current Value Default.
Sometimes, I need to re-calculate a new array of values, so I use the Invoke Node > Reinitialize to Default.
It doesn't seem to clear the values from the array. Restarting the entire VI doesn't empty the array - only restarting LabView does.

Any ideas why this is happening ?

Thanks,
ak

0 Kudos
Message 1 of 3
(3,058 Views)
Hi ak,

have you tried to write an empty array to this control/indicator to clear it? This always should work...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(3,046 Views)
Hi ak,
 
The best way is to use "Initialize Array" from the array palette. You have to wire an element to define the array type. If you know the array size, you can wire it, if you don't know it, you have to append new data to your array with "Build Array" function (also in the array palette). Build array is a resizable function.
 
Nevertheless it is better to fix the array size once for all because if the array size is getting too big, labview allocate entire new space for it.
 
Cheers.
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 Kudos
Message 3 of 3
(3,045 Views)