External events
The external events from OPC data sources can either be collected using 800xA integration and ABB Ability™ History Event Collector or using RTDB-EcOpcClient. Figure 1 illustrates the classes where external events are stored.
The most important class that contains all the OPC A&E standard attributes is "OpcEvent". In addition to standard OPC attributes, it contains identification on where the events have been collected from and unique identifiers for all events. In case events have been produced using the system 800xA interface and 800xA ABB Ability™ History Event Collector component, the OpcEvent class also contains selected (the most important) 800xA vendor-specific attributes.
It is up to each OPC A&E server to decide what kind of vendor-specific attributes it exposes. This is why a separate class (table) for the vendor-specific attributes is needed. Each OpcEvent instance is referring to zero or more OpcEventAttribute instances.
Attributes are stored to the OpcEventAttribute class row-wise, i.e., one attribute on each row. Attributes are identified using the "AttributeId" provided by the original event source, as well as "EventTime" and "EventId", which come from the master event. Indexing of event attribute tables supports effective fetches based on the master "EventId".
Using Vtrin OPC, event data is found from the fimain tree in the folder OPC Events. The "OPC Events" list shows the master OPC events only. The display "OPC Events and Attributes" is a master-detail presentation for the events and related attributes. The events are shown in the upper list, and selecting an event causes the related attributes to be populated into the lower panel.
Note that, initially, there are no filters applied to the "OPC Events" or "OPC Events and Attributes" lists. The most commonly used filter, and also quite a useful one, is the EventTime filter, which is configured to show only the latest events. If the number of events is large, one might have to increase the value of the "Truncate at" parameter from the properties of the list display (the default is 5000). In case the display is not able to show the results due to a too small 'Truncate at' value, it prompts "- Data truncated -" on the data display.

Figure 1: Relationships between classes used to store external events from OPC A&E sources.
Starting from RTDB version 4.5, there is a class called "OpcEventAttributeDescription". The reason for introducing another indirection between "OpcEventAttribute" and the actual attribute name is the fact that the system should be able to collect and merge events from various event sources. Each event source defines the set of vendor-specific attributes which it supports, and it is up to the server to assign a unique Id (uint32) for the attribute. Two servers might define an Attribute with an Id 1 to have a different name. To avoid collisions, AttributeId is generated by computing CRC32 (uint32) over the combination of CategoryId (uint32), AttributeId (uint32), and SourceServer (string) in this order. SourceServer is found from the Id property of the OpcEventSourceServer class (e.g., ABB.AdvAeEventStorageServer.1) (ProgId of the server that has produced the event and the related attribute). AttributeId (A&E source server defined) can be found from the property of AttributeId in the class OpcEventAttributeDescription. CategoryId is available both in the base OpcEvent class and in the class OpcEventCategoryDescription.
Equipment events
OpcEvent class properties
Identification
| Property | Type | Description |
|---|---|---|
| Id | GUID | Unique identifier for this event. This is generated by the system or it can be inserted by the creator. The id has to be unique only within the same EventTime. This makes it possible to use the hash algorithm to generate the GUID, if such cannot be produced when the event is generated (also, uniquely identifying events is not in the scope of the OPC A&E specification). |
| ExternalName | string[64] | The system identifier for 800xA. |
| SourceServer | string[64] | OPC A&E server where the event has been collected from. |
Standard OPC A&E
| Property | Type | Description |
|---|---|---|
| EventTime | DateTime(UTC) | As in OPC A&E specification |
| SourceEventArea | string[128] | As in OPC A&E specification |
| ChangeMask | uint16 | As in OPC A&E specification |
| NewState | uint16 | As in OPC A&E specification |
| Source | string[128] | As in OPC A&E specification |
| Message | string [254] | As in OPC A&E specification |
| EventType | uint32 | As in OPC A&E specification |
| EventCategory | uint32 | As in OPC A&E specification |
| EventCategoryDescription | string[128] | As in OPC A&E specification |
| Severity | uint32 | As in OPC A&E specification |
| ConditionName | string[128] | As in OPC A&E specification |
| SubConditionName | string[128] | As in OPC A&E specification |
| Quality | uint16 | As in OPC A&E specification |
| AckRequired | bool | As in OPC A&E specification |
| ActiveTime | DateTime(UTC) | As in OPC A&E specification |
| Cookie | uint32 | As in OPC A&E specification |
| ActorId | string[128] | As in OPC A&E specification |
Selected 800xA attributes
| Property | Type | Description |
|---|---|---|
| ProcessSection | int32 | Mechanism by which a system is divided in controllers such as the AC800 and AC400. Mechanisms already exist with the System 800xA to filter by this category.AttributeId = 0 |
| Class | int32 | Mechanism by which a Process Section is divided in controllers such as the AC400. Mechanisms already exist with the System 800xA to filter by this category.AttributeId = 1 |
| Priority | int32 | Event priority is added to all event categories.AttributeId = 2 |
| BatchId | string[128] | Used by software packages like ProduceIT and DCI to store the batch name for the event. Used for reporting.AttributeId = 3 |
| UnitId | string[128] | Used by packages like Maestro, Mod300 and Batch. Used to determine the piece of equipment that an object belongs to.AttributeId = 4 |
| Area | string[128] | Area of plant like the section/classes. Used to tell where an object belongs.AttributeId = 5 |
| ObjectName | string[64] | Function/component name.AttributeId = 6 |
| ObjectDescription | string[128] | Function/component description.AttributeId = 7 |
| Component | string[64] | Component where the event originated from.AttributeId = 8 |
RTDB specialities
| Property | Type | Description |
|---|---|---|
| InternalEventCategory | uint32 | Internal for RTDB usage. |
| Variable | reference (uint32) to variable instance | Reference to Variable instance. This is not visible in the OpcEventXml class because it will be internally resolved using driver implementation based on event source specific rules. |
| Path | reference (GUID) to path class instance | Reference to Path instance that corresponds to Variable instance (see above). Provides a link to Equipment model. |
| RowInsertionTime | DateTime(UTC) | Indicates when the event has been inserted to this particular database. RTDB-EventForwarder fetches the newest events from the data collector based on this. |
Integrating to 3rd party applications
Non-high availability setup
High availability setup

Updated 5 months ago
