OPC A&E Server Configuration

The WinCC OA OPC A&E server must not run during the configuration. As soon as you start the WinCC OA OPC A&E server, you have to add the following config entry to the config file:

[opcaesrv]
server = "AEServer1"

Open the configuration panel of the WinCC OA OPC A&E server via the system management panel:

Figure: System Management - OPC Driver tab

Click on the OPC A&E Server button on the OPC Driver tab. All the data that the OPC A&E server of WinCC OA needs for the communication with an OPC A&E server is set. According to the OPC specification, the highest level is the Event Category. Thus you have to begin with the definition of the Event Categories:

Figure: Configuration panel for Event Categories

Add: A new Event Category is defined with this button. Enter the name of the Event Category in the text field beside and add it to the table by clicking on the Add button. Also an Event Type must be selected for each Event Category. For configuration of the Event Type use the panel, which is opened automatically after adding a new Event Category entry to the table.

Figure: Configuration of Event Type

The OPC A&E server in WinCC OA supports the event types Simple, Conditional and Tracking Events.

Rename : This button renames the an existing Event Category. Therefore you have to select the specific row in the table above.

Delete : By selecting an arbitrary row, the Event Category can be deleted.

Events: By clicking on this button you can define Conditions, Simple Events or Tracking Events for the selected Event Category. Depending on the Event Type of the selected Category, different panels are opened.

The buttons "Rename" and "Events" only work after saving the configured Event Categories using the "Apply" button!

Event Type Conditional

For the Event Type Conditional the panel for defining Conditions looks as follows (Clicking on the Events button in the configuration panel for Event Categories):

The handling in this panel is the same as described for the panel Event Categories (definition of names for the Conditions - click on Add - Apply saves the configurations). After performing and saving the settings for the Conditions, you can configure Sub Conditions for each Condition by clicking on the same named button. Following panel will be opened:

Alert handling: Using the data point selector you can select a DPE with an alert handling (or the alert handling config explicit) in WinCC OA. Clicking on the button with the green tick reads the data of the alert handling and enters them into the table Sub Conditions of the panel. These data define the Condition in the following way:

Each alert range of the selected alert handling specifies a Sub Condition. Per default the alert text is used for the Sub Condition name. The "OK range" does not have a Sub Condition (non-existing entry in the table).

The selected alert handling for the definition, shown in the figure above, looks as followed in the PARA panel:

Figure 1. Settings for the ranges 2-5
Figure 2. Settings for the first range

If you do not want to use the alert text for the Sub Condition name, you can change it by clicking on the Change button in the Sub Conditions panel.

As shown in the figure above, the alert handling of a master data point was selected for the Sub Conditions. But you can of course also select an other arbitrary DPE, which has a configured alert handling. When configuring the server items (see also Configuration of server items) you have to check that the number of alert ranges is identical for every server item.

If a server item changes to the state went acknowledged in a valid range (in the figure above range 3), the server passes the severity 1 to the client.

Figure 3. Changing the name of a Sub Condition

Select a row where the name should be changed, enter the new name into the text field Sub Condition Name and click Add. All Sub Conditions, where no changes are made, have the configured alert text as name.

Event Type Simple (via AlertHandler)

A Simple Event has no Sub Conditions. There is only the alert text, which is also passed in the same way to an OPC A&E client. The OPC A&E client can display this Simple Event, but no acknowledgement is possible.

Following things must be considered when using Simple events via the AlertHandler (_alert_hdl config):

  • To use a Simple event via AlertHandler the data point must be part of the data point group "OPC_AE_Simple".
  • The event is only triggered in case of an CAME event.

Event Type Simple /Tracking (via dyn_string)

Data points used for Simple or Tracking events must be of type dyn_string and part of the data point group "OPC_AE_Dynamics".

After creating a event category of type "Simple" or "Tracking" the internal configuration is performed automatically.

The only necessary configuration is to add the corresponding data points to the data point group, see description below.

Structure dyn_string for Simple Events

  • 1. Element: Severity, valid range from 1 to1000-
  • 2. Element: Message, string with the event message
  • 3. Element: Category Name, if not set the first category from the available categories (see panel description above) is used.

Structure dyn_string for Tracking Events

  • 1. Element: Severity, valid range from 1 to1000-
  • 2. Element: Message, string with the event message
  • 3. Element: Category Name, if not set the first category from the available categories (see panel description above) is used.
  • 4. Element: ActorID, string with the name or ID of the triggering user.

Configuration of server items

After configuring all Event Categories, you have to define the server items. These server items are provided by the OPC A&E server in WinCC OA. Make definition in the panel for DP group administration. Open the panel for DP groups via the system management:

Clicking on the DP Groups button in the Database tab opens the administration panel for data point groups:

All entries in the combo box Group, beginning with OPC_AE, are important for the WinCC OA OPC A&E server. The groups OPC_AE und OPC_AE_Simple exist per default in WinCC OA. The Group OPC_AE is the main group for OPC A&E and contains the sub groups OPC_AE_Simple and OPC_AE_PVLEVEL4 (shown in the figure above). When creating the Event Categories (from type Conditional) a new DP group will be created automatically for each Condition (in our example OPC_AE_PVLEVEL4). The automatically generated name consists of:

OPC_AE_<Condition Name>

Insert the relevant DPEs (for Simple and Conditional Events), which should be provided by the server into the sub groups.

After the definition of all DPEs (= server items) in the sub groups, it is absolute necessary to execute the function "Check" in the main group (OPC_AE). The items, which should be provided from the OPC A&E server, are written on the specific internal data point element. After this execution the server can handle the items correctly. For more information on data point groups in WinCC OA see chapter Data point groups.

When calling the Check function in the main group OPC_AE, a test is executed whether the number of alert ranges of the single DPEs matches with the configured Conditions. Only DPEs with a positive test result are provided by the server as items. The DPEs, configured in the sub groups, need not have the same data point type, like the type of the DPE used for definition of the Condition resp. Simple Event.

If the configuration of the WinCC OA OPC A&E server is finished, you can start the server (if a WinCC OA OPC A&E server is already running, stop it). Therefore use the manager WCCOAopcsrvAE. Add it to the manager list in the console and start the process. Before starting the manager, the following entry in the config file of the project has to be defined (in the [opcaesrv] section):

[opcaesrv]
server = "AEServer1"

For more information on the config entries see section Possible config entries of the OPC A&E server of this documentation.

If you use the WinCC OA OPC A&E client and the WinCC OA OPC A&E Server for data exchange, you do not have to start the server manually, because the server will be started automatically in the background when the client starts. You only have to pay attention that if you start the client another manager number than 1 is used (for example, -num 2), because both managers are from same type and the server always tries to start with "-num 1".

If the server runs in another WinCC OA project and should be started automatically, define the option -proj <Projname> in the Windows registry (search the key word "WinCC OA.OPCAE.1" and then the entry "LocalServer32").