Configuring Automatic User Login on SIMATIC Basic Panels (TIA

David Krause11 min read
HMI ProgrammingSiemensTutorial / 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

Overview

This article documents how to implement an automatic operator login at runtime start on SIMATIC Basic Panels (KTP400 Basic, KTP700 Basic, KTP700 Basic 2nd generation, KTP900 Basic, KTP1200 Basic, KTP1200 Basic 2nd generation) programmed with TIA Portal / WinCC (TIA Portal) Comfort or Advanced. Automatic login is commonly requested when an HMI must power up directly into the operator's main screen without presenting a password dialog, for example on OEM starter kits, kiosk-style HMIs, or single-role machines.

Three engineering approaches are presented:

  1. Dummy start screen + value-change event using the system function Logon.
  2. Area pointer "Coordination" + tag trigger firing the Logon function on tag change.
  3. Scheduler / planned task calling Logon once at runtime start (supported only on Comfort Panels and on Basic Panels whose runtime image supports scheduled tasks - see compatibility section).
Security notice: Automatic login embeds credentials into the project file. Anyone who can read the compiled HMI runtime file can extract the password. Use this only on panels inside a controlled physical access zone, or where the panel operates without a real user administration model. For higher security zones prefer the regular logon dialog or RFID tag + PIN switching.

Prerequisites

Requirement Specification
Engineering tool TIA Portal V16 / V17 / V18 (V15.1 minimum for system function parameter expansion)
HMI runtime WinCC Comfort or WinCC Advanced (Basic Panel target)
Panel families KTP400 Basic PN, KTP700 Basic PN, KTP700 Basic PN 2nd, KTP900 Basic PN, KTP1200 Basic PN, KTP1200 Basic PN 2nd
Runtime firmware KTP Basic 2nd gen: image version >= V16 update 4; legacy KTP Basic: image version >= V13 SP2
User administration Enabled with at least one user group and one user account (e.g., "Operator")
Tag memory One internal HMI tag of type Bool or Int with a start value
Documentation SIMATIC HMI Panels - Operating Manual (Basic Panels), WinCC (TIA Portal) - System Functions Reference

User Administration on Basic Panels

User administration in TIA Portal is configured under Runtime settings > User administration of the HMI device. Each panel supports a limited number of users and groups; the limits differ between 1st and 2nd generation devices:

Panel Max. users Max. groups Password length
KTP400 Basic / KTP700 Basic (1st gen) 32 10 1-24 characters
KTP700 Basic 2nd / KTP900 Basic / KTP1200 Basic (1st gen) 32 10 1-24 characters
KTP1200 Basic 2nd gen 50 15 1-24 characters

Create at least one group (e.g., "Operators") with appropriate area authorizations and assign at least one user (e.g., "Operator") to that group. The login used for the automatic procedure must exist with a known, project-defined password - never rely on default empty passwords because they are stripped at compile time.

Confirm the user can be logged in manually from the runtime via the standard user button before automating the procedure. This isolates credential problems from automation problems.

System Function Reference

The TIA Portal Logon system function logs the named user on with the supplied password. Its parameters:

Parameter Type Description
User String / WString constant or tag User name as defined in user administration
Password String / WString constant or tag Plain-text password (compiled into the runtime file)
Return value Bool / Int tag (optional) Receives 1 / TRUE on success, 0 / FALSE on failure

Two complementary functions are useful for cleanup:

  • Logoff - terminates the current user session.
  • GetUserName - reads the currently logged-in user into a string tag for diagnostics.

Detailed parameter semantics are in the WinCC (TIA Portal) system manual referenced in the Prerequisites table. The Logon function executes synchronously on the HMI runtime; no screen change is performed by the function itself.

Approach 1 - Dummy Start Screen with Value-Change Event

This is the most widely supported method on legacy and current Basic Panels because it uses only screen events and the built-in Logon function - no scripting, no scheduler, no project-wide event needed.

Concept: Configure the panel's startup screen to a dedicated, empty "AutoLogin" screen that contains an internal trigger tag. When the screen loads, the tag's start value triggers a value-change event that runs the Logon function with hard-coded credentials and then activates the real start screen.

Step-by-step - Approach 1

  1. In the HMI tag table create an internal tag HMI_StartupTrigger of type Bool with Start value = 1.
  2. Add a new screen AutoLogin. Leave the visual content empty (optional text "Logging in...").
  3. In the project tree, under HMI device > Screens > AutoLogin > Events, open Loaded.
  4. Add the following function list on the Loaded event:
    1. Set tag - set HMI_StartupTrigger = 0 (to avoid re-trigger on screen refresh).
    2. Logon - User = "Operator", Password = the operator's password constant.
    3. Optionally: Set tag - write return value of Logon into a diagnostic tag HMI_AutoLoginResult.
    4. ActivateScreen - Screen name = "Main", Number = configured screen number (default 1).
  5. In the value-change event of HMI_StartupTrigger add a redundant ActivateScreen calling the main screen as a safety net.
  6. Open Runtime settings > General > Start screen and select AutoLogin as the project's start screen.
  7. Compile and download the project to the panel.

Why it works: The screen's Loaded event fires exactly once per runtime start because the trigger tag is reset to 0 inside the same function list. Manual operator navigation back to AutoLogin after first start will still reset the trigger, but the value-change event will not fire (0 -> 0) and the user will simply be re-validated, which is harmless.

Approach 2 - Area Pointer Coordination with Tag Trigger

The Coordination area pointer is a 1-word interface that lets the PLC handshake with the HMI for life-bit and operator acknowledgement. It also exposes the runtime's "operating state" via individual bits. By assigning a tag of the PLC's choosing as the trigger source, you can fire Logon from a value-change event anywhere in the project without relying on a dedicated screen.

Step-by-step - Approach 2

  1. Enable the Coordination area pointer under Runtime settings > Connections > Area pointer with a tag from the PLC (e.g., DB_HMI.Coordination, length = 1 word).
  2. Create a trigger tag HMI_LoginPulse of type Bool, Start value = 0, internal.
  3. Open HMI device > Events > Tag value changes and add an event for HMI_LoginPulse on the change from 0 to 1.
  4. Add to that event:
    1. Set tag - HMI_LoginPulse = 0 (clear the pulse).
    2. Logon - User = "Operator", Password = operator password.
    3. ActivateScreen - "Main".
  5. From the PLC startup OB (e.g., OB100) or first scan, set the HMI bit that drives HMI_LoginPulse to 1 for one cycle after the HMI signals "ready". A common pattern:
// Pseudo-ST in PLC startup
IF "HMI_Coord".%X11 THEN // bit "ReadyForOperation" from Coordination pointer
  "HMI_LoginPulse" := TRUE;
END_IF;

Why it works: The Coordination area pointer tells the PLC when the HMI runtime is fully initialized. Driving HMI_LoginPulse from the PLC ensures that the value-change event fires after the HMI user administration is loaded - which is required for Logon to find the user entry.

Coordination pointer bits used here: Bit 11 of the coordination word ("Ready for operation") is the standard "HMI runtime alive" indicator. On 2nd generation Basic Panels this bit is exposed at the configured Coordination pointer offset 0, bit 11. Verify the bit numbering in your project's Area pointer configuration dialog.

Approach 3 - Scheduler (Where Supported)

Some Basic Panel images support the Scheduler (planned tasks) editor under HMI device > Schedules. Where supported, you can configure a one-shot task that fires Logon at runtime start.

  1. Open HMI device > Schedules and add a new trigger named AutoLogin.
  2. Set the trigger condition to "Runtime start" (available on Comfort Panel images and selected 2nd gen Basic Panel images).
  3. Configure the event to call the Logon system function with the operator credentials.
  4. Optionally follow with ActivateScreen to your main screen.
The "Runtime start" trigger is not available on legacy KTP Basic 1st generation firmware (image version < V13 SP2 update 6). For those panels use Approach 1 or Approach 2. Verify availability in the Scheduler editor of your TIA Portal version.

Parameter Mapping Summary

Approach Trigger source Required panel feature Robustness Recommended use
1 - Dummy screen Screen Loaded event + tag change None (universal) High Stand-alone panels, OEM starter kits
2 - Coordination pointer PLC startup handshake Coordination area pointer Highest (PLC-driven) Tightly coupled PLC-HMI systems
3 - Scheduler Runtime start trigger Scheduler with Runtime start trigger Medium Comfort Panels and 2nd gen Basic

Verification

  1. Reboot the panel (power-cycle, do not just restart the runtime from the loader).
  2. Observe: the panel briefly shows the AutoLogin screen (Approach 1) or the configured main screen directly (Approach 2 / 3).
  3. Open the user button on the runtime and confirm that the current user is the configured operator, not "Logged out".
  4. Inspect the diagnostic tag HMI_AutoLoginResult - it must contain 1 (TRUE) after startup. If it reads 0 the Logon call rejected the credentials; jump to the Troubleshooting section.
  5. Stop and restart the HMI runtime from the loader (Start > Start Runtime) three times and verify identical behavior.
  6. Power-cycle the panel and verify again. The trigger must fire on every cold start.

Troubleshooting Matrix

Symptom Likely cause Corrective action
User stays logged out; Logon return = 0 Wrong user name (case sensitive) or password mismatch between project and runtime Recompile project after correcting the constant; re-download full project, not delta
User stays logged out; no function list executes Event is configured on the wrong trigger object (e.g., wrong tag) Verify the tag's event configuration in Project tree > HMI tags > Events
Login fires on every navigation back to AutoLogin screen Trigger tag not reset to 0 inside the function list Add a Set tag step at the top of the function list that sets the trigger to 0
Coordination pointer approach: Logon fires before runtime is ready PLC sets the pulse on first scan before HMI sets the ReadyForOperation bit Gate the PLC pulse on the HMI "Ready" bit (Coordination bit 11), not on first scan
Scheduler approach: trigger does not exist in editor Panel firmware does not support Runtime-start trigger Switch to Approach 1 or 2
Login succeeds but main screen does not load Screen number mismatch with ActivateScreen Use screen name parameter rather than screen number
User logs in but immediately logs out Another event runs Logoff after the startup sequence Search project for Logoff calls and review ordering

Security Considerations and Field-Proven Caveats

  • Credentials compiled into the HMI runtime file are extractable from the .ap* / .br* image. Do not reuse the same password for operator accounts on HMIs that ship into unsecured environments.
  • On 2nd generation KTP Basic panels, user passwords are hashed in the project but the plaintext is still compiled into the runtime; treat the compiled runtime as confidential.
  • If you need an "automatic" feel without hard-coded credentials, configure a button that calls Logon with credentials from a tag, and have the operator authenticate via RFID or barcode reader that writes the tag. This decouples the credential from the project file.
  • Adding automatic login disables the original "User view" logon dialog for the operator role. Always provide a path (e.g., shift change button) that calls Logoff before allowing a different role to log in.
  • Combine with the User login required for operation option in the screen's security settings if you want all other screens to remain protected by group membership while still bypassing the logon dialog.

Field Commissioning Notes

  • Always validate the procedure on the actual target panel, not only the TIA Portal simulation. The PC simulation may handle screen Loaded events differently than the embedded runtime.
  • If the panel is part of a larger HMI network with a master panel, configure the operator credentials identically on every panel to avoid mismatches after master-to-slave tag distribution.
  • For migration from WinCC flexible projects: the same Logon system function exists; the dummy-screen pattern translates directly to TIA Portal screens without changes.
  • On KTP1200 Basic 2nd generation panels, the runtime supports up to 50 users; reserve at least one slot for a "ServiceAutoLogin" account used only during commissioning and disable that user at production handoff.

Which SIMATIC Basic Panels support automatic login at startup?

All KTP400 / KTP700 / KTP900 / KTP1200 Basic (1st and 2nd generation) panels running TIA Portal image V13 SP2 or later support the Logon system function. For the dummy-screen approach the panel firmware requirement is minimal; for the scheduler approach with "Runtime start" trigger the panel image must be V13 SP2 Update 6 or newer.

Can the Logon system function be called from a script on Basic Panels?

No. Basic Panels do not support VBScript or ANSI-C user scripts. Use the function list editor on screen events, tag value-change events, or scheduler events. Comfort Panels and WinCC Runtime Advanced on PC systems support scripted equivalents but Basic Panels are limited to the function list.

Why does my operator still see the logon dialog after configuring the dummy screen?

The most common cause is that the start screen of the project is not the AutoLogin screen. Open Runtime settings > General and confirm that "Start screen" is set to the dummy screen containing the function list. Also verify that the trigger tag's start value is 1 so the value-change event fires on the very first evaluation after the screen loads.

How do I prevent the automatic login from triggering after a runtime restart from the loader?

Reset the trigger tag in the function list itself (set to 0 before the Logon call), and use a screen Loaded event as the primary trigger. Manual navigation back to the AutoLogin screen after the first login will then reset the tag without firing the value-change event again, preventing re-login.

Is automatic login GDPR- or audit-compliant for production lines?

For FDA 21 CFR Part 11 or similar audit environments, automatic login with shared credentials violates individual accountability requirements. In those environments do not use automatic login; instead implement individual badge login via RFID or username/password on a controlled terminal. The methods in this article are intended for non-audited operator panels where the role rather than the individual is what matters for access control.

Back to blog