Page 1 of 1
HMI Autoboot - OA as a service
Posted: Tue Jun 30, 2020 5:08 pm
by Smiffy
I am trying to get OA UI to start automatically when logging into the PC. I am using V3.16 patch 16.
I have followed the help regarding getting OA to run as a service. However, despite following the help to the letter and repeating the exercise many times, I cannot get it to work. The process monitor starts in the background, but I do not see any display window. If I then open the console app, I can see that all the managers start (with the exception of the UI as that is set to manual as specified in the help). So it seems to have done something. I also tried changing the UI manager from manual to automatic. This had the effect of starting the UI manager, but again there was no display window. Can anybody offer any assistance to solve this?
Re: HMI Autoboot - OA as a service
Posted: Wed Jul 01, 2020 1:40 pm
by dbindernagel
From the help:
Code: Select all
When using Windows 2008 Server 64 bit, Windows 7 or above, following settings must be done to use WinCC OA as service:
The option "This account" must be selected instead of "Local system account" and the fields must be filled accordingly. Next press "Apply" and "OK".
Create a new desktop shortcut for WCCOAui.exe and add following parameters (in the "Target" field):
"-proj XYZ -m gedi" (replace XYZ with your project name)
Use the WinCC OA Console to change the UI manager to "manual" (Right click > Edit manager properties).
Start the WCCILpmon Windows service
Start all managers except the UI inside the WinCC OA Console
Start the UI with the shortcut.
If this settings are not applied, the UI will not be displayed to the user, even though it is marked as running inside the WinCC OA Console. To solve this issue, stop the UI with the WinCC OA Console, apply the settings above and restart the UI using the shortcut.
The help states you have to create a shortcut for the UI and manually click on it, after you login, to start the UI. It will not start automatically.
By default a Windows service cannot interact with the desktop (Basically it cannot display any windows).
If you want to start a UI automatically on login you could create a batch file to start the User Interface Manager with the correct parameters. Put the batch file either in the autostart folder or use the task scheduler.
Re: HMI Autoboot - OA as a service
Posted: Fri Jul 03, 2020 7:37 am
by paramesh1985
Hi,
It can be possible to start the UI automatically.
I am having few question .
1. Are you using domain server
2. you want to start the client UI on separate machine or in the server machine.
thanks.
regards,
r.paramesh
Re: HMI Autoboot - OA as a service
Posted: Fri Sep 11, 2020 6:07 pm
by Smiffy
Ok I have fixed the boot up by starting the UI from the windows task scheduler as per dbindernagel instructions.
The next problem is how to shutdown cleanly from a button on the HMI.
After much experimentation, I have ascertained the following.
When the pmon process (wincc oa as a service) is terminated by net stop wccilpmon, it performs a clean shutdown (ok the UI is not happy having the db manager pulled from under it).
So is it a safe assumption that during a normal PC shutdown the pmon service will be shutdown in the safe graceful manner (mimicking the net stop wccilpmon behaviour)?
If so then I think I can achieve my goals.
The HMI button calls a batch file using the system() function, passing in a HMI / Full shutdown flag.
The batch file waits a short while for the button script to return.
It then closes the UI using the taskkill /F /IM WCCOAui.exe.
Then, if required, the UI can then be started again using a desktop shortcut as described in the help above.
Should the flag indicate that a full shutdown be required, the batch file will also execute the shutdown /s command.
Ideally I would like to issue the net stop wccilpmon command first, but sadly that requires admin rights which the user will not have.
The above will be superfluous though IF the wccilpmon service exits gracefully (mimicking the net stop wccilpmon behaviour) during a windows shutdown. So that is the $64,000 question.
Re: HMI Autoboot - OA as a service
Posted: Mon Sep 14, 2020 4:55 pm
by gschijndel
Smiffy wrote: ↑Fri Sep 11, 2020 6:07 pm
It then closes the UI using the taskkill /F /IM WCCOAui.exe.
Instead of using a system command you could use the 'exit' function to close the UI.
Re: HMI Autoboot - OA as a service
Posted: Tue Sep 15, 2020 10:28 am
by leoknipp
If you want to stop a manager from a CTRL script you can also write the manager ID (CTRL function convManIdToInt) to the _Managers.Exit DP element.
Best Regards
Leopold Knipp
Senior Support Specialist