LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I free RAM after running labview vi

I use LV rule that I close connection with help "DB tools free object" and "DB tools close connection" constantly for every query but such closing is not working, excuse me

 

Please see my attachment: can I do so for one query?   In sense of working "to parallel" DB tools execute

0 Kudos
Message 21 of 23
(439 Views)

[What a surprise to get so many new notifications for this thread after six years!]

 

If I'm not mistaken, in your example you just need to replace the tunnels into the loop with shift registers.  That way the reference (and the error cluster) will get passed from one iteration of the loop to the next.

 

You will need to modify your case structures, though, instead of having one structure for each boolean.  The quick and dirty way is to nest them; the more elegant way is to store both boolean values in an array, and then use the array as a case selector (by converting the array to an integer, for example).

0 Kudos
Message 22 of 23
(429 Views)

@current 93 wrote:

I use LV rule that I close connection with help "DB tools free object" and "DB tools close connection" constantly for every query but such closing is not working, excuse me

 

Please see my attachment: can I do so for one query?   In sense of working "to parallel" DB tools execute


 

There is more to the "rule" than simply closing. The rule also talks about when to close and open.

 

If you are repeatedly going to be using a reference to anything in LV (static control references are the exception) you should open once before you start using it, and keep using the same reference until you are done and then close it once.

 

background:

The close function marks the resource and "closed" but does not remove the data structure describing that reference from memory until the VI (or VIs) using that resource go idle and are removed from memory.

 

So by repeatedly open use close you are allocating memory that will not be released until the VI is closed.

 

Bottom Line

 

Open the ref once use and only close it when done.

 

Ben

 

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 23 of 23
(416 Views)