We want to use pmonGetState() to show the operational state of a control manager within a status panel on a project which is running as service on a windows machine. If the same project is running in "normal" mode pmonGetState() reports the manager states correctly in the UI. If pmonGetState() is executed within a control manager it's also working as aspected. Is there a possibility to get the state of manager for an UI running on an project which is configured as a service, besides excuting pmonGetState() in a separate control script?
Thanks & Regards
Daniel
pmonGetState() reports 0 for all managers when started from UI and the project is running as a service
Search
-
- Posts: 34
- Joined: Tue Jan 10, 2012 1:40 pm
-
- Posts: 373
- Joined: Tue Jan 15, 2019 3:12 pm
Re: pmonGetState() reports 0 for all managers when started from UI and the project is running as a service
The pmonGetState read the state from a shared memory (see api/include/Basics/NoPosix/PmonTable.hxx). Unfortunately this shared memory is not created in the global namespace, so it is only available in the same session as the service (session 0).
There are commands available, which can be used to get the state of all managers. These commands can be executed with the pmon '-command' option or with the function 'pmon_query2'.
There are commands available, which can be used to get the state of all managers. These commands can be executed with the pmon '-command' option or with the function 'pmon_query2'.
Re: pmonGetState() reports 0 for all managers when started from UI and the project is running as a service
Please take into account that the CTRL function pmon_query() is an internal (undocumented) function.
We recommend to use only functions which are listed in the WinCC OA Documentation.
When using undocumented functions you must ensure that all prerequisites are fulfilled on your own.
Best Regards
Leopold Knipp
Senior Support Specialist
We recommend to use only functions which are listed in the WinCC OA Documentation.
When using undocumented functions you must ensure that all prerequisites are fulfilled on your own.
Best Regards
Leopold Knipp
Senior Support Specialist