Displaying Alarm Info Text on WinCC Unified Panels

David Krause16 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: Alarm Info Text on MTP1200 Unified Comfort Panels

The SIMATIC MTP1200 Unified Comfort Panel (12.1 in widescreen, article number 6AV2128-3MB06-0AX0) replaces the legacy WinCC Comfort alarm information display workflow. The classic system function AlarmViewShowOperatorNotes does not exist in WinCC Unified Runtime; engineers must use the JavaScript API method GetSelectedAlarmData() on the AlarmViewer control to read operator notes (InfoText) for a selected alarm and render the result in a text view, a popup screen, or a screen window.

This reference documents the configuration steps required to expose the info-text column, the JavaScript API surface that returns the selected alarm record, and two implementation paths: (1) a script-driven popup using GetSelectedAlarmData(), and (2) the toolbar-button approach using a WinCC Unified system function to remotely trigger the built-in info-text button. Both paths run on Unified Comfort panels with TIA Portal V17 or later and Unified Runtime V17 or later. The detailed API surface is documented in the SIMATIC WinCC Unified Engineering manual.

MTP1200 Unified Comfort Hardware and Firmware Reference

Parameter Value
Article number (MTP1200 Unified Comfort) 6AV2128-3MB06-0AX0
Display 12.1 in TFT widescreen, 1920 x 1080 pixels
Touch Capacitive multi-touch
Memory (project data) 24 MB on-board
Interfaces 2 x PROFINET, 1 x Ethernet, 3 x USB host
Supported TIA Portal versions V17 / V18 / V19 with WinCC Unified Engineering option
Minimum Unified Runtime firmware V17.0.0.1
Scripting engine JavaScript (ECMAScript 5/6 subset, no Node.js APIs)
Legacy scripting support VBScript removed in Unified; JavaScript only

The complete operating instructions are available at SIMATIC HMI Unified Comfort Panels operating instructions.

Prerequisites

  • TIA Portal V17 Update 4 or later with the WinCC Unified Engineering option installed.
  • MTP1200 Unified Comfort Panel added to the project and configured for PROFINET or Ethernet to the controller.
  • Unified Runtime firmware V17.0.0.1 or later loaded onto the panel. Confirm via Service Desktop under "System Properties > Firmware Version".
  • Alarm classes configured with at least one source (PLC tags, controller alarms, or system alarms).
  • Operator notes (InfoText) configured on the alarm class, on individual alarm texts, or in the STEP 7 alarm definition for controller-side alarms.
  • JavaScript scripting enabled in the runtime settings (Runtime Settings > Services > Scripting).
  • WinCC Unified alarm logging enabled in the runtime settings.
Note: TIA Portal V16 ships with a limited subset of the JavaScript API. The GetSelectedAlarmData() method requires Unified Engineering V17 or later. Projects that originated in V16 must be migrated before this method becomes available.

Configuring the Alarm Control to Display Info Text

The info-text column is hidden by default in the Unified AlarmViewer control. Enable it explicitly before any script can read the operator notes.

  1. In TIA Portal, open the screen that contains the AlarmViewer control (default name: AlarmControl1).
  2. Select the AlarmViewer control and open the Properties pane.
  3. Navigate to "Properties > Columns" (or "Column configuration" depending on the TIA Portal version).
  4. Add the column "Information" (this is the operator-notes / InfoText field). Drag it into the active column set if it is hidden in the available columns.
  5. Set the column width to a value that accommodates the longest expected operator note (typical 300 to 500 pixels for multi-line notes).
  6. Confirm "Selection mode" is set to "Single" for single-row retrieval or "Multiple" for batch retrieval.
  7. Save, recompile, and download the project to the MTP1200 Unified Comfort panel.
Note: Column visibility on Unified Comfort panels is configured at compile time. Runtime column toggles via the toolbar are not persistent across reboots. Production systems must include the column in the compile-time configuration.

Configuring Operator Notes (Info Text) at the Alarm Source

The InfoText field is populated at the alarm source. There are three typical locations:

  • Alarm class editor: Open "HMI alarms > Alarm classes", select a class (Alarm, Warning, Information, etc.) and enter the default InfoText. Used when no instance-level override exists.
  • Discrete alarms: In the HMI alarm editor (under "HMI alarms > Discrete alarms"), select an alarm row and fill the "Info text" column. This overrides the class default for that specific alarm.
  • Controller alarms (S7-1500 / S7-1200 / ET 200SP CPU): Set the InfoText attribute on the alarm in STEP 7. The Unified panel receives the info text as part of the alarm record via PROFINET.

For multilingual deployments, configure InfoText through the project's text library so the operator note changes with the runtime language selection.

WinCC Unified JavaScript API for Alarm Selection

WinCC Unified exposes the AlarmViewer control through the screen-level item API. The control is identified by its name on the screen. The relevant API surface for info-text display is:

Method / Property Type Description
GetSelectedAlarmData() Object | Array | null Returns the currently selected alarm record(s). For single-selection, returns one object; for multiple-selection, returns an array of objects. Returns null when no row is selected.
SelectionMode Enum (Single / Multiple) Controls whether the user can select one or multiple alarm rows at a time.
OnSelectionChanged Event Fires when the user selects or changes the selection in the alarm control. Wire to a script for popup logic.
AcknowledgeAlarm(alarmNumber) Boolean Acknowledges the alarm with the given alarm number. Returns true on success.
ResetAlarm(alarmNumber) Boolean Resets (clears) an acknowledged alarm that has become inactive.
ExecuteToolbarButtonByIndex(index) Boolean Programmatically triggers the toolbar button at the given index. Used to remote-control the built-in info-text button.

Return Object Structure of GetSelectedAlarmData()

Property Type Description
AlarmNumber Number Unique alarm identifier within the alarm class.
State Number Bitmask: bit 0 = active, bit 1 = acknowledged, bit 2 = cleared.
Priority Number Priority 0 to 16. Higher values indicate higher urgency.
Text String Alarm message text (multi-language text reference resolved).
InfoText / Information String Operator notes (info text). Property name may vary across runtime versions; inspect the runtime object to confirm.
Timestamp Date Time the alarm was raised, in panel local time.
Source String Source of the alarm (controller name, HMI tag, system).
TriggerTag String Name of the tag that triggered the alarm.
TriggerValue Variant Value of the triggering tag at the time of activation.
Acknowledger String User who acknowledged the alarm (when populated).
AlarmClass String Alarm class name (Alarm, Warning, Information, etc.).
Note: Property name conventions differ across TIA Portal versions. V17 exposes the field as InfoText; V18+ may expose it as Information. Use a debug script to dump the entire object to a text view and confirm the exact property names for the installed runtime.

Implementing GetSelectedAlarmData() in a Script

The recommended implementation pattern reads the selected alarm record and writes the InfoText to a target UI element. Use the JavaScript API as follows:


// Script: ShowInfoTextForSelectedAlarm
// Triggered from a button "Show operator notes" placed on the alarm screen.

var alarmViewer = Screen.Items("AlarmControl1");

if (alarmViewer === null || alarmViewer === undefined) {
    Tags("Internal.ErrorMessage").Write("AlarmControl1 not found on screen.");
    return;
}

var selectedData = alarmViewer.GetSelectedAlarmData();

if (selectedData === null || selectedData === undefined) {
    // No alarm selected
    Screen.Items("InfoTextOutput").Text = "No alarm selected.";
    return;
}

// Extract operator notes (InfoText); handle both property-name variants
var infoText = selectedData.InfoText || selectedData.Information || "";

if (infoText.length === 0) {
    Screen.Items("InfoTextOutput").Text = "No operator notes configured for this alarm.";
    return;
}

// Write to a text view or popup
Screen.Items("InfoTextOutput").Text = infoText;

// Optional: log to a tag for diagnostics and audit trail
Tags("Internal.LastInfoText").Write(infoText);
Tags("Internal.LastAlarmNumber").Write(selectedData.AlarmNumber);

Event-Driven Alarm Selection Handling

For a better operator experience, display the info text automatically when the user selects an alarm row rather than requiring a separate button press. Wire the OnSelectionChanged event to a script:


// Configure the AlarmViewer control property:
// "Events > SelectionChanged" -> function "OnAlarmSelectionChanged"

function OnAlarmSelectionChanged(item) {
    var alarmViewer = Screen.Items("AlarmControl1");
    var data = alarmViewer.GetSelectedAlarmData();

    if (!data) {
        Screen.Items("InfoTextOutput").Text = "(no selection)";
        return;
    }

    var infoText = data.InfoText || data.Information || "(no info text)";
    Screen.Items("InfoTextOutput").Text = infoText;

    // Color-code by priority for visual urgency
    if (data.Priority >= 10) {
        Screen.Items("InfoTextOutput").BackColor = 0xFFE0E0;  // light red
        Screen.Items("InfoTextOutput").ForeColor = 0x800000;  // dark red text
    } else if (data.Priority >= 5) {
        Screen.Items("InfoTextOutput").BackColor = 0xFFFFE0;  // light yellow
        Screen.Items("InfoTextOutput").ForeColor = 0x806000;
    } else {
        Screen.Items("InfoTextOutput").BackColor = 0xFFFFFF;
        Screen.Items("InfoTextOutput").ForeColor = 0x000000;
    }

    // Capture for audit logging
    Tags("Internal.LastAlarmSelectionTime").Write(new Date().toISOString());
    Tags("Internal.LastSelectedAlarmNumber").Write(data.AlarmNumber);
}

Multiple-Selection Mode Handling

For multiple-selection mode, GetSelectedAlarmData() returns an array. Iterate and concatenate InfoText values:


function OnAlarmSelectionChanged(item) {
    var alarmViewer = Screen.Items("AlarmControl1");
    var data = alarmViewer.GetSelectedAlarmData();

    var combined = "";

    if (Array.isArray(data)) {
        for (var i = 0; i < data.length; i++) {
            var info = data[i].InfoText || data[i].Information || "(no info)";
            combined += "[#" + data[i].AlarmNumber + "] " + info + "\n";
        }
    } else if (data) {
        var infoSingle = data.InfoText || data.Information || "(no info text)";
        combined = "[#" + data.AlarmNumber + "] " + infoSingle;
    } else {
        combined = "No alarm selected.";
    }

    Screen.Items("InfoTextOutput").Text = combined;
}

Alternative: Toolbar Button with System Function

The AlarmViewer control on Unified Comfort panels ships with a configurable toolbar that includes a built-in "Show info text" button. Add this button to the toolbar and trigger it remotely from a script using the ExecuteToolbarButtonByIndex method. This approach is preferred in regulated environments because it uses a built-in UI element instead of a custom popup.

  1. Select the AlarmViewer control and open the toolbar configuration in Properties.
  2. Add the button labeled "Information" (operator notes) to the toolbar. The exact label depends on the runtime language pack.
  3. Position the button in the desired toolbar order. Document its final index for the script.
  4. From any screen, call ExecuteToolbarButtonByIndex on the AlarmViewer control to simulate a click on the configured button.

// Trigger the built-in info-text toolbar button remotely
// Method: ExecuteToolbarButtonByIndex runs the toolbar button at the given position.

var alarmViewer = Screen.Items("AlarmControl1");

// Toolbar button index for "Show info text" in the default layout.
// Verify the actual index in the runtime; this depends on the configured toolbar order.
// Example: 14 = "Show info text" button when configured at position 15 (1-based -> 14 0-based)
var INFO_TEXT_BUTTON_INDEX = 14;

try {
    var ok = alarmViewer.ExecuteToolbarButtonByIndex(INFO_TEXT_BUTTON_INDEX);
    if (!ok) {
        Tags("Internal.ErrorMessage").Write("Failed to trigger info-text toolbar button.");
    }
} catch (e) {
    Tags("Internal.ErrorMessage").Write("Exception: " + e.message);
}
Note: Toolbar button indices depend on the order configured in the alarm control's toolbar property. A build that reorders toolbar buttons requires updating the index constant in every script that references the button. Document the index and the layout version in the script header comment.

Complete Working Example: Popup Screen with Info Text

The following example combines a script trigger from a button on the alarm screen to open a popup screen that displays the selected alarm's info text.

Step 1 - Configure popup screen: Create a new screen named InfoTextPopup with the following elements:

  • Text view AlarmNumber at the top: shows the alarm number (e.g., "#1234").
  • Text view AlarmText below the number: shows the alarm message text.
  • Text view InfoTextContent in the main area: shows the operator notes. Configure with word-wrap and a multi-line font.
  • Button CloseButton at the bottom right: closes the popup.

Step 2 - Configure the trigger button on the alarm screen: Place a button "Show operator notes" on the alarm screen. Configure its "Click" event to call the script ShowSelectedAlarmInfo().


// Script: ShowSelectedAlarmInfo
// Triggered from the "Show operator notes" button on the alarm screen.

function ShowSelectedAlarmInfo() {
    var alarmViewer = Screen.Items("AlarmControl1");
    var data = alarmViewer.GetSelectedAlarmData();

    // Guard: no selection
    if (!data || (Array.isArray(data) && data.length === 0)) {
        Screen.Items("MessageBox").Text = "Please select an alarm row first.";
        Screen.Items("MessageBox").Visible = true;
        return;
    }

    // Use the first selected alarm for the popup
    var alarm = Array.isArray(data) ? data[0] : data;
    var info = alarm.InfoText || alarm.Information || "(no operator notes)";

    // Populate popup fields
    Screen.Items("Popup.InfoTextContent").Text = info;
    Screen.Items("Popup.AlarmNumber").Text = "#" + alarm.AlarmNumber;
    Screen.Items("Popup.AlarmText").Text = alarm.Text || "";

    // Open the popup screen as a modal screen window
    HMIRuntime.Screens("InfoTextPopup").Open();

    // Audit log entry
    Tags("Internal.InfoTextPopupOpens").Write(Tags("Internal.InfoTextPopupOpens").Read() + 1);
}

function OnClosePopup() {
    HMIRuntime.Screens("InfoTextPopup").Close();
}

Step 3 - Verify and test: Compile and download the project. Trigger an alarm from the PLC, select the row, and press the trigger button. Confirm the popup screen displays the configured InfoText.

Multi-Language Operator Notes

For installations with multiple runtime languages, the InfoText should switch with the active language. Configure the alarm class or alarm instance InfoText through the project text library, not as a literal string. The JavaScript API returns the resolved text for the currently active language, so no additional script changes are needed.


// Verify multi-language InfoText by switching runtime language
// (Test script: invoked from a language-switch button)

function SwitchLanguageAndRefresh(langCode) {
    HMIRuntime.Language = langCode;
    // Re-read the selected alarm data after the language change
    var alarmViewer = Screen.Items("AlarmControl1");
    var data = alarmViewer.GetSelectedAlarmData();
    if (data) {
        var info = data.InfoText || data.Information || "";
        Screen.Items("InfoTextOutput").Text = info;
    }
}

Verification Procedure

  1. Compile the TIA Portal project with no errors. Check "Compile > Software (rebuild all)" output for JavaScript syntax errors.
  2. Download the project to the MTP1200 Unified Comfort panel.
  3. Trigger an alarm from the PLC (set the alarm tag true) so it appears in the alarm control.
  4. Select the alarm row in the alarm control on the panel.
  5. Press the "Show operator notes" button or trigger the OnSelectionChanged event handler.
  6. Confirm the popup screen displays the configured InfoText for that alarm.
  7. Test multiple-selection mode by selecting two rows and verifying both InfoText values appear concatenated.
  8. Test the empty-info case: configure an alarm with no InfoText and verify the script shows the empty-state message.
  9. Test the no-selection case: press the trigger button without selecting a row and verify the user prompt appears.
  10. Switch runtime language and confirm the InfoText updates to the new language.
  11. Acknowledge the alarm and verify the InfoText remains available (acknowledgement must not clear operator notes).

Troubleshooting Matrix

Symptom Likely Cause Resolution
GetSelectedAlarmData() returns null No row selected in the alarm control Verify SelectionMode is enabled and the user has selected a row. Add a guard in the script that displays a user prompt when null is returned.
InfoText is empty even when configured Column not enabled in alarm control; alarm source does not send InfoText Add the "Information" column in alarm control properties. Verify the InfoText attribute on the alarm in STEP 7 or the HMI alarm editor.
Property name mismatch (InfoText vs Information) Runtime version exposes a different property name Use a debug script to dump the entire returned object to a text view. Read both InfoText and Information with fallback.
Toolbar button index out of range Toolbar reordered after a project change Recount the toolbar button order; update the index constant in the script and document the layout version.
Script does not execute at all JavaScript disabled in runtime settings Open Runtime Settings > Services and enable scripting. Recompile and download.
Popup screen does not open Screen name typo; popup not declared as a permanent area or screen window Verify the screen name in HMIRuntime.Screens(...). Declare the popup in the screen navigation manager.
GetSelectedAlarmData() is undefined TIA Portal V16 or earlier runtime Upgrade to TIA Portal V17 or later with WinCC Unified V17 or later.
Operator notes display correctly in V17 but break in V18 Property name changed from InfoText to Information in V18 Add a fallback read: data.InfoText || data.Information.
InfoText length capped at 256 characters Controller-side alarm record truncation Use a multilingual text library referenced by alarm number; pass the index in the alarm record rather than the literal text.
Selection event fires too often (laggy UI) Script runs synchronously on every selection change Debounce the script with a short delay (50 to 100 ms) before reading; avoid heavy work in the handler.

Migration Notes from WinCC Comfort to Unified

The legacy system function AlarmViewShowOperatorNotes is removed in WinCC Unified. Migration steps:

  1. Identify all uses of AlarmViewShowOperatorNotes in the existing Comfort project (search the VBScript code base).
  2. In the Unified project, configure the AlarmViewer control with the "Information" column enabled.
  3. Replace each AlarmViewShowOperatorNotes call with a JavaScript function that uses GetSelectedAlarmData() and writes the result to a text view or popup screen.
  4. Test operator-notes display under all alarm states: active, unacknowledged, acknowledged, cleared.
  5. Validate that VBScript scripts in the Comfort project are translated to JavaScript; the language syntax differs (no Dim, no Set, no WScript access).
  6. Confirm that the alarm text reference behavior is equivalent; Unified uses multi-language text IDs that resolve at runtime.

The Unified runtime API is documented at Siemens Industry Online Support - WinCC Unified documentation.

Field-Proven Caveats

  • The InfoText field on controller-side alarms (S7-1500, S7-1200, ET 200SP CPU) is typically limited to 256 characters in the alarm record. For longer operator notes, use a multilingual text library indexed by alarm number.
  • If InfoText is sourced from a controller via PROFINET, ensure both the PLC and panel firmware versions support the full alarm record. Older S7-1200 firmware versions may transmit a truncated record.
  • JavaScript on Unified Comfort panels runs single-threaded on the UI thread. Long synchronous operations block the alarm control update loop. Keep scripts under 50 ms execution time.
  • On the MTP1200 with capacitive touch, modal popups block the alarm screen until dismissed. Use a non-modal screen window overlay when concurrent alarm control interaction is required.
  • The legacy VBScript function AlarmViewShowOperatorNotes has no compatibility wrapper in V17+. There is no equivalent system function; use the script approach described above.
  • Alarm control properties (column visibility, toolbar layout) are baked into the project at compile time. Changes to layout require a recompile and redownload.
  • When running the Unified Runtime in simulation mode (WinCC Unified PC Runtime), the GetSelectedAlarmData() behavior is identical to the panel runtime, which simplifies script testing.

Performance and Scaling Considerations

  • Limit the alarm control filter to display only the last 100 active alarms to keep selection events fast. Older alarms can be archived to a separate alarm control or a database log.
  • Avoid running GetSelectedAlarmData() in a cyclic scheduler; only call it on event triggers (OnSelectionChanged, button click).
  • If InfoText is large (more than 1 KB), store it in a multilingual text library and reference it by an index in the alarm configuration to reduce the PROFINET alarm record size.
  • For audit trail logging of operator-notes reads, batch the writes to a database tag at intervals rather than on every selection event.
  • When the alarm control contains more than 1,000 active rows, selection events may take 100 to 200 ms to process. Debounce the script with a short delay and avoid synchronous database calls in the handler.

Related API Methods for Operator Workflow

Method Use Case
GetSelectedAlarmData() Read operator notes and alarm attributes for the selected row(s).
AcknowledgeAlarm(n) Acknowledge the alarm with the given number. Use after operator reviews the info text.
ResetAlarm(n) Reset a previously acknowledged, now-inactive alarm. Clears it from the active list.
ExecuteToolbarButtonByIndex(i) Programmatically click a toolbar button. Used to remote-control the built-in info-text button.
GetAlarmDataRange(from, to) Read a range of alarms (e.g., for printing or exporting operator notes to a log).

FAQ

What replaced AlarmViewShowOperatorNotes in WinCC Unified?

The legacy VBScript system function is removed in Unified. Use the JavaScript method GetSelectedAlarmData() on the AlarmViewer control and read the InfoText (V17) or Information (V18+) field from the returned object. Write the result to a text view, popup screen, or screen window.

Which TIA Portal and runtime versions support GetSelectedAlarmData?

The method is available in WinCC Unified Engineering V17.0 Update 4 and later, paired with Unified Runtime V17.0.0.1 or later on the MTP1200 Unified Comfort panel.

Why does the operator-notes column not appear in the alarm control?

The "Information" column is hidden by default. Open the AlarmViewer properties, navigate to "Columns", and add the column named "Information". Recompile and download the project for the change to take effect on the MTP1200.

How do I display the info text in a popup rather than inline?

Create a popup screen with a text view. In the trigger script, write the InfoText value to the popup's text view and call HMIRuntime.Screens("InfoTextPopup").Open(). Configure the popup's close button to call HMIRuntime.Screens("InfoTextPopup").Close().

Can I trigger the built-in info-text toolbar button from a script?

Yes. Use alarmViewer.ExecuteToolbarButtonByIndex(n) where n is the zero-based toolbar button index for the configured "Show info text" button. The index depends on the toolbar layout and must be documented in the script for maintenance.

What is the difference between InfoText and Information property names?

WinCC Unified V17 exposes the operator notes field as InfoText; V18+ may expose it as Information. Use a fallback read pattern such as data.InfoText || data.Information to support both naming conventions across runtime versions.

Back to blog