HMI Autoboot - OA as a service

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
6 posts • Page 1 of 1
Smiffy
Posts: 45
Joined: Thu May 18, 2017 4:21 pm

HMI Autoboot - OA as a service

Post 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?

dbindernagel
Posts: 161
Joined: Mon Feb 23, 2015 1:34 pm

Re: HMI Autoboot - OA as a service

Post 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.

paramesh1985
Posts: 81
Joined: Thu Sep 25, 2014 6:03 am

Re: HMI Autoboot - OA as a service

Post 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

Smiffy
Posts: 45
Joined: Thu May 18, 2017 4:21 pm

Re: HMI Autoboot - OA as a service

Post 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.

gschijndel
Posts: 373
Joined: Tue Jan 15, 2019 3:12 pm

Re: HMI Autoboot - OA as a service

Post 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.

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: HMI Autoboot - OA as a service

Post 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

Post Reply
6 posts • Page 1 of 1