Configuring WinCC OPC A&E Server and Custom Event Attribute Mapping

Configuring WinCC OPC A&E Server and Custom Event Attribute Mapping

When a third-party OPC client receives process tags via OPC DA but fails to receive alarm events from the WinCC OPC Alarms and Events (A&E) Server, the issue is caused by missing SIMATIC WinCC/Connectivity Pack licensing, restrictive DCOM access permissions, or unconfigured event subscription filters. Furthermore, the standard OPC A&E event structure populates szSource with the computer/area name and szMessage with the block instance rather than the compiled PCS 7 alarm text. The full descriptive alarm text, event state, and operational attributes reside within WinCC's Vendor-Specific Custom Event Attributes, requiring third-party clients to query QueryEventAttributes to extract complete diagnostic records.

Table of Contents

WinCC OPC A&E Server Architecture and Licensing

The WinCC OPC A&E Server (OPCServer.WinCC-AE) is a standardized COM/DCOM service that exposes real-time process alarms, operator actions, and system events to external supervisory systems (e.g., enterprise alarm historians, paging systems, third-party SCADA).

Unlike OPC Data Access (DA) which is included with base WinCC runtime, OPC Alarms & Events requires the SIMATIC WinCC/Connectivity Pack license key. If the Connectivity Pack license is missing from Automation License Manager (ALM), the OPC A&E server rejects external client subscriptions or terminates after a demo timeout.

Resolving Alarm Transmission Failures to Third-Party Clients

To establish reliable alarm delivery to third-party clients (such as Matrikon OPC Explorer):

Failure MechanismRoot CauseRemediation StepMissing LicenseWinCC Connectivity Pack license missing in ALM.Transfer WinCC/Connectivity Pack license key to the OS server via ALM.DCOM Access DeniedThird-party client user account lacks DCOM launch and access permissions for OPCServer.WinCC-AE.In dcomcnfg, grant Launch, Activation, and Access permissions to the client user account and the SIMATIC HMI group.Event Subscription FilterClient subscription filter set to specific event categories that exclude active process alarms.In the OPC client, set event filter to receive all categories (Simple, Condition, Tracking events).Passive StateClient expects historical alarm log rather than dynamic transition events.Trigger an incoming process alarm to test real-time event transmission.

Understanding Standard Fields vs Custom Event Attributes

Engineers frequently struggle with field mapping in WinCC OPC A&E. The classic OPC A&E specification defines fixed standard fields that do not naturally map to the rich multi-parameter structure of SIMATIC PCS 7 alarms:

Standard OPC A&E Fields:
- szSource:  Displays the Event Provider / WinCC Area Name (e.g., 'localhost' or 'Area_1').
- szMessage: Displays the CFC Block Instance Name (e.g., 'Plant1/UnitA/TI_101/MonAnL').
- Severity:  Displays numerical alarm priority (1 to 1000).
- Time:      Event generation timestamp.

WinCC Custom Event Attributes (Vendor Specific):
The full descriptive message text configured in CFC/Alarm Logging is exposed via Custom Attributes:
- Attribute 1: Process Value at Alarm Time
- Attribute 2: Alarm Class (e.g., 'Alarm High', 'Warning')
- Attribute 3: Message Text / Event Description (The human-readable alarm message!)
- Attribute 4: Batch ID / Step Number

Third-party clients must call IOPCEventServer::QueryEventAttributes and request these custom attribute IDs to display the full descriptive alarm text alongside the block name.

Verification

To verify OPC A&E alarm delivery from WinCC:

  1. Open Matrikon OPC A&E Explorer on the client workstation.
  2. Connect to server OPCServer.WinCC-AE (or OPCServer.WinCC-AE.1).
  3. Create an active subscription for all event categories and check Select All Attributes.
  4. In PCS 7 CFC or WinCC Runtime, force a high-limit process alarm.
  5. Verify that the alarm arrives immediately in the client event window.
  6. Expand the event details: confirm that the custom attributes column displays the compiled PCS 7 alarm text.

Limitations and Operational Precautions

Operational boundaries for OPC A&E:

  • OPC A&E is Event-Driven: OPC A&E does not continuously publish static alarms. Events are only transmitted when a state transition occurs (incoming, outgoing, acknowledged).
  • DCOM Complexity: Connecting across workgroup boundaries requires identical Windows user accounts and passwords on both server and client machines, or deployment within an Active Directory domain.
  • Modern Replacement: For modern DCS deployments, Siemens recommends migrating from classic COM-based OPC A&E to OPC UA (Alarms & Conditions).

Engineer FAQ

Why does WinCC OPC A&E szSource show 'localhost' instead of the PLC name?

By default, the WinCC OPC A&E server reports the local WinCC event provider station as the source. In PCS 7, the exact technological tag hierarchy is mapped into the message attributes.

How can a third-party client read the actual alarm message text?

The client must subscribe to the WinCC Vendor-Specific Custom Event Attributes. WinCC stores the formatted alarm description inside custom attribute fields rather than the standard szMessage field.

Does WinCC OPC A&E require a separate license?

Yes, accessing alarms and events via the WinCC OPC A&E Server requires the SIMATIC WinCC/Connectivity Pack software license installed on the OS Server.

Can OPC A&E acknowledge alarms remotely from the third-party client?

Yes. If the client account has operational rights, it can call the AckCondition() method on the OPC A&E server to acknowledge the alarm in WinCC Runtime.

Technical References

Related Articles

Related Tags

  • OPC-A&E
  • WinCC-Openness
  • Connectivity-Pack
  • Alarm-Logging
  • Custom-Attributes
  • DCOM
8 respuestas