Programmatic Alarm Acknowledgment in PCS 7 and Preventing OS Compilation Overwriting in Alarm Logging
In SIMATIC PCS 7, attempting to acknowledge WinCC alarms from PLC logic by manually configuring 'Acknowledgment tag and Acknowledgment bit' inside WinCC Alarm Logging Message Groups fails because every OS Compilation completely overwrites manual changes in Alarm Logging. To acknowledge alarms programmatically from PLC logic (such as an external DCS or panel pushbutton) without OS compile conflicts: 1) Use the built-in APL block mechanism by interconnecting a central acknowledgment bit to input parameter AckLi on technological blocks (MotL, VlvL, MonAnL). 2) Alternatively, configure the WinCC Horn Editor (@Horn) with an acknowledgment tag mapped to an AS binary tag. 3) For global HMI acknowledgment, create a WinCC Global Script C-Action triggered upon change of a binary AS tag that calls AcknowledgeAllPicture() or the standard WinCC acknowledgment API.
Table of Contents
- Executive Summary
- Architecture and Fundamental Mechanics
- Step-by-Step Implementation Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
Plant integration specifications frequently demand a centralized remote alarm acknowledgment function, enabling an external control room, third-party DCS, or physical emergency panel pushbutton to acknowledge all active alarms in SIMATIC PCS 7 WinCC. When engineers implement this by manually assigning acknowledgment tags within WinCC Explorer's Alarm Logging message groups, the feature operates temporarily but is wiped out the moment an OS Compilation is executed from SIMATIC Manager. Because PCS 7 enforces automated message management, all manual Alarm Logging modifications are systematically overwritten. This article provides the supported architectures for programmatic alarm acknowledgment.
Architecture and Fundamental Mechanics
The SIMATIC PCS 7 message system is strictly centralized and automated:
1. Message Generation in the AS: Every technological block (e.g., MotL, MonAnL) embeds dedicated ALARM_8P instances. The compiler assigns message numbers, classes, and attributes during CFC compilation.
2. OS Compilation Mechanics: When 'Compile OS' runs on the ES, the compiler deletes existing technological message records in the WinCC Alarm Logging database and regenerates them from the AS database. Consequently, any manual configuration (such as custom acknowledgment tags, message group edits, or color alterations) within WinCC Alarm Logging is overwritten.
Approved Methods for Logic-Driven Acknowledgment:
- Method 1: Controller-Level APL Acknowledgment (AckLi):
Standard APL blocks provide two acknowledgment pins: AckOp (Operator acknowledgment from faceplate) and AckLi (Acknowledgment via Link / logic). Applying a 1-second pulse to AckLi on all technological blocks instructs the AS to acknowledge the alarm locally and transmit an acknowledged telegram to WinCC, ensuring 100% compile immunity.
- Method 2: WinCC Horn Acknowledgment Tag:
The WinCC Horn component (@Horn) is designed to handle acoustic and optical signaling. It includes a native 'Acknowledgment Tag' configuration in its system settings. When the mapped AS tag toggles from 0 to 1, WinCC Horn executes a system-wide acknowledgment call.
- Method 3: Global Script Action with SSM Acknowledgment Function:
A WinCC C-Script action triggered 'Upon Change' of an AS binary tag evaluates when the tag transitions to 1. The script calls the Split Screen Manager (SSM) API AcknowledgeAllPicture(szPictureName) or the WinCC AlarmControl acknowledgment command, acknowledging alarms visible in the active screen or area.
Step-by-Step Implementation Procedure
-
Implement Controller-Level APL Acknowledgment (Recommended):
a. In SIMATIC Manager, create a central acknowledgment logic chart in CFC.
b. Connect the external digital input (from third-party DCS or panel) to a pulse generator block (e.g.,PulseorTimerPset to 1.0 second).
c. Interconnect the pulsed output to theAckLiinput parameter of all technological blocks (MotL,VlvL,MonAnL,PIDConL).
d. When the external signal triggers, all blocks acknowledge simultaneously in the AS, updating WinCC cleanly without compile dependency. -
Alternative: Configure WinCC Horn Acknowledgment:
a. In WinCC Explorer, open the 'Horn' editor.
b. Navigate to the 'Acknowledgment' tab.
c. In the 'Tag name' field, browse and select the binary AS tag designated for remote acknowledgment.
d. Check 'Acknowledge horn and alarms' if simultaneous acoustic and visual acknowledgment is desired.
e. Save the Horn configuration. Horn settings are preserved across OS compilations. -
Alternative: Create WinCC Global Script Action:
a. In WinCC Explorer, openGlobal Script -> C-Editor.
b. ClickFile -> New Action.
c. Insert the acknowledgment routine:
c #include "apdefap.h" void OnActivated(char* lpszPictureName) { char szPictureName[_MAX_PATH] = ""; SSMGetWorkFieldPicture(SSMGetScreen("@Screen"), szPictureName, sizeof(szPictureName)); if (szPictureName[0] != '\0') { AcknowledgeAllPicture(szPictureName); } }
d. Click the 'Trigger' icon, select 'Tag', select the binary AS acknowledgment tag, and set the cycle to 'Upon Change'.
e. Save the action asRemote_Alarm_Ack.pasand compile.
Verification
- In CFC test mode or field operation, trip an analog alarm on a MonAnL block: confirm the alarm appears as unacknowledged (flashing) in WinCC AlarmControl.
- Pulse the external acknowledgment digital bit:
- If using Method 1 (AckLi): verify the block'sAckActoutput pulses and the alarm transitions to acknowledged in WinCC.
- If using Method 2 (Horn): confirm the audible horn silences and the alarm row stops flashing.
- If using Method 3 (Global Script): verify thatAcknowledgeAllPictureexecutes and all alarms in the active window acknowledge. - Execute a complete OS compilation from SIMATIC Manager: confirm that the programmatic acknowledgment functionality remains 100% operational post-compile.
Limitations and Operational Precautions
Pulsing AckLi on hundreds of blocks simultaneously across multiple AS controllers generates a brief surge of communication telegrams on the Plant Bus; stagger pulses across execution groups if network bandwidth is constrained. Global C-script actions using AcknowledgeAllPicture only acknowledge alarms associated with the currently displayed graphic window or configured picture hierarchy.
Engineer FAQ
Why does OS compilation overwrite my Alarm Logging message groups?
PCS 7 OS compilation enforces database consistency by automatically rebuilding WinCC Alarm Logging from CFC block instances, erasing manual modifications.
What is the difference between AckOp and AckLi on APL blocks?
AckOp is an internal parameter used by operator faceplates for manual acknowledgment, while AckLi is an interconnectable parameter designed for programmatic logic acknowledgment.
Does acknowledging via Horn Editor survive OS compilation?
Yes. The WinCC Horn configuration resides in independent configuration tables that are not overwritten during standard OS compilation.
Can I acknowledge alarms across multiple OS Clients with a single PLC bit?
Yes. If using Method 1 (AckLi), the AS broadcasts the acknowledged status to all connected OS Servers and Clients simultaneously.
Why did my Global Script stop working after restarting WinCC?
Ensure that 'Global Script Runtime' is checked in the WinCC Explorer Computer Properties -> Startup list.
Technical References
- SIMATIC PCS 7 Advanced Process Library (APL) Function Manual (V9.0 SP2)
- SIMATIC PCS 7 Operator Station Alarm Logging Configuration Manual
- WinCC Split Screen Manager and Horn Configuration Reference Guide
Related Articles
- Identifying Profibus Alarm Origin Between CEMAT C_DRV_1D, SIMOCODE, and SINAMICS Blocks and Interpreting Status Codes
- Resolving Time Discrepancies and UTC Offsets Between WinCC Alarm Logging and OS System Clocks
- Customizing WinCC Picture Tree selection colors and preventing OS compile overwriting of @PTN0.pdl and @logo.pdl
Related Tags
- Alarm Acknowledgment
- AckLi
- OS Compilation
- WinCC Horn
- Global Script
- Alarm Logging