07-11-2017 04:48 AM
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 .
07-11-2017 05:32 AM - edited 07-11-2017 05:33 AM
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?
07-11-2017 08:18 AM
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.
07-12-2017 12:30 AM - edited 07-12-2017 12:33 AM
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
07-12-2017 12:41 AM
@Perin wrote:
@GerdWKnight 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?
07-12-2017 12:42 AM
"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
07-12-2017 12:50 AM
@Perin wrote:
"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.
07-12-2017 12:52 AM
@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
07-12-2017 01:02 AM
@ 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.
07-12-2017 01:02 AM
@Perin wrote:
"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!