Configuring Process Value Placeholders and Dynamic Message Formatting in SIMATIC PCS 7

Configuring Process Value Placeholders and Dynamic Message Formatting in SIMATIC PCS 7

In SIMATIC PCS 7, dynamic process values are inserted into alarm and message texts using placeholder format strings with the syntax '@%.@'. For example, '@1%2u@' inserts associated process value 1 as an unsigned 2-digit integer, while '@4R%3.1f@ bar' formats associated value 4 as a real floating-point number with three leading digits and one decimal place. To configure these, interconnect process variables to the block's auxiliary value inputs (such as ExtVal01-ExtVal10 on APL blocks or SD_1-SD_10 on ALARM_8P) and insert the formatted placeholders directly into the message text in the STEP 7 Message Configuration dialog.

Table of Contents

Executive Summary

In industrial process automation, operator alarms must provide clear, contextual information rather than static warnings. Operators require not only knowing that a process deviation occurred, but also the exact measured value at the instant of alarm triggering (for example, 'Pressure < Minimum: 123.4 bar' instead of a generic 'Low Pressure Alarm'). In SIMATIC PCS 7, this dynamic context is achieved by binding process values (Begleitwerte) directly to alarm-generating function blocks.

While engineers frequently encounter default placeholders such as @1%2u@ or @2%2u@ in standard library block messages, customizing these strings often causes syntax errors, garbled alarm displays, or blank values in WinCC Alarm Logging. The PCS 7 alarm formatting engine follows strict ANSI C printf formatting specifications combined with Siemens-specific data type qualifiers. This guide explains the complete placeholder syntax, illustrates floating-point and integer formatting rules, and demonstrates how to interconnect auxiliary values in CFC without creating unnecessary WinCC tags.

Architecture and Fundamental Mechanics

The PCS 7 message generation subsystem links controller-level event blocks to WinCC Alarm Logging through structured data records:

  1. S7 Controller Event Blocks and Associated Values:
    - Controller alarms are generated by system blocks such as ALARM_8P (FB19), NOTIFY_8P (FB36), EventTS (FB1886), or technological blocks in the Advanced Process Library (APL, e.g., MonAnL, PIDConL).
    - These blocks feature dedicated associated process value pins: SD_1 through SD_10 (on ALARM_8P) or ExtVal01 through ExtVal10 (on APL blocks).
    - When an alarm transition occurs, the controller packs the current values of these inputs alongside the alarm timestamp and event ID into a communication telegram sent to WinCC via named S7 connections.

  2. Syntax of the Placeholder String:
    - The format string in the message text must be enclosed by at-signs (@):
    @<Index><TypeQualifier>%<Width>.<Precision><FormatSpecifier>@
    - <Index> (1 to 10): Identifies the associated process value input (SD_1 = 1, SD_2 = 2, etc.).
    - <TypeQualifier>: Specifies the underlying S7 data type: R for REAL (floating-point IEEE 754), I for integer, or omitted for default conversion.
    - %<Width>.<Precision><FormatSpecifier>: Standard C format string:

    • %d / %i: Signed decimal integer.
    • %u: Unsigned decimal integer.
    • %f: Floating-point representation.
    • %s: String / text character array.
    • %x / %X: Hexadecimal representation.
  3. Examples of Placeholder Resolution:
    - @1%2u@: Reads value 1, formats as an unsigned integer with minimum width of 2 digits (e.g., 05).
    - @4R%3.1f@: Reads value 4 as a REAL number, displays 3 digits before the decimal and 1 digit after (e.g., 123.4).
    - @2%s@: Reads value 2 as a string and inserts the text directly into the alarm description.

  4. WinCC Runtime Resolution:
    - When WinCC Alarm Logging receives the message telegram, the Split Screen Manager and Alarm Control parse the format strings and evaluate the values stored in the message process value buffer, eliminating runtime SQL queries against process tag archives.

Step-by-Step Implementation Procedure

Follow these steps to configure dynamic process values in PCS 7 message texts:

  1. Interconnect Auxiliary Values in CFC:
    - Open the CFC chart containing the technological or event block (e.g., MonAnL or EventTS).
    - Locate the auxiliary value inputs (e.g., ExtVal04 or SD_4).
    - Connect the output of the process transmitter (e.g., Pressure_Transmitter.PV_Out) to the selected auxiliary input.

  2. Open the STEP 7 Message Configuration Dialog:
    - In the CFC chart, select the block header, right-click, and select 'Object Properties'.
    - In the Properties dialog, click the 'Messages...' button.
    - The 'PCS 7 Message Configuration' window opens, displaying the list of configured messages.

  3. Insert Formatted Placeholders in the Event Text:
    - Locate the target alarm message line (e.g., message SIG_1 for Low Limit Violation).
    - In the 'Event' column, edit the text to include the placeholder string.
    - For example, to display a temperature with one decimal place and unit:
    Reactor Temp Low: @4R%3.1f@ degC
    - For a step number or integer code:
    Sequence Step Error: @1%2u@
    - Click 'OK' to save the message configuration.

  4. Execute AS-OS Compilation:
    - Return to SIMATIC Manager Component View.
    - Right-click the OS project and select 'Compile'.
    - Select 'Changes only' and execute the compilation. The compiler transfers the updated message text templates into the WinCC Alarm Logging database.

  5. Test and Verify in WinCC Runtime:
    - Download CFC changes to the S7 CPU in RUN mode.
    - Trigger the alarm condition and observe the alarm line in the WinCC Alarm List.

Verification

  1. In WinCC Alarm Control, view the incoming alarm list.
  2. Trigger the alarm event: confirm that the alarm message appears with the live numerical value substituted in place of the @...R%...f@ placeholder.
  3. Verify numerical formatting: confirm that decimal places match the configured precision (e.g., 123.4 degC).
  4. Open the Alarm Logging Archive view in WinCC: confirm that historical alarms retain the exact process value captured at the moment of the event.

Limitations and Operational Precautions

Ensure the data type qualifier matches the interconnected signal; passing a REAL value into an integer specifier (%d) without the R qualifier will result in garbage values or *** error strings in the message line. Do not exceed 10 associated values per block. S7 message telegrams limit the total payload size of associated values; passing long string arrays across multiple pins can truncate messages. Engineering software licenses and options should be verified through an authorized Siemens distributor or the Siemens Industry Mall.

Engineer FAQ

What does the 'R' stand for in '@4R%3.1f@'?

The 'R' specifies a REAL (floating-point) data type qualifier for associated process value 4.

Why does my alarm text show '***' instead of the process value?

This occurs when there is a data type mismatch between the connected signal in CFC and the format specifier in the message configuration dialog (e.g., connecting a REAL to a %d integer format).

Do associated process values consume WinCC tag licenses?

No. Associated values are packed directly into the ALARM_8P communication telegram and do not consume WinCC OS process tag licenses.

How many process values can be attached to a single alarm block?

Standard blocks such as ALARM_8P support up to 10 associated process values (SD_1 through SD_10).

Can I insert dynamic string texts into alarm messages?

Yes, by connecting a string variable to an auxiliary input and using the @<Index>%s@ string format specifier.

Technical References

Related Articles

Related Tags

  • Message Configuration
  • ALARM_8P
  • Process Value Placeholders
  • EventTS
  • Alarm Logging
  • PCS 7 V9.1
20 respuestas