WinCC OA as service

The Pmon or Process monitor starts, stops and monitors the managers of a project, and can run under Windows also when a user is not logged in (for detailed information on the Pmon, see chapter Process monitor, basics).

The service must be installed with specific command line parameters for the Pmon manually (see table below for a description of the parameters). For the user "Installation" means that the service is registered with the Windows service manager and thus can be started or stopped in the service window of the system configuration or through the "net" program. Further settings such as "Log on as" can be set in the service window under Windows (see also Configuration of the service). You can also configure the service in such a way that WinCC OA starts at each reboot the specified projects. Several projects can be started as service.

Following notes and warnings must be considered when using WinCC OA as a Service:

  • Note that the Pmon is case sensitive. WCCILpmon and wccilpmon are two different names.
  • If WinCC OA is used as service and SNMP is used, the user account that is used has to possess write rights to the directories <proj_path>/log and <proj_path>/db.
  • When using the pmon as a service it is to consider that only a defined user shall be used to start the service. The local system account must not be used due to the fact that access and permission problems might occur.

The following command line options and parameters are available for activating the Pmon as a service under Windows:

Option Description
-user <serviceAccount>

Installs the service so that it runs under a specific account. Per default the service runs under Local System. This option is entered in common with the -install option.

Examples:

 -user NetworkService -install

Sets the account on the Network Service Account.

 -user LocalService -install

Sets the account on the Local Service Account.

-install

Installs the WCCILpmon as service (in the Windows service manager the WCCILpmon is registered with the start type "Automatic").

If several projects (for example, two projects) have to be started as service, copy the WCCILpmon.exe and rename the copy (for example, WCCILpmon1). Register both WCCILpmon.exe and WCCILpmon1 with the option -install. Register both projects with the -set option (see below).

Set the config entry delayStartSeconds in the [pmon] section of the config file. This entry delays the start of the pmon for a configurable number of seconds.

Both projects can now be started as service.

-name

With -name <service name>, a name can be specified for the service. Note that you have to specify a name for every action otherwise the name "WCCILpmon" will be used. If several project (e.g. 2 projects) must be started as a service, they must be named differently by using the "-name" option. To register the projects use the -set option (see below).

For example:

WCCILpmon -install -name XXXX

Then:

WCCILpmon -set d:\test\config\config 1 -name XXXX

Or immediately:

WCCILpmon -install -set d:\test\config\config 1 -name XXXX

Uninstall the service as follows:

WCCILpmon -remove -name XXXX
CAUTION:

The option -name must not be used with the default "WCCILpmon" name.

If "-name WCCILpmon" is used when configuring the service, the service cannot be started!

-remove Uninstalls the service
-reinstall Same as-remove and then-install
-set <configFile> <autostart>

With this option, the path of the project config file (as defined in the environment variable PVSS_II) will be written to the registry and the boolean "autostart" defines whether then project will be started automatically when the service is started or not. The key in the registry must never be set manually.

HKEY_LOCAL_MACHINE/SOFTWARE/Siemens/Automation/WinCC_OA/AutoStart

- configFile... contains the path of the project config file

- autostart ... 0 or 1 (start project automatically or not)

Example:

WCCILpmon -set C:/WinCC_OA_Proj/WinCCOAproj_de_en/config/config 1

Example:

WCCILpmon -install -set C:/WinCC_OA_Proj/WinCCOAproj_de_en/config/config 1 -name PMON_WinCCOA_Proj