Configuring PCS7 OS Operator Event Logging and Audit Trail

David Krause13 min read
SCADA ConfigurationSiemensTutorial / How-to
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

Configuring PCS7 OS Operator Event Logging and Audit Trail

Capturing who logged in, which operator performed which action, and which process values were modified is a regulatory, operational, and forensic requirement on any SIMATIC PCS7 plant. Every faceplate in the standard PCS7 APL (Advanced Process Library) and the older PCS7 Library writes operator actions into the WinCC message system automatically; the engineer's job is to wire this stream into the archive, the alarm view, the audit trail, and the long-term storage. This reference shows how to enable operator action recording, add user-defined operator input messages, log user-change events, and verify the audit chain end-to-end on a WinCC Runtime / PCS7 OS station.

1. Overview of Operator Event Logging in PCS7

PCS7 OS is built on SIMATIC WinCC, and WinCC ships with three message subsystems that engineers routinely confuse:

  • Alarm Logging – the runtime message engine that receives, classifies, colors, acknowledges, and archives process and operator messages.
  • User Administrator – the central user / group / authorization database that backs every login and every faceplate write-protection check.
  • Audit (GMP / FDA-eligible) – an optional, signed logbook module that is invoked when the project is configured for electronic signature workflows. Audit is layered on top of Alarm Logging and does not replace it.

For the typical "who changed what and when" requirement, Alarm Logging is sufficient. The user-change event is published by the User Administrator; the operator-input event is published by the APL block; both messages are formatted by the message configuration and written to the message archive.

Important: PCS7 does not require a custom C/VBS action to record an operator input. If the picture, faceplate, and tag you are operating are part of the PCS7 APL or a PCS7-conformant library, the message is generated at the moment the value is written, before the value reaches the AS. Turning on the system is therefore a configuration task, not a programming task.

2. Architecture and Data Flow

Operator event data flows through the following chain on a PCS7 OS:

  1. User logs on at the OS client – the User Administrator validates credentials against the local SIMATIC Logon or the central Windows domain.
  2. User opens a faceplate and writes a setpoint – the APL block (e.g., CTRL_PID, VALVE_ANA, MOT_SPEED) detects the operator write and raises an operator-input message in the message system.
  3. WinCC Alarm Logging formats the message with timestamp, user name, computer name, area, priority, and the dynamic field values (old value, new value, limit, etc.).
  4. The formatted message is forwarded to the Alarm Logging runtime view and, in parallel, written to the message archive (circular or sequence archive).
  5. On redundant OS servers, the message is replicated to the standby server via the WinCC redundancy sync.

The end-of-line storage is a pair of *.alg / *.udl files on the archive path, a SQL Server CC_AlgExp* database, or both, depending on the archive configuration you select in WinCC Explorer.

3. Prerequisites

Item Required Version / State
SIMATIC PCS7 V8.2 SP1 or later (V9.0 SP2 / V9.1 / V10 recommended for the latest APL)
WinCC Explorer (on OS server) Matches the installed PCS7 version
SIMATIC Logon Installed, with at least one user group configured
APL / PCS7 Library blocks Used for the operator faceplate (CTRL_PID, MOT_SPEED, VALVE_ANA, etc.) – required for automatic message generation
Authorization Windows administrator on the OS for first-time configuration; SIMATIC Logon "Configurator" right for user changes
Archive path Local or network share with write access for the WinCC runtime user; ≥ 20 % headroom recommended

Verify the WinCC/PCS7 build before proceeding. Open the WinCC Explorer and check Help > About. Mismatched ES and OS versions are the single most common reason that operator-input messages appear in the engineering but not in the runtime.

4. Enabling Operator Action Recording in the PCS7 Library Blocks

Every standard APL block exposes an input MSG_LOCK and an attribute column OperatorControlMessage. The OperatorControlMessage attribute decides whether the block raises a message when an operator writes a value.

  1. Open the PCS7 OS picture tree in WinCC Explorer or, on the ES, open the master data library.
  2. Right-click the block (e.g., CTRL_PID) in the CFC/SFC and select Object properties > Attributes > Operator control messages.
  3. Set OperatorControlMessage = 1 (the default for APL blocks; verify it has not been overwritten by a project standard).
  4. Compile the OS, then download the OS server. The compile step generates the message configuration *.mcf and merges the new message classes into Alarm Logging.

The default PCS7 message classes used for operator actions are:

Message Class Trigger Typical Use
Operator - Process Setpoint / actual write from faceplate Process value changes
Operator - System Mode change, on/off, manual/auto Control structure changes
Operator - Status Acknowledgement, override, simulation Operational toggles
User change Logon, logoff, lock, unlock Audit trail of who was active
Note: If a project is built from non-APL or third-party faceplates, operator-input messages are not raised automatically. In that case you must use a C / VBS action that calls MSG_LOG_OPERATOR or the modern HMIRuntime.Trace path. See section 6 for user-defined operator input messages.

5. Logging User Change (Logon / Logoff) Events

User-change events are the cornerstone of the operator audit trail. PCS7 OS subscribes to SIMATIC Logon and forwards a structured message every time a user logs on, logs off, locks the workstation, or unlocks it. The TIA Portal documentation for the equivalent TraceUserChange function on Basic / Comfort Panels and WinCC Runtime Advanced / Professional is published at the official Siemens documentation portal and applies, with the same logic, on PCS7 OS:

Example: Logging the logon and logoff events (Basic Panels, Comfort Panels, RT Advanced, RT Professional).

On a PCS7 OS station the procedure is as follows.

  1. Open WinCC Explorer > Computer > Properties > Parameter on the OS server and verify the SIMATIC Logon service is referenced. The service is started by the WinCC runtime as soon as the OS is started.
  2. Open SIMATIC Logon > User Administrator on the OS server and confirm the user groups and the associated WinCC authorization levels (e.g., Operator, Foreman, Process control engineer).
  3. In WinCC Explorer, open Alarm Logging > Message classes and add or enable the message class System, User change. PCS7 installs the class by default; if it is missing, import it from the PCS7 master message configuration.
  4. Open Alarm Logging > Messages and verify the four built-in messages are present:
    Message number (default) Text Trigger
    100200 @100%1@ logged on at @100%2@ Successful logon
    100201 @100%1@ logged off at @100%2@ Logoff
    100202 Workstation locked by @100%1@ Lock (screen saver / manual)
    100203 Workstation unlocked by @100%1@ Unlock
  5. Compile and download the OS. The runtime will raise the corresponding user-change message every time a SIMATIC Logon event is published.

For panels and WinCC Runtime Advanced / Professional the equivalent TIA Portal function is configured under User administration > Events > TraceUserChange; the same fields – User, Logon time, Logoff time, Reason – are available.

6. Generating User-Defined Operator Input Messages

If you operate a tag that is not part of the PCS7 APL, or you want to capture a custom event such as a recipe selection, a batch phase transition, or a manual override, you generate a user-defined operator input message from the WinCC message system or from a C / VBS script.

6.1 Static configuration in Alarm Logging

  1. In WinCC Explorer, open Alarm Logging and add a new message class User-defined operator.
  2. Add a message text that includes the dynamic process value fields, for example:
    @1%s@ has changed recipe @2%s@ from @3%s@ to @4%s@ at @5%t@
  3. Bind the message to a WinCC tag or to a script that calls the message DLL / OCX at runtime. A common pattern is to use a binary trigger tag, e.g., Recipe_Acknowledge, and raise the message on a rising edge:
' VBScript in a WinCC picture, fired on a button click
Dim userName, oldVal, newVal, ts
userName = HMIRuntime.ScopeTags("@CurrentUser").Value
oldVal    = HMIRuntime.Tags("RecipeName").Read
newVal    = HMIRuntime.Tags("RecipeSelected").Read
ts        = Now

' Raise operator-input message (text ID 100210 is project-specific)
HMIRuntime.Trace "Operator input: " & userName & " changed recipe from " _
                & oldVal & " to " & newVal & " at " & ts, _
                "UserMsg", 1, 1, 0

6.2 Dynamic message via the C / ODK API

For high-frequency or transactional events use the WinCC ODK DM_API:

// C / ODK style pseudo-call
DM_VAR_TEXT_STRUCT s;
s.msgNumber = 100210;
s.szText1   = userName;
s.szText2   = oldVal;
s.szText3   = newVal;
MSRTGetMsgTextCS(&s);
DM_SendOperatorMessage(0, 100210, s.szMsgText, 0, NULL);

6.3 Recommended message-class layout

Class Color Acknowledgement Archive Use
Operator - Process Blue / white No Yes Process value changes
Operator - System Blue / white No Yes Mode changes
Operator - Status Blue / white No Yes Acks, simulation
User change White / black No Yes Logon / logoff
User-defined operator Blue / white Configurable Yes Custom inputs

7. Configuring the Message Archive

Operator events are worthless if they are not persisted. Configure the archive before commissioning.

  1. In WinCC Explorer right-click Alarm Logging and choose Archive Configuration.
  2. Select the archive type:
    • Sequence archive (circular) – the default; configurable size (1 MB to 4 GB per segment) and segment count (1 – 100).
    • Process-controlled archive – external switch (e.g., batch end) decides when a new segment is started.
  3. Map a network share with adequate free space; budget at least 5 GB per year per OS server for a mid-size plant with operator messages enabled.
  4. Enable Long-term archive export (segmented *.csv or SQL CC_AlgExp*) for regulatory retention. The export service runs as a Windows scheduled task on the OS server.
  5. On redundant OS servers, the standby server must have the same archive path; messages are queued if the standby is offline.
Caution: Do not store the message archive on the system drive or on a path that is part of a Windows roaming profile. The WinCC runtime user must have Modify rights on the archive path or the archive goes read-only and the runtime stops logging.

8. Display and Reporting

Operator events can be inspected at runtime through three standard PCS7 controls:

  • WinCC Alarm Control (online) – select the message class Operator - * in the filter, optionally filter by user, time range, or area.
  • WinCC User Archive Control – for long-term queries; can be linked to MS Excel or to a third-party BI tool via ODBC.
  • WinCC IndustrialDataBridge / OPC UA Historical Access – streams archived messages to a historian such as SIMATIC PCS 7 Historian or any OPC UA HDA client.

For 21 CFR Part 11 / EU GMP Annex 11 environments enable the optional Audit component in PCS7: it adds a cryptographic signature to every operator message and a tamper-evident export. Refer to the SIMATIC PCS7 Process Control System – Configuration Manual and the WinCC Audit Option documentation for the exact configuration steps.

9. Verification Procedure

Run the following checklist on the OS after every change to confirm that operator events are recorded.

  1. Start the WinCC Runtime on the OS server.
  2. Open the WinCC Alarm Control in the project and apply a filter for the operator message classes.
  3. Log on as a known user (e.g., op_foreman); confirm a user-change message appears within 1 s with the correct user name and computer name.
  4. Open an APL faceplate, change a setpoint, and confirm that a process operator-input message is raised containing the old and new value.
  5. Force a custom user-defined operator input message (button click) and confirm it appears with the configured text and timestamp.
  6. Stop the runtime, restart it, and confirm the archived messages are still listed in the long-term archive control.
  7. Export a *.csv from the archive segment and verify the column mapping:
    Column Content Example
    Date / Time Local OS time, ISO 8601 2025-02-14 09:31:07.123
    Milliseconds 0 – 999 123
    MsgNo Message number 100210
    State Came In / Went Out / Ack Came In
    User SIMATIC Logon user op_foreman
    Computer OS host name OS-SRV-01
    Text Resolved dynamic text op_foreman changed recipe from A to B

10. Troubleshooting Matrix

Symptom Likely Cause Fix
No operator-input messages appear at runtime APL block attribute OperatorControlMessage = 0, or non-APL faceplate in use Set the attribute to 1, recompile OS; for non-APL faceplates add a VBS or C action that calls HMIRuntime.Trace
User-change messages are missing SIMATIC Logon service not started, or wrong message class imported Start the service from Start > Programs > Siemens Automation > SIMATIC Logon; re-import the default user-change message class from the PCS7 master project
Old value / new value in the message text show "@...%...@" Message number / process value not bound to a tag Open the message in Alarm Logging and assign the dynamic field tag in the Process Values column
Archive stops writing after a few hours Archive path full, or the WinCC runtime user lost write permission Increase the segment count, free disk, or restore NTFS write rights on the archive folder
Redundant OS shows a gap in the user-change messages Redundancy sync not enabled for the user-change message class In WinCC Explorer, Redundancy > Message synchronization, add the user-change class to the list
Operator-input messages appear in the engineering but not in the runtime Mismatched ES / OS version, or OS was not downloaded Re-download the OS server; verify WinCC versions match (Help > About on both)
Custom VBS trace message is not visible in Alarm Logging The Trace call routes to the diagnostic trace, not Alarm Logging Use DM_SendOperatorMessage (ODK) or a binary trigger tag in Alarm Logging to publish a real operator message

11. Field-Proven Notes

  • Operator-input messages are written before the value is sent to the AS. If the AS rejects the value (bad quality, area conflict) the message is still recorded with the original value. Combine the operator message with a process-value-quality message if you need a full bidirectional trace.
  • For 21 CFR Part 11 deployments always enable WinCC Audit and a 4-eyes principle on critical setpoint writes. The 4-eyes check is a property of the WinCC authorization, not of the message system.
  • Do not put the message archive on a deduplicated storage layer that does not honour NTFS file system change notifications. Some enterprise backup agents can keep the *.alg file open and stall the runtime.
  • On multi-language projects the message text is resolved in the operator's display language at the moment the message is raised, not when it is read back. Plan localization accordingly.

12. Related Standards and References

Does PCS7 OS record operator inputs by default?

Yes. Every faceplate in the PCS7 Advanced Process Library (APL) has the OperatorControlMessage attribute set to 1 by default. Setpoint, mode, on/off, manual/auto, and acknowledge actions all raise an operator-input message in WinCC Alarm Logging without any additional scripting.

How do I log user logon and logoff on a PCS7 OS?

Verify that the SIMATIC Logon service is running, that the user groups are configured in the User Administrator, and that the User change message class is present in Alarm Logging. PCS7 installs message numbers 100200 – 100203 for logon, logoff, lock, and unlock out of the box; the equivalent TIA Portal TraceUserChange configuration is documented at the Siemens documentation portal.

Can I generate a custom operator input message for a non-APL tag?

Yes. Add a user-defined message in Alarm Logging, bind a binary trigger tag to it, and toggle the tag from a C / VBS action; or call DM_SendOperatorMessage from the WinCC ODK. The TIA Portal V20 user-administration examples describe the same pattern for panels and WinCC Runtime.

Where are the operator messages stored?

They are written to the Alarm Logging sequence archive (*.alg) and, if configured, to the long-term export database (CC_AlgExp* on SQL Server). The default archive path is <WinCC project>\ArchiveManager\AlarmLogging.

How do I meet 21 CFR Part 11 with operator messages?

Enable the WinCC Audit option on the OS, configure electronic signature workflows, restrict the SIMATIC Logon groups with the principle of least privilege, and export the archive segments to a write-once / append-only store. The WinCC Audit option adds a cryptographic signature to every operator message.

Back to blog