WinCC Loop-in Alarm: Bulk Configuration for STEP 7 PLC Alarms

David Krause11 min read
SiemensTutorial / How-toWinCC
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

Loop-in alarm is a navigation aid in WinCC that automatically opens the associated process picture (or faceplate) when an operator clicks an active alarm row in the alarm view. In WinCC projects integrated with STEP 7 (classic STEP 7 V5.x with WinCC V7.x, or TIA Portal with WinCC Professional/Comfort), message numbers are generated automatically during OS compilation. The loop-in-alarm property must therefore be assigned after the OS compilation has produced the alarm logging database, either per message or, more efficiently, via the bulk export/import workflow described below.

This reference covers the inspector-based single-message configuration, the export/import bulk workflow (used for >1000 messages), the function-name swap to LoopInAlarm, the WinCC Unified equivalent, and a verification procedure.

Prerequisites

  • WinCC V7.x integrated in STEP 7 V5.5/SPx (classic), or WinCC Professional / WinCC Unified in TIA Portal V15.1 or later.
  • An HMI device or OS server that has completed at least one OS compilation so the alarm logging database is populated.
  • Process pictures (PDL/.f(files) for WinCC V7, or screens for WinCC Professional/Unified) compiled into the active project. The picture name entered as the loop-in target must match the compiled picture name exactly.
  • Edit rights to the alarm logging editor and to the project graphics folder.
  • For WinCC Unified: a configured connection to the PLC and a working alarm control in a screen.
Message numbering is system-driven. In WinCC integrated with STEP 7, message numbers are derived from the STEP 7 source (e.g., Alarm_8, Alarm_8P, Notific_8P, SFB 33–35, or the TIA "Program_Alarm" blocks). The mapping between STEP 7 alarm number and WinCC message number is fixed once the OS is compiled. Do not attempt to edit the number itself; edit the Loop-in Alarm column instead.

Single-Message Loop-in-Alarm Configuration

Use the alarm logging editor to assign loop-in alarm for one message at a time. This is the recommended method for spot-fixing a handful of messages or for verifying the configuration before bulk-applying it.

  1. Open the WinCC Explorer and launch the Alarm Logging editor.
  2. Select the Messages node. The grid shows the generated message numbers, the STEP 7 source tag, classes, and event text.
  3. Scroll horizontally to the Loop in Alarm column. The column is empty by default after OS compilation.
  4. Click the cell for the target message. In the right-hand Variables/Actions frame you will see the LoopInAlarm editor pane.
  5. Select the picture (PDL/faceplate) you want to open when the operator clicks the alarm. The picture list is populated from the active WinCC project; ensure the picture has been compiled.
  6. Confirm. The picture name is written into the Loop in Alarm column of the selected message row.

For TIA Portal / WinCC Professional, the equivalent workflow uses the Inspector window:

  1. Open the HMI device in the project tree and select Alarms > Discrete Alarms (or Analog Alarms, depending on the alarm type).
  2. Select the target alarm row.
  3. In the Inspector window, open Properties > Events > Loop-In-Alarm.
  4. Attach the ActivateScreen system function and choose the destination screen from the dropdown.
  5. Compile the HMI station to push the change to the runtime database.

This is documented in the Siemens Basic Panels / WinCC help portal article on Configuring loop-in alarm (Basic Panels and WinCC).

Bulk Configuration via Export/Import

For projects with hundreds or thousands of messages, manual cell-by-cell editing is impractical. The supported bulk workflow uses the alarm logging export/import feature to apply the Loop in Alarm column for many messages at once.

Step 1: Export the alarm logging database

  1. In Alarm Logging, right-click the Messages node and choose Export.
  2. Select a CSV file (preferred) and a target path on the engineering station. Keep the file in a version-controlled directory so changes are reviewable.
  3. Open the CSV in a spreadsheet editor. The relevant columns are Number (the generated message number), Class, Event, and Loop in Alarm (the destination picture name).

Step 2: Map messages to destination pictures

Use the spreadsheet to fill the Loop in Alarm column according to the engineering intent. Typical patterns:

Source tag prefix / message class Target picture Example
Motor / drive alarms Faceplate_Motor.pdl All Motor_* class alarms navigate to the motor faceplate
Valve alarms Faceplate_Valve.pdl All Valve_* class alarms navigate to the valve faceplate
Process unit alarms Overview_Unit_X.pdl Unit-tagged alarms open the unit overview
System diagnostics Diag_System.pdl CPU/HMI fault classes

You can use spreadsheet formulas (e.g., =IF(LEFT(A2,5)="Motor","Faceplate_Motor.pdl", ... )) to populate the column based on the STEP 7 source identifier. Validate the formula results before saving — a misspelled picture name silently disables loop-in alarm at runtime.

Picture name must match exactly. WinCC compares the string in the Loop in Alarm column against the compiled picture name in the project. A trailing .pdl in WinCC V7, or a missing .pdl if the runtime strips extensions, will cause the loop-in to fail silently. Use the same name format you see in the WinCC Explorer Graphics Designer node.

Step 3: Import the modified CSV

  1. Save the CSV (UTF-8, no BOM preferred; tab or semicolon delimiter depending on locale).
  2. Back up the current alarm logging database (File > Save As) before importing.
  3. Right-click the Messages node and choose Import. Select the modified CSV.
  4. Review the import report. WinCC will list rows that were rejected (e.g., unknown message number, invalid picture name). Fix the offending rows and re-import the corrected subset.
  5. Compile the OS / HMI station to regenerate the runtime database.

Function-Name Swap: Open Picture vs. Loop-in Alarm

The Split Screen Manager function library in WinCC V7 contains a configurable function called Open Picture in the standard function tree. To make a single picture callable from the alarm control with the right context (i.e., as a loop-in alarm and not just a generic "open"), the function name in the project must be LoopInAlarm and the function must be wired to the alarm control's OnOperatorInput / LoopInAlarm event.

  1. Open the Split Screen Manager in the project tree: Standard functions > Split Screen Manager > LoopIn > Alarm.
  2. Locate the function entry that opens the picture. By default it is named Open Picture.
  3. Rename it to LoopInAlarm. The rename must be in the project tree (not only in graphics) so that the runtime function dispatcher recognizes the standard name.
  4. Verify that the function triggers OpenPicture() or SSMOpenScreen() with the picture name passed as the loop-in argument.

If the function is left as Open Picture, the alarm control's "Loop-In" button will still respond, but the runtime will open a static picture rather than dispatching the message-specific context (instance name, area ID) to the faceplate. This is the most common cause of "loop-in opens the wrong screen" or "loop-in does not pass tag context" complaints.

Script-Based Approach: Why It Is Discouraged

WinCC VBS / ANSI-C can be used to set the LoopInAlarm field programmatically via the alarm logging automation interface (e.g., HMIRuntime.AlarmLogging in WinCC Professional). However, the inbuilt export/import workflow is preferred for the following reasons:

  • Scripted changes made at runtime are volatile: a re-compile of the OS wipes them.
  • Audit and change-control: the CSV file is a textual artifact that can be diffed and reviewed; scripts cannot be reviewed row-by-row.
  • Validation: the import wizard runs schema checks and reports bad rows; scripts do not.
  • Performance: editing >1000 rows via automation is slower than the bulk CSV path on a typical engineering station.

If a script is unavoidable (e.g., the picture name must be derived from runtime data), use the engineering-side automation interface, persist the result, and commit the CSV as part of the change record.

WinCC Unified / TIA Portal V20 Equivalent

In WinCC Unified, PLC alarms configured in STEP 7 are applied to the integrated WinCC operation as soon as a connection is established to the PLC, and the WinCC engineering side will automatically update the alarm configuration when the STEP 7 source changes. See the Siemens TIA Portal V20 documentation page on User-defined PLC alarms (RT Unified) for the current behavior.

Aspect WinCC V7 (classic) WinCC Professional / Unified (TIA)
Alarm editor Standalone Alarm Logging tool inside WinCC Explorer HMI alarms & PLC alarms in the TIA project tree
Loop-in configuration UI Grid column "Loop in Alarm" + Variables/Actions pane Inspector > Properties > Events > Loop-In-Alarm
System function to call LoopInAlarm standard function (Split Screen Manager) ActivateScreen system function
Bulk edit mechanism CSV export/import from Alarm Logging Openness API (C#/VB) or TIA scripting; manual grid edit
Message number source STEP 7 V5.x message configuration + OS compile STEP 7 (TIA) alarm blocks (Program_Alarm, etc.) + HMI compile

Verification

  1. Re-open Alarm Logging (or the TIA alarm editor) and confirm the Loop in Alarm column is populated for the expected rows.
  2. Compile the OS / HMI station and start WinCC Runtime.
  3. Trigger the configured alarm from the STEP 7 side (e.g., set the ACK/IN input of the Alarm_8 instance).
  4. In the alarm control, double-click (or press the Loop-In button) on the active alarm row. The configured picture must open.
  5. If the picture has placeholder tags, verify that the tag context (instance DB, area ID) is passed correctly. In WinCC V7 this is controlled by the LoopInAlarm function's tag-binding block; in WinCC Professional/Unified it is bound by the faceplate interface.
  6. Test at least one alarm per picture, including alarms with multiple instances, to confirm the dispatcher routes correctly.

Troubleshooting Matrix

Symptom Likely cause Action
Loop-in button is grayed out in the alarm control Function LoopInAlarm not configured in the Split Screen Manager Rename the standard function to LoopInAlarm per the Function-Name Swap section
Clicking the loop-in button opens the start picture instead of the configured picture Function name is still Open Picture or the picture was renamed after import Rename the function, re-compile, verify the picture string in the alarm row
Loop-in opens a blank picture Picture name has a typo, missing .pdl, or the picture was not compiled Re-export the alarm CSV, cross-check picture names against the compiled PDL list, re-import
Bulk import reports "unknown message number" for some rows CSV row references a message number that does not exist in the current OS database Re-compile the OS so the message numbers are up to date, then re-export and re-import
Loop-in works for one instance but not another of the same class Tag context not bound to the faceplate interface, or the loop-in target is a static picture rather than a faceplate Use a faceplate with a configurable instance tag; verify the faceplate interface wiring
Changes lost after OS recompile Loop-in entries were made at runtime via a script, or the CSV was edited but not re-imported after compile Re-import the master CSV; treat the CSV as the source of truth and version-control it
WinCC Unified alarms show in WinCC but the loop-in property is missing Alarm was added after the last HMI compile, or PLC connection is not established Re-compile the HMI, ensure the PLC connection is online; PLC alarms in WinCC Unified are applied automatically once a connection is established (see the Siemens documentation referenced above)

Best Practices

  • Treat the exported alarm CSV as a version-controlled engineering artifact. Store it next to the STEP 7 source and the WinCC project so that changes are auditable.
  • Standardize picture naming. A consistent Faceplate_<Type>.pdl convention makes spreadsheet formulas reliable.
  • Define loop-in mapping by tag class, not by individual message. Most engineering change churn is per-instance, not per-class.
  • Re-import the master CSV after every OS compile. Treat the in-database loop-in entries as derived state.
  • Keep the Split Screen Manager function named LoopInAlarm across the entire project. Renaming it back to Open Picture at any station will break dispatcher behavior at the affected runtime.
  • For WinCC Unified, prefer faceplates with typed interfaces over static pictures; static loop-in targets cannot carry tag context to the destination.

FAQ

Can I assign a loop-in alarm to STEP 7 Alarm_8 messages directly in the STEP 7 source?

No. In WinCC integrated with STEP 7 the message number is generated during OS compilation and is not editable in the STEP 7 source. The loop-in target must be assigned in the WinCC Alarm Logging editor (classic) or in the TIA Inspector under Properties > Events > Loop-In-Alarm (Professional/Unified).

What is the fastest way to configure loop-in alarm for >1000 messages?

Export the alarm logging database to CSV, populate the "Loop in Alarm" column using spreadsheet formulas keyed on the STEP 7 source identifier or message class, save the CSV, and re-import. This is the supported bulk workflow and replaces per-cell manual editing.

Why does the loop-in button open the start picture instead of the configured faceplate?

The standard function in Split Screen Manager is still named "Open Picture". Rename it to "LoopInAlarm" under Standard functions > Split Screen Manager > LoopIn > Alarm, recompile, and re-test. The runtime dispatcher keys on the function name to pass alarm context to the destination picture.

Does WinCC Unified support the same CSV export/import workflow for loop-in alarm?

WinCC Unified uses the TIA Portal data model and does not expose the classic CSV export/import. Use the Inspector to set Loop-In-Alarm with the ActivateScreen system function, or the TIA Openness API for scripted bulk changes. PLC alarms in WinCC Unified are applied automatically once a connection to the PLC is established.

My loop-in entries are lost after recompiling the OS. What went wrong?

The loop-in entries were probably written at runtime via a script rather than via the import workflow, or the master CSV was not re-imported after the latest OS compile. Re-import the version-controlled CSV and recompile so the database state is derived from a known source.

Back to blog