How to Detect Operator Message Locks via OPC in SIMATIC PCS 7

How to Detect Operator Message Locks via OPC in SIMATIC PCS 7

In SIMATIC PCS 7, operator message suppression initiated via the faceplate 'Lock messages' button can be detected over OPC through either WinCC OPC A&C / OPC UA or technological block status words. In WinCC Alarm Logging, locked alarms transition to the 'Locked / Suppressed' state (database state = 4), which is exposed via the OPC UA Alarms & Conditions 'SuppressedOrShelved' condition property. Alternatively, in standard APL blocks, the message suppression state is reflected directly in the PLC status output word (e.g., Status1.Bit22), which can be read over OPC Data Access (DA) as a simple process tag.

Table of Contents

Mechanics of APL Message Locking: PLC vs. HMI Levels

When an operator suppresses alarms for a specific measurement tag or motor on a SIMATIC PCS 7 Operator Station, two distinct mechanisms can be utilized:
1. PLC-Level Message Locking (MsgLock Input): A Boolean pin on the CFC function block (e.g., MotL.MsgLock = 1). This is an engineering input manipulated by interlocking logic or maintenance switches. It suppresses alarm generation inside the controller's ALARM_8P system block.
2. HMI-Level Operator Message Lock (Lock messages Button): The standard faceplate button triggers internal WinCC C-scripts (PCS7_LockMessage.fct invoking CsigAPILockMessage). This operation instructs the WinCC Alarm Logging runtime server to lock all messages associated with that technological object at the supervisory HMI layer, preventing them from populating active alarm banners.

When integrating PCS 7 with a third-party Distributed Control System (such as a Yokogawa CENTUM VP or Honeywell Experion) via OPC, engineers must capture this operator suppression state to ensure unified alarm management.

Detecting Locked Alarms via WinCC OPC A&C and OPC UA

If the third-party supervisory system communicates via OPC Alarms & Conditions (OPC A&C) or OPC UA Part 9 (Alarms and Conditions):

  1. WinCC Alarm Logging Internal State:
    * In the WinCC Microsoft SQL Server message database (ALG), every message event possesses an internal state integer:
    • State = 0: Normal / Inactive.
    • State = 1: Active / Unacknowledged.
    • State = 2: Active / Acknowledged.
    • State = 4: Locked / Suppressed (Sperre).
  2. OPC UA Alarms & Conditions Mapping:
    * The SIMATIC NET WinCC OPC UA Server publishes standardized alarm condition nodes.
    * Under the alarm condition instance, inspect the property SuppressedOrShelved (or SuppressedState).
    * When an operator clicks "Lock messages", SuppressedState.Id transitions to TRUE, confirming active alarm suppression.

Detecting Message Lock via APL Block Status Words over OPC DA

If the third-party DCS connects only via basic OPC Data Access (OPC DA / OPC UA DA) and cannot parse complex alarm condition trees, query the status words of the APL block:

  1. APL Status Word Reflection:
    * Modern APL blocks (V8.x, V9.x) transmit their comprehensive operational state to the OS via double-word status tags (Status1, Status2, Status3).
    * In blocks such as MotL, VlvL, and MonAnL, internal logic reflects active message locking directly into the status bits:
    • Status1.Bit22 (or designated MsgLock status bit): Evaluates whether alarms for this specific block instance are actively locked.
  2. Reading via OPC DA:
    * In the OPC DA client, browse the WinCC Tag Management hierarchy:
    OS_Server::PlantHierarchy/Motor_01.Status1
    * Read the 32-bit unsigned integer value. Apply a bitmask (16#00400000 for Bit 22) in the third-party DCS to determine if the message lock is active.

Verification

  • In the PCS 7 OS runtime, open the faceplate for a test motor (MotL).
  • Click the Lock messages button in the faceplate header.
  • In the third-party OPC client:
  • If using OPC UA A&C: Verify that the condition node for Motor_01 reports SuppressedState = TRUE.
  • If using OPC DA: Verify that bit 22 of tag Motor_01.Status1 transitions from 0 to 1.
  • In WinCC Runtime, click Unlock messages. Confirm that the OPC variables revert to normal unlocked states.

Limitations and Operational Precautions

  • Locking messages at the WinCC HMI level does not stop the PLC ALARM_8P block from executing; it merely suppresses visualization in the alarm banner and horn activation.
  • If a project uses legacy Classic Library blocks, status words do not include modern APL bit structures, requiring OPC A&C evaluation.
  • Ensure that the third-party DCS respects ANSI/ISA-18.2 alarm shelving and suppression audit standards when reflecting suppressed alarms.

Engineer FAQ

  • Can I read the locked alarm state from an internal WinCC tag?
    WinCC does not generate an individual internal tag per message lock. The lock state is maintained dynamically within the Alarm Logging runtime memory and SQL tables, which is why OPC A&C or block status words are required.
  • What C-script function is executed by the faceplate button?
    The button executes PCS7_LockMessage.fct, which calls the private API CsigAPILockMessage provided by the WinCC basic process control subsystem (s7hmi).
  • Does OPC UA DA support reading individual bits of Status1?
    Standard OPC DA servers expose Status1 as a 32-bit integer (DWORD). The receiving DCS must execute a bitwise AND operation (Status1 & (1 << 22)) to extract the individual Boolean flag.

Technical References

  • SIMATIC WinCC V7/V8 OPC UA Server Manual (A5E41356345-AA).
  • SIMATIC PCS 7 Advanced Process Library (APL) Function Manual (A5E43360408-AA).
  • OPC Unified Architecture Part 9: Alarms and Conditions Specification (IEC 62541-9).

Related Articles

Related Tags

PCS 7, WinCC, OPC UA, OPC A&C, OPC DA, Message Lock, Alarm Logging, APL

20 respuestas