Dynamically Integrating Text Library Strings into PCS 7 Alarm Messages via Associated Values
In SIMATIC PCS 7 Alarm Logging, dynamically inserting text strings from a user Text Library into alarm messages—such as pulling dynamic unit names into MonDiL messages—is achieved using associated value placeholders with the syntax '@W%t#@'. The integer 'W' specifies the associated value index (where 4W corresponds to ExtVal104 on APL blocks), which dynamically indexes the target row within the Text Library, requiring both HW Config and OS compilations to update message dictionaries.
Table of Contents
- Architecture of Dynamic Alarm Message Formatting in SIMATIC PCS 7
- Syntax of Text Library Placeholders: @W%t#LibraryName@
- Mapping APL Associated Values: ExtVal Inputs on MonDiL and Technological Blocks
- Compiling and Deploying Text Libraries Across AS, HW Config, and OS
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Architecture of Dynamic Alarm Message Formatting in SIMATIC PCS 7
Standardizing alarm texts across hundreds of identical technological units (e.g., copying a boiler CFC chart to 10 boilers) frequently requires customizing alarm strings so operators immediately recognize the physical asset:
* Instead of manually editing static message texts on hundreds of individual blocks (e.g., changing Boiler 1A High Temp to Boiler 2B High Temp), PCS 7 supports Dynamic Text Library Placeholders.
* Associated Values: When a technological block triggers an alarm via ALARM_8P, it transmits up to 10 associated process values (SD_1 to SD_10).
* Text Library Integration: By referencing a central user Text Library, an integer value passed into an associated value input dynamically selects and displays the corresponding text string in the WinCC alarm banner.
Syntax of Text Library Placeholders: @W%t#LibraryName@
The STEP 7 and WinCC message formatting engine evaluates standardized placeholder syntax:
$$\mathbf{@W\%t#@}$$
* <n>W: Specifies which associated process value contains the row index:
* 1W = 1st Associated Value (SD_1)
* 2W = 2nd Associated Value (SD_2)
* 3W = 3rd Associated Value (SD_3)
* 4W = 4th Associated Value (SD_4)
* %t: The type specifier designating that the referenced value should be treated as a text library index lookup.
* #<TextLibraryName>: The exact name of the user text library created in SIMATIC Manager.
* Example: In a message configured as:
text
Boiler @4W%t#UnitNames@ High Pressure
If associated value 4 contains integer 2, and Row 2 of Text Library UnitNames contains "2B", the rendered WinCC alarm displays:
text
Boiler 2B High Pressure
Mapping APL Associated Values: ExtVal Inputs on MonDiL and Technological Blocks
In the PCS 7 Advanced Process Library (APL), blocks like MonDiL (FB1847) pre-assign associated values for batch and process tracking:
* Associated Value 1 (1W): BatchName (String).
* Associated Value 2 (2W): StepNo (DINT - Batch Step Number).
* Associated Value 3 (3W): BatchID (DINT - Batch Identifier).
* Associated Value 4 (4W): ExtVal104 (Any / Int - External Value 4).
* Associated Value 5–10 (5W..10W): ExtVal105 through ExtVal110.
* Therefore, when using standard APL blocks, connect your text index integer to pin ExtVal104 and use placeholder @4W%t#LibraryName@.
Compiling and Deploying Text Libraries Across AS, HW Config, and OS
For dynamic text placeholders to function properly, the project must undergo a specific compilation sequence:
1. Create User Text Library:
* In SIMATIC Manager, select the S7 Program folder.
* Open Options -> Manage Multilingual Texts -> Text Library (or create a user text table under project properties).
* Define integer index keys (e.g., 1 = 1A, 2 = 2B, 3 = 3C) and enter translations for each runtime language.
2. Configure Message Placeholder in Block Type:
* In the CFC block properties (or SCL source), insert the placeholder string into the message text definition.
3. Hardware and OS Compilation Requirements:
* HW Config Compilation: Text library identifiers are bound to system data blocks; execute Station -> Save and Compile in HW Config and download to the controller.
* OS Compilation: Execute an AS-OS compile. The compiler transfers user text libraries into the WinCC Alarm Logging database (TextBib).
Verification
- In CFC dynamic test mode, assign integer value
2toMonDiL.ExtVal104. - Toggle the digital input to trigger an alarm.
- In WinCC OS runtime, open the active alarm list:
- Verify that the alarm message displays the dynamic text from Row 2 (e.g., "Boiler 2B High Pressure").
- Change
ExtVal104to3and re-trigger: confirm that the alarm updates to display "Boiler 3C High Pressure". - Switch WinCC runtime language to German: verify that the message displays the German translation defined in the Text Library.
Limitations and Operational Precautions
- If
ExtVal104passes an integer index that does not exist in the Text Library, WinCC displays the raw placeholder string (e.g.,@4W%t#UnitNames@) or an empty string. - Avoid using spaces or special characters in the text library name; stick to alphanumeric identifiers (e.g.,
UnitNames,AreaTexts). - In high-throughput sequence of events (SOE) systems, dynamic string lookups add minor processing overhead to the OS alarm logger; use pre-allocated static texts for millisecond safety trips.
Engineer FAQ
- What does the 4W signify in @4W%t#TextLib@?
It specifies that Associated Process Value 4 (ExtVal104 on APL blocks) supplies the row index number. - Which pin on APL MonDiL receives the text library index integer?
The input parameterExtVal104. - Why does the alarm display the raw placeholder text instead of the library string?
The text library was not compiled into WinCC OS, the library name was misspelled, or the index integer does not exist in the library. - Why must HW Config be compiled when modifying text libraries?
Because text library cross-reference bindings are stored in controller System Data Blocks (SDBs) generated during hardware compilation. - Can a user text library hold multilingual translations?
Yes, each row key can contain translated text strings for all project languages configured in WinCC. - What is the maximum number of associated values supported by an ALARM_8P block?
StandardALARM_8Pblocks support up to 10 associated process values (SD_1toSD_10). - Where are user text libraries created in SIMATIC Manager?
In SIMATIC Manager under the S7 Program folder via Options -> Text Libraries. - Can I use floating-point REAL variables as text library indexes?
No, text library row indexes must be integers (INTorDINT). - Does using dynamic text libraries consume additional WinCC Process Objects?
No, dynamic message formatting is an internal Alarm Logging feature that consumes zero additional process objects. - What happens if ExtVal104 is left unconnected in CFC?
The value defaults to 0, pulling the text entry defined at index 0 of the text library.
Technical References
- SIMATIC STEP 7 V5.6 Programming with STEP 7 Manual (Message Configuration)
- SIMATIC PCS 7 Advanced Process Library (APL) Function Manual
- Siemens Industry Online Support Entry: Text Library Placeholders in Alarm Messages (Entry ID 299715)
- SIMATIC HMI WinCC V7.5 Alarm Logging System Manual
Related Articles
- Configuring and Managing Alarm Logging and Message Systems in SIMATIC PCS 7 OS
- Troubleshooting Missing Interlock Text Displays on WinCC APL Faceplates in PCS 7
Related Tags
PCS 7, Alarm Logging, Text Library, MonDiL, Associated Values, Placeholders, ExtVal104, ALARM_8P, WinCC, Messages