Decoding WinCC Alarm Logging Message Placeholders and APL Associated Values in SIMATIC PCS 7
In SIMATIC PCS 7 WinCC Alarm Logging, message text placeholders formatted as @<Index><Type>%<Format>@ dynamically insert runtime variables into alarms. Placeholders indexed above 100 represent system context, including client computer name (@100%s@), application name (@101%s@), logged-in operator username (@102%s@), and long-term archive comments (@103%s@). Placeholders indexed 1 through 10 represent process-associated values transmitted from controller Alarm_8P blocks. In the PCS 7 Advanced Process Library (APL), associated values 1 through 3 are permanently reserved for SIMATIC BATCH (Batch Name, Batch Step Number, and Batch ID), while associated values 4 through 8 (@4%s@ to @8%s@) map to user-configurable block inputs ExtVal04 through ExtVal08.
Table of Contents
- Executive Summary
- Alarm Logging Message String Syntax: Syntax Rules for @ Placeholders
- System Context Placeholders: Computer Name, Username, and Comments
- Process-Associated Values (AV1 to AV10) via Alarm_8P / Notify_8P
- APL Technological Block Reservations: SIMATIC BATCH Integration
- Mapping Custom User Values to ExtVal04 through ExtVal08 in CFC
- WinCC Alarm Logging Placeholder Formatting Matrix
- Verification
- Special Handling in Dedicated Message Blocks (Event, Event16P)
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
Effective alarm management in SIMATIC PCS 7 requires delivering concise, contextual information to plant operators the instant an abnormal condition occurs. Rather than presenting static alarm texts (e.g. 'Feed pump high vibration'), modern process plants require dynamic contextual enrichment (e.g. 'Feed pump high vibration: 14.2 mm/s, Tripped by Operator: J_DOE on OS_CLIENT_04, Batch: POLY_104'). To achieve this, WinCC Alarm Logging utilizes dynamic text placeholders encapsulated by the @ symbol (e.g. @102%s@, @5R%1.2f@). However, commissioning engineers often struggle to decode the exact mapping rules governing these placeholders and frequently wonder why associated values @1%s@ through @3%s@ behave unexpectedly. This technical guide explains the complete placeholder syntax, details system index codes, and demonstrates how to route custom process values into APL alarm texts.
Alarm Logging Message String Syntax: Syntax Rules for @ Placeholders
Dynamic placeholders in WinCC Alarm Logging conform to a strict syntax structure:
@<Index><Type>%<Format>@
@Delimiters: Encapsulate the dynamic placeholder expression within message text, event text, or origin fields.<Index>: Specifies which associated value or system attribute is referenced:- Indices
1to10: Process-associated values transmitted cyclically from the AS controller. - Indices
100to103: WinCC runtime system attributes. <Type>(Optional Data Type Code): Defines the underlying binary representation:Y= Byte,W= Word,X= Double Word,I= Integer (16-bit),D= Double Integer (32-bit),R= Real (Floating Point),C= Character,s= String.%<Format>(C-Style Printf Specifier): Governs visual rendering (e.g.,%dfor integer,%sfor string,%1.2ffor float with 2 decimals).
System Context Placeholders: Computer Name, Username, and Comments
Placeholders with indices >= 100 are automatically populated by the WinCC client-server operating environment:
@100%s@(Computer Name): Evaluates to the Windows network NetBIOS name of the OS Client or Web Client station where the alarm was acknowledged or generated.@101%s@(Application Name): Displays the name of the executable generating the event (e.g.WinCC_Runtime,SIMATIC_BATCH).@102%s@(User Name): Inserts the login username of the operator logged into the WinCC station when an action or alarm occurs.@103%s@(Comment): Displays operator comments appended to historical alarms during long-term audit trail reviews.
Process-Associated Values (AV1 to AV10) via Alarm_8P / Notify_8P
At the controller level, technological blocks generate alarms by calling the system function block Alarm_8P (SFB35 / FB25) or Notify_8P (FB26):
- Ten Associated Values:
Alarm_8Pprovides ten associated value pins:SD_1,SD_2, ...,SD_10. - Data Capture Synchronization: When an alarm trigger bit transitions from 0 to 1, the CPU latches the instantaneous values present on pins
SD_1throughSD_10in the exact execution cycle of the event, ensuring that transient spikes are captured accurately. - Telegram Transmission: The CPU packages the latched associated values into the alarm telegram sent to the WinCC OS Server.
APL Technological Block Reservations: SIMATIC BATCH Integration
A foundational design rule across the PCS 7 Advanced Process Library (APL) governs technological blocks such as VlvL, MotL, and PIDConL:
- Associated Value 1 (
@1%s@): Permanently reserved for Batch Name. - Associated Value 2 (
@2%d@): Permanently reserved for Batch Step Number. - Associated Value 3 (
@3%d@): Permanently reserved for Batch ID (Recipe ID).
[!IMPORTANT]
Because APL blocks internally wireSD_1,SD_2, andSD_3to SIMATIC BATCH executive structures, engineers must never attempt > to overwrite or map custom plant values into Associated Values 1 through 3 on standard technological blocks.
Mapping Custom User Values to ExtVal04 through ExtVal08 in CFC
To pass custom auxiliary values into an APL block's message stream:
- Expose ExtVal Pins: In CFC, open the target block properties (e.g.
MotL). Expand the inputs and set the desired parameter (ExtVal04,ExtVal05,ExtVal06,ExtVal07, orExtVal08) to visible. - Interconnect Signals: Interconnect the technological process signal (e.g. motor winding temperature, vibration transmitter, or current feedback) to the corresponding
ExtValpin. - Configure Message Text in SIMATIC Manager:
* Select the block in CFC and clickObject Properties -> Messages.
* In the Event text column, insert the placeholder string:Motor Tripped! Temp: @4R%2.1f@ C, Current: @5R%2.1f@ A. - OS Compilation: Run
Compile OSto push the modified message definition into WinCC Alarm Logging.
WinCC Alarm Logging Placeholder Formatting Matrix
The following table provides verified syntax examples and formatting rules across placeholder types:
@100%s@OS_CLIENT_02@102%s@OPERATOR_SMITH@1%s@BATCH_REACTOR_04@2%d@12@4R%2.1f@104.5@5D%d@14250@6X%04X@16#0F2AVerification
To verify that message placeholders populate accurately in WinCC runtime:
- Trigger Test Alarm: In CFC Test Mode, simulate the trip condition on the technological block (e.g. set
Trip = TRUE). - Inspect WinCC Alarm Control: Open the active alarm list in WinCC Runtime.
- Check Text Resolution: Verify that the message text displays actual live numbers and strings rather than raw placeholder syntax (confirming it shows
104.5 Cinstead of literal@4R%2.1f@). - Verify System Context: Confirm that the User column and Computer column display the active operator username and station NetBIOS name.
Special Handling in Dedicated Message Blocks (Event, Event16P)
In dedicated messaging blocks such as Event and Event16P:
- These blocks do not have fixed BATCH reservations on inputs 1 through 3.
- A configurable feature bit determines whether input signal statuses (
In1..In8) or explicit associated value inputs (AV1..AV8) are attached to the alarm telegram. - When using
AV1throughAV8, placeholders@1%s@through@8%s@can be completely customized without restriction.
Limitations and Operational Precautions
Never connect unformatted complex data structures or oversized strings to ExtVal inputs. Alarm_8P limits the total combined size of all associated values in a single telegram to a maximum of 512 bytes; exceeding this limit causes the block to discard values.
Modifying message texts requires an OS compilation. Always perform OS compilation during planned operational windows to avoid interfering with real-time alarming services.
Engineer FAQ
What happens if an associated value is unconnected in CFC?
If ExtVal is unconnected or evaluates to zero, WinCC renders the placeholder as default zero (e.g. '0.0') or leaves a blank string.
Can I display floating point numbers with specific decimal places?
Yes. Use format specifiers such as @4R%1.2f@ for two decimal places, or @4R%1.0f@ for a rounded integer representation.
Why does my message display the literal text '@4R%f@'?
Literal text appears if the placeholder syntax has a typo, if the OS was not recompiled after modifying the message, or if the data type code is mismatched.
Can I use @102%s@ in the message origin field?
Yes. System placeholders can be placed in Event Text, Message Origin, and Area fields across Alarm Logging.