I need to keep in memory shapes were created dynamically with createSymbol or addSymbol.
Objects created with the gedi and saved in the XML file are well kept in memory when panel is terminated and opened another time, but shapes created with createSymbol/addSymbol at initialization of panel aren't.
Is there a solution to do that ? Maybe it would be a good feature for the next releases.
Thanks for your reply
How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
- amichon
- Posts:93
- Joined: Sat May 17, 2014 3:49 pm
How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
I do not understand the description for the function you are talking about.
If a panel file is loaded is it kept in memory if panel caching is activated. By default the UI caches the information as long it is running.
Is it maybe related to this topic?
https://portal.etm.at/index.php?option= ... =5703#5725
Best Regards
Leopold Knipp
Senior Support Specialist
If a panel file is loaded is it kept in memory if panel caching is activated. By default the UI caches the information as long it is running.
Is it maybe related to this topic?
https://portal.etm.at/index.php?option= ... =5703#5725
Best Regards
Leopold Knipp
Senior Support Specialist
- amichon
- Posts:93
- Joined: Sat May 17, 2014 3:49 pm
Re: How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
I think UI doesn't cache all shapes were created after Initialize event. Is it right or it should be work ?
Please, see below the picture.
it's related to this previous topic but i don't want to save panel.
Please, see below the picture.
it's related to this previous topic but i don't want to save panel.
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
Correct, panel-references loaded dynamically via addSymbol/createSymbol are always removed from memory when the panel is closed.
This is done to have the panel in the (kind of) same state as it was when it was first loaded (however graphical attributes are not reset).
This is done to have the panel in the (kind of) same state as it was when it was first loaded (however graphical attributes are not reset).
- amichon
- Posts:93
- Joined: Sat May 17, 2014 3:49 pm
Re: How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
any idea to keep in memory ?
- amichon
- Posts:93
- Joined: Sat May 17, 2014 3:49 pm
Re: How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
I found only way to keep in memory : it is to load each panels in differents embedded modules and toggle visibility of embedded module to switch to the active view.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
When adding several embedded modules in one panel and switching the visibility you have to keep in mind that invisible modules are still receiving messages and are processing control scripts, e.g. getting a hotlink for a dpConnect and processing the work function.
This will produce additional load for the UI and the Event Manager for invisible information.
Why aren't you creating a XML panel with all the required references (e.g. with a script, bat file, ....?
Then you do not have to draw it in Gedi and you can create the panel once instead of using addSymbol all the time.
Best Regards
Leopold Knipp
Senior Support Specialist
This will produce additional load for the UI and the Event Manager for invisible information.
Why aren't you creating a XML panel with all the required references (e.g. with a script, bat file, ....?
Then you do not have to draw it in Gedi and you can create the panel once instead of using addSymbol all the time.
Best Regards
Leopold Knipp
Senior Support Specialist
- amichon
- Posts:93
- Joined: Sat May 17, 2014 3:49 pm
Re: How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
I'm agree with you. Adding several embedded modules produce additional load but it might be a good solution for me to toggle very quickly between panels without having a flicking effect.
This flicking effect is due to the thousands of objects are visible in each panels.
Loading XML file and Keep in Memory is a good way to save the graphical state of objects and reduce the flicking effect, but the refresh time due to dpConnect response might be annoying in some cases.
I see to generate references directly in the element of xml file.
I insist but it would be great to have a function savePanel () like the save function in GEDI ...
Thanks again for your support
This flicking effect is due to the thousands of objects are visible in each panels.
Loading XML file and Keep in Memory is a good way to save the graphical state of objects and reduce the flicking effect, but the refresh time due to dpConnect response might be annoying in some cases.
I see to generate references directly in the element of xml file.
I insist but it would be great to have a function savePanel () like the save function in GEDI ...
Thanks again for your support
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
Especially if you have thousands of objects in one panel you should really check the CPU usage for the UI in runtime condition if several modules are opened.
When doing this test you have to use the real PLC which is generating data or a simulation to change the dp elements shown in the panels.
Even if there would be a function available to save a panel generated during runtime the result will be the same compared to the generation of a panel file in xml format by some sort of script.
In the end you will get a panel file will all references in the file.
If you have added several modules in one panel you can reduce the CPU load for the invisible module by using one of the following options:
-- attribute "visible" - FALSE to set them invisible
-- attribute "updatesEnabled" - FALSE to disable visual updates
Using both attributes at the same time will not make a difference compared to using only one of them.
Best Regards
Leopold Knipp
Senior Support Specialist
When doing this test you have to use the real PLC which is generating data or a simulation to change the dp elements shown in the panels.
Even if there would be a function available to save a panel generated during runtime the result will be the same compared to the generation of a panel file in xml format by some sort of script.
In the end you will get a panel file will all references in the file.
If you have added several modules in one panel you can reduce the CPU load for the invisible module by using one of the following options:
-- attribute "visible" - FALSE to set them invisible
-- attribute "updatesEnabled" - FALSE to disable visual updates
Using both attributes at the same time will not make a difference compared to using only one of them.
Best Regards
Leopold Knipp
Senior Support Specialist
- amichon
- Posts:93
- Joined: Sat May 17, 2014 3:49 pm
Re: How/Needs to keep in memory dynamic shapes created with createSymbol/addSymbol ? V315P005
Thanks for your response.
Now, i save generated panel as XML file and the rendering is better.
I have optimized some things. The panel takes about 900 ms to refresh all graphical state (from dpconnect answer), and the panel is displayed immediatly with the last know graphical state.
Now, i save generated panel as XML file and the rendering is better.
I have optimized some things. The panel takes about 900 ms to refresh all graphical state (from dpconnect answer), and the panel is displayed immediatly with the last know graphical state.