LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

clear labview memory

While running the project its size is around 700-900 mb but after 30 mins it decreases to 200 mb. Usually the size increased in due time but here it reduces and i don't know the reason , Why the project is consuming more memory (700MB) for the first 30 mins.I need the project memory to be maintained 200MB from the beginning itself.

I have cleared all the references, clear indicators when called and used request deallocation function in needed SUBVIs .

 

 

0 Kudos
Message 1 of 17
(4,403 Views)

Hi Perin,

 

i don't know the reason

We don't know either as we don't know your VI(s)…

 

I have cleared all the references, clear indicators when called and used request deallocation function in needed SUBVIs.

Why do you clear references when the program is running?

Why do you clear indicators when you call something?

Why do you call RequestDeallocation in subVIs?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 17
(4,381 Views)

I don't have an answer and my post could be unrelated, but... just a few hours ago I wrote a simple test vi for data acquisition (only one vi with some dll calls). Make an exe and run. The executable used about 85 MB at start, but after some minutes it dropped to 24 MB and then remained constant. My understanding of this - but I may be wrong - is that when the program is launched, LV runtime allocates a lot of memory for its own purposes. After a few time, the no longer used memory is recognised as such by the LV memory manager and deallocated.

I know that I can do absolutely nothing to change this behaviour (in my vi, of course). Maybe it's the same for you.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 17
(4,352 Views)
@
Knight of NI
 

 

We are working on a SCADA project(just displaying the real time reading in LabVIEW)
For doing this, we first generate the references for all the indicators then references of few unnecessary controls were closed. Then a query will be generated for the remaining controls and their values are updated by using the references.
We are using producer consumer design pattern and OOPS concept
This is the overview of our project and I cant share our code

0 Kudos
Message 4 of 17
(4,323 Views)

@Perin wrote:
@
Knight of NI
 

 

We are working on a SCADA project(just displaying the real time reading in LabVIEW)
For doing this, we first generate the references for all the indicators then references of few unnecessary controls were closed. Then a query will be generated for the remaining controls and their values are updated by using the references.
We are using producer consumer design pattern and OOPS concept
This is the overview of our project and I cant share our code


Why do you use references for your indicators? Use wires for your indicators to present your data.

I know what is OOP. But what does "OOPS" means?

0 Kudos
Message 5 of 17
(4,319 Views)

@pincpanter

 

"when the program is launched, LV runtime allocates a lot of memory for its own purposes. After a few time, the no longer used memory is recognised as such by the LV memory manager and deallocated."

We too have the same doubt, Is there any way to reduce the LV runtime memory

0 Kudos
Message 6 of 17
(4,318 Views)

@Perin wrote:

@pincpanter

 

"when the program is launched, LV runtime allocates a lot of memory for its own purposes. After a few time, the no longer used memory is recognised as such by the LV memory manager and deallocated."

We too have the same doubt, Is there any way to reduce the LV runtime memory


Just to clarify a bit, Perin shows in the first post the memory usage of the LabVIEW Development environment. So you run your code from the LabVIEW IDE. Usually the last step for a mature application is to create an executable from it, and run it using the LabVIEW Run-Time Engine. This usually leads to better performance, since the LabVIEW Development environment does not need to be loaded.

0 Kudos
Message 7 of 17
(4,314 Views)

@Blokk

 

"Why do you use references for your indicators? Use wires for your indicators to present your data."

 

We are using a lot of indicators, on manual wiring it takes more time and there is more probability for error(sorting issue is also difficult)

so we are using references for updating the value

 

"I know what is OOP. But what does "OOPS" means?"

sorry OOP only not OOPS

0 Kudos
Message 8 of 17
(4,312 Views)

@ Blokk

 

"Usually the last step for a mature application is to create an executable from it, and run it using the LabVIEW Run-Time Engine. This usually leads to better performance, since the LabVIEW Development environment does not need to be loaded."

 

Sorry for mentioning it as project we got those result only in the application.

0 Kudos
Message 9 of 17
(4,308 Views)

@Perin wrote:

@Blokk

 

"Why do you use references for your indicators? Use wires for your indicators to present your data."

 

We are using a lot of indicators, on manual wiring it takes more time and there is more probability for error(sorting issue is also difficult)

so we are using references for updating the value


The problem with this approach is that it is really performance hogging. Specially if you have lots of indicators so references. Have you heard about clusters? Using clusters (with Type definition and bundle/unbundle by names) can solve your "too many wires" problem. But you also mentioned OOP. It is even more robust for such cases (I am not programming in OOP).

Another side to reduce performance eating problems is your GUI! Do you really need to show ALL that many indicators to the user? A professional GUI gives the user options to only show the "actually" or "temporary" important GUI elements. SubPanels are good things to use them in such cases, since it reduces the Top level VI's complexity!

0 Kudos
Message 10 of 17
(4,306 Views)