Troubleshooting Siemens DBA OPC Alarm Triggers: External Tag Mapping and EventRaw Configuration in WinCC OS
When integrating external OPC servers (such as HIMA safety systems) into SIMATIC PCS 7 WinCC OS using Siemens Database Automation (DBA), alarms failing to trigger from external tags (.ALM) while working on internal tags is caused by an OPC update event mismatch or quality code rejection. In WinCC Alarm Logging and DBA, messages mapped to EventRaw#1 evaluate raw bit transitions triggered on change. If the OPC server delivers tags with Uncertain or Bad Quality Codes, or if the WinCC OPC DA channel is configured for Cyclic continuous without change-event notification, WinCC ignores the state transition. Configuring the OPC tag with Good quality (0xC0) and enabling proper event evaluation in DBA resolves the alarm triggering.
Table of Contents
- Role of Siemens DBA in Integrating Third-Party Controllers into WinCC
- Architecture of EventRaw and Message Triggering in DBA
- Why Internal Tags Trigger Alarms While External OPC Tags Fail
- OPC Quality Codes and WinCC Alarm Logging Evaluation Rules
- Comparative Trigger Matrix: Internal vs External OPC Tags in Siemens DBA
- Step-by-Step Diagnostic and Configuration Procedure for OPC Alarms
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Role of Siemens DBA in Integrating Third-Party Controllers into WinCC
In industrial facilities utilizing multi-vendor automation architectures, non-Siemens controllers—such as HIMA safety PLCs, Triconex SIS, or Schneider Electric systems—must integrate into the centralized SIMATIC PCS 7 WinCC supervisory environment. Siemens DBA (Database Automation) is the specialized engineering utility used to import tag structures, alarm messages, and technological types from third-party sources or OPC servers into WinCC OS.
DBA automates the creation of WinCC Tag Management variables, Alarm Logging messages, and Picture Tree navigation nodes, ensuring that third-party alarms appear identically to native PCS 7 APL alarms in the OS alarm banner.
Architecture of EventRaw and Message Triggering in DBA
In Siemens DBA, messages are frequently linked using the EventRaw bitmask mechanism:
- Instead of creating individual single-bit tags for every possible alarm, DBA packs multiple alarm states into a raw integer tag (e.g.
EventRaw#1, Data Type:DWORD). - Each bit in
EventRaw#1corresponds to a specific message number defined in WinCC Alarm Logging. - When the external OPC tag (e.g.,
.ALM) updates, DBA or WinCC Alarm Logging evaluates bit transitions (0 -> 1 for alarm incoming, 1 -> 0 for alarm outgoing). - If an engineer tests the structure by driving an internal WinCC tag, the WinCC Data Manager immediately notifies Alarm Logging. However, external OPC tags follow a different communication lifecycle.
Why Internal Tags Trigger Alarms While External OPC Tags Fail
When .ALM triggers alarms as an internal tag but fails as an external OPC tag, three root causes are typically identified:
-
OPC Channel Quality Code Rejection: WinCC Alarm Logging strictly requires an OPC Quality Code of
Good(0xC0or0x80). If the HIMA OPC Server transmits the.ALMtag with qualityUncertain(0x40) orBad(0x00), WinCC discards value transitions. -
Cyclic Polling vs Event-Driven Change: If the WinCC OPC DA communication channel is configured for pure cyclic reading without subscribing to DataChange events, rapid bit pulses can be missed between scan cycles.
-
DBA Tag Prefix and Object Hierarchy Mismatch: In DBA, if the external tag address is incorrectly mapped to an absolute OPC item ID or lacks the proper server prefix, the OPC client channel creates an uninitialized tag in WinCC Tag Management that never receives live updates.
OPC Quality Codes and WinCC Alarm Logging Evaluation Rules
The WinCC Alarm Logging engine enforces deterministic safety filtering:
- Messages configured with 'Trigger on change' evaluate transitions only when
QualityCode == 0xC0. - If an OPC connection flickers, the OPC channel writes
QualityCode = 0x18(Connection Failure). Alarm Logging does not treat this as a message incoming event. - If the OPC tag is mapped via an intermediate C-script or internal helper tag, ensure the script explicitly forwards the value change upon every update event.
Comparative Trigger Matrix: Internal vs External OPC Tags in Siemens DBA
The following table compares characteristics between internal test tags and external OPC tags in DBA:
0x80 / 0xC0)0x00, Tag FrozenStep-by-Step Diagnostic and Configuration Procedure for OPC Alarms
Follow this troubleshooting procedure to resolve OPC alarm triggering in DBA and WinCC:
- Audit Live OPC Tag in WinCC: Open WinCC Tag Management -> select the OPC channel. Locate
.ALM. In runtime, check the Value and Quality Code columns using WinCC Channel Diagnosis (WinCC_Sys_01.logor Channel Diagnosis tool). Verify Quality is0xC0(Good). - Verify OPC Item ID in HIMA Server: Open an independent OPC test client (e.g., Siemens OPC Scout or Matrikon OPC Explorer). Connect to the HIMA OPC Server. Ensure the Item ID matches the address configured in DBA character-for-character.
- Check DBA Message Definition: In Siemens DBA, open the AS-OS mapping editor. Select the technological block type. Under Messages, verify that Message 1 is assigned to bit 0 of
EventRaw#1, Message 2 to bit 1, etc. - Compile DBA to WinCC: In DBA, execute Compile OS. Confirm 0 compilation warnings regarding unresolved message tags.
- Alarm Logging Trigger Check: In WinCC Explorer, open Alarm Logging. Select the message. In the properties grid, confirm the Message Tag points to the imported external tag, and the trigger is set to 'Upon change'.
- Runtime Test: Force the alarm bit in the HIMA controller. Confirm the alarm appears instantaneously in the WinCC Alarm Control banner.
Verification
Validate system resolution using these verification checks:
- Channel Diagnosis Audit: Open
WinCC Channel Diagnosis. Under OPC Channel, confirm Connection State: OK and zero error counters. - Alarm Banner Validation: Trigger an external alarm in HIMA. Verify the alarm arrives in the OS incoming alarm list with correct timestamp and message text.
- Alarm Reset / Outgoing Test: Clear the alarm bit in HIMA. Verify the alarm transitions to outgoing state in the WinCC Alarm journal.
- Acknowledgment Handshake: Acknowledge the alarm on the WinCC OS Client. If bidirectional acknowledgment is configured in DBA, verify the ACK signal writes back to the OPC server.
Limitations and Operational Precautions
Observe the following engineering constraints:
-
OPC DA COM/DCOM Settings: If the HIMA OPC server runs on a separate PC, configure Windows DCOM permissions (
dcomcnfg) with matching user accounts to prevent intermittent quality code drops. -
Time Synchronization: Ensure the HIMA system and WinCC OS are synchronized to a common NTP clock master to prevent out-of-order alarm journaling.
-
Commercial Accuracy Disclaimer: Software order numbers (MLFBs), package structures, and hardware capacity prerequisites vary across PCS 7 versions and hardware platforms. System integrators must confirm exact software entitlements and licensing requirements against the official Siemens Catalog CA 01 and obtain an authorized Siemens distributor quotation prior to purchasing.
Engineer FAQ
How do I check the Quality Code of an OPC tag in WinCC Runtime?
Open the WinCC Channel Diagnosis tool (WinCC_Sys_01.log or Channel Diagnosis application), or monitor the tag's Quality Code in WinCC Tag Management.
Can DBA automatically create WinCC faceplates for third-party blocks?
Yes, DBA allows engineers to map third-party PLC types to WinCC customized block icons and standard faceplates.
Does importing OPC tags via DBA consume WinCC tag licenses?
Yes, every external tag imported from an OPC server counts against the installed WinCC OS Runtime Tag license limit (e.g. 2048, 8192, or 65536 PowerTags).
Technical References
- SIMATIC PCS 7 Siemens DBA (Database Automation) User Manual (Entry ID: 109746516)
- SIMATIC WinCC V7.4 / V7.5 WinCC Information System: OPC Channel Configuration (Entry ID: 109746517)
- Siemens Industry Online Support (SIOS) FAQ: Integrating Third-Party Controllers via DBA (Entry ID: 109740190)
- OPC Data Access (OPC DA) 3.00 Specification (Entry ID: 109751825)
Related Articles
- Configuring WinCC Alarm Logging Segmentation, Automatic Backup, and Long-Term Archiving in SIMATIC PCS 7
- Resolving PH-Ready Error in WinCC OS - WinCC Alarm System Not Initialized (Message 1003071)
- Diagnosing 'F' Symbol on PCS 7 APL Block Icons - Bit 24-25 in EventState
Related Tags
- SIMATIC PCS 7
- Siemens DBA
- WinCC Alarm Logging
- OPC DA
- HIMA OPC
- EventRaw
- Quality Code
- Alarm Trigger