HMI Engineering · Lab Manual

HMI User Administration and Backup in TIA Portal: Lab Manual from Key Switch to Restored Panel

Rights on a panel are only as strong as the PLC behind them. This lab manual maps a maintenance key switch, sends the logged-in group to the PLC, protects every command with an authorization, and shows in a live simulator why a panel backup must include recipes, runtime users and logs.

2,500+ engineers trained 4.9/5 Google rating 21+ years, Chinchwad, Pune Next batch: contact for dates
Quick answer

Define authorizations and user groups in the HMI user administration, protect every command object with an authorization, send the logged-in group to the PLC with GetGroupNumber on user change, and let the PLC combine it with a physical key switch for maintenance functions. Back up the panel, because runtime users, recipe records and logs are not in the TIA project.

  • Protect objects with authorizations, never with user names.
  • The PLC enforces critical rights too: HMI group AND key switch.
  • An untested backup is not a backup – restore it to a spare panel.

Users, Groups and Authorizations

WinCC user administration has three layers. An authorization is a right (Operate, Recipe edit, Maintenance, User administration). A group collects authorizations. A user belongs to a group and has a password and a logoff time. Objects on screens are protected by an authorization, so adding a person never needs a screen change.

Group (number)AuthorizationsTypical logoff time
Operator (1)Operate, Recipe load5 min
Maintenance (2)Operator rights + Maintenance (manual jog, alarm reset of tech faults)3 min
Administrator (3)All, including Recipe edit, Counter reset, User administration2 min

Lab Flow: From Key Switch to Tested Rights and Backup

Lab manual flow: field input to tested HMI screenSix stages: field device and PLC tag, input mapping to DB_IO, PLC logic, HMI tags, graphics linking, and perform and test.1Field + tags%I4.7 S40_KeyMaintmaintenance key2Input mappingFC_InputMapping→ DB_IO3LogicFC_AccessControlgroup AND key4HMI tagsDB_User_GroupNousers, groups5GraphicsLogin, rightsuser view6Perform + testSimulatorlogoff, restoreAddress rule for every lesson: %I only in FC_InputMapping, %Q only in FC_OutputMapping, symbolic DB members everywhere else – including the HMI.
Figure 1 – Six-stage lab flow for user administration and backup.

Stage 1Key Switch Wiring and PLC Tag

PLC tagAddressTypeDevice
S40_KeyMaint%I4.7BoolMaintenance key switch, 1 = MAINT, key removable only in RUN

Stage 2Input Mapping into DB_IO

// FC_InputMapping
"DB_IO".S40_KeyMaint := "S40_KeyMaint";

Stage 3Logic: Access Control in the PLC

The panel disables buttons, but the PLC must refuse the command as well, because a second panel, SCADA or an engineering laptop can write the same bits. The same principle protects recipes in the recipe transfer logic and manual operation behind the interlocks.

// DB_User (DB60): GroupNo : Int;  UserName : String[20];  Maint_Enable, Admin_Enable : Bool;
//                UserChanges : DInt;  GroupOld : Int;

// FC_AccessControl – called after FC_InputMapping
"DB_User".Maint_Enable := "DB_User".GroupNo >= 2 AND "DB_IO".S40_KeyMaint;   // HMI right AND physical key
"DB_User".Admin_Enable := "DB_User".GroupNo >= 3;
IF "DB_User".GroupNo <> "DB_User".GroupOld THEN                              // simple audit counter
    "DB_User".UserChanges := "DB_User".UserChanges + 1;
END_IF;
"DB_User".GroupOld := "DB_User".GroupNo;

// Example use in a manual-mode network: the PLC enforces the right, not only the panel
"DB_Manual".Jog_Allowed := "DB_User".Maint_Enable AND NOT "DB_Alarm".Any_Fault;

Stage 4HMI Users, Groups and Tags

  1. Open Security settings → Users and groups in the project tree (HMI user administration). Create the authorizations, the three groups and one user per group with a logoff time.
  2. In the runtime settings for user administration, set password rules and the number of failed logins before lock-out where your panel version supports them.
  3. Drag DB_User into the HMI tag table: DB_User_GroupNo (Int) and DB_User_UserName (String).
  4. Create a scheduled task with the event trigger User change, calling GetGroupNumber → DB_User_GroupNo and GetUserName → DB_User_UserName. On logoff the group number becomes 0.
  5. Assign authorizations to the objects that need them – this is the list used by the recipe screen and the shift report screen.

Stage 5Link Login, Rights and Status to the Graphics

Header and user objects on the screen templateTemplate header with current user field, login and logoff buttons; command buttons protected by authorizations; maintenance panel visible only when maintenance is enabled; user view for administrators.Line 1 · MachineMaintenance (maint)LOGINLOGOFFSTARTLOAD RECIPERESET COUNTERSMaintenance panel (visible only if Maint_Enable)JOG +JOG −User view (Administrator only): user · group · logoff timeoper · Operator · 5 minmaint · Maintenance · 3 minadmin · Administrator · 2 min12345
Figure 2 – Template header with user objects, protected command buttons, maintenance panel and user view.
#ObjectPropertiesTag / event
①Output field current userIn the template, visible on every screenDB_User_UserName
②Buttons LOGIN / LOGOFFNo authorization neededClick: ShowLogonDialog / Logoff
③Command buttonsProperties → Security: authorization Operate / Recipe load / Counter resetTheir normal events
④Maintenance groupVisibility animation: visible when Maint_Enable = 1DB_User_Maint_Enable
⑤User viewAuthorization User administration; shows users, groups, logoff timesSystem object

Button styles and lamps follow HMI buttons, lamps and auto/manual mode; the overall layout follows HMI screen design best practices.

Backup and Restore of the Panel

A panel holds more than the TIA project. Recipe data records, data logs and users changed in runtime exist only on the panel. Downloading the project to a spare panel restores screens and tags but none of those.

DataIn the TIA project?Restored by project download?Restored by panel backup?
Screens, tags, alarms, scriptsYesYesYes
Users configured in engineeringYesYes (unless set to keep runtime users)Yes
Users and passwords changed in runtimeNoNoYes
Recipe data recordsNoNoYes
Data logs and alarm logsNoNoYes, if stored with the backup or copied separately
  1. Create a backup from TIA Portal (Online → Backup of the HMI device), with ProSave, or from the panel's Control Panel to a USB stick or SD card.
  2. Label it with machine, date and panel firmware and keep two copies, one off the machine.
  3. Restore it to a spare panel once, during commissioning, so the procedure is proven before it is needed.

Stage 6Perform and Test: Animated Login, Rights and Backup

Log in as different users and watch which buttons become operable. The maintenance functions need both the HMI group and the physical key switch, because the PLC checks GroupNo from the panel against the mapped key-switch input. Leave the panel untouched to see the automatic logoff. Finally, replace the panel with and without a backup and see what survives. Use the passwords shown – this is a simulation only.

Users: oper / 1111 · maint / 2222 · admin / 3333
Field, PLC and storage
HMI · Machine screen
Line 1 · MachineNot logged in
Panel dataContent
Not logged in: only viewing is possible. Log in as oper / 1111.

Hands-On Lab: User Rights with Key Switch and Panel Backup

Hands-on
Before you start
  • TIA Portal with WinCC Comfort and a panel or PLCSIM + HMI simulation
  • A key switch on the trainer kit or a simulated input
  • A USB stick or SD card for the backup
  • Estimated time: 75 minutes
1

Wire the key switch and map the PLC tag

Wire the maintenance key switch S40 to %I4.7 and declare S40_KeyMaint in the PLC tag table.

S40_KeyMaint appears once in the tag table with a comment.
2

Map the key switch into DB_IO

Copy S40_KeyMaint into DB_IO in FC_InputMapping.

DB_IO.S40_KeyMaint follows the key position.
3

Create DB_User and FC_AccessControl

Add GroupNo, UserName, Maint_Enable, Admin_Enable and an audit counter, and combine the HMI group with the key switch in the PLC.

Maint_Enable is 1 only with group ≥ 2 and the key ON.
4

Configure users, groups and HMI tags

Create the authorizations, the Operator, Maintenance and Administrator groups and users with logoff times, and a scheduled task on user change that writes GetGroupNumber and GetUserName to the DB_User tags.

Logging in changes DB_User.GroupNo in the PLC within a second.
5

Link login, rights and status to the graphics

Add Login and Logoff buttons, the current-user field, a user view for administrators and authorizations on every command; tie maintenance objects to Maint_Enable.

Each button is operable only for its authorization; the current user is always visible.
6

Perform, back up and test the restore

Test every user against every button, the automatic logoff and the key switch, then back up the panel and restore it to a spare.

The spare panel shows the same recipes, users and logs after the restore.
Checkpoint—how to know you did it right

Every command is protected by an authorization, the PLC knows who is logged in and enforces maintenance rights with the key switch, the panel logs off by itself, and a spare panel restored from backup behaves exactly like the original.

Frequently asked questions

What is the difference between a user group and an authorization?

An authorization is a right such as Operate, Recipe edit or User administration. A user group collects authorizations, and each user belongs to a group. Buttons and fields are protected by an authorization, never by a user name.

How do I send the logged-in user to the PLC?

Use the system functions GetGroupNumber and GetUserName in a scheduled task triggered by a user change, writing into HMI tags connected to a PLC data block such as DB_User.

Why combine an HMI login with a key switch?

A password can be shared; a key is physically controlled. Requiring both for maintenance functions, and checking it in the PLC, stops anyone with a panel or a laptop from bypassing the rule.

Are recipe records and runtime users part of the TIA Portal project?

No. Recipe data records, data logs and users changed in runtime live on the panel. Only a panel backup preserves them; downloading the project to a spare panel does not.

How often should the panel be backed up?

After commissioning, after every change to recipes or users, and on a fixed schedule. A backup that has never been restored is untested, so practise the restore on a spare panel.

What logoff time should I use?

Short enough that an unattended panel does not stay at a high rights level – typically a few minutes for maintenance and administrator users – and configured per user in the user administration.

Reviewed by Bhawesh Kumar SinghIndustrial Automation Trainer and Industry 4.0 Consultant · Softwell Automation · 21+ years industry experience

Get the full syllabus + free demo class

Share your details—a Softwell training advisor will contact you with batch dates, fees and hardware-practice options.

No spam. Used only to share course details for this enquiry.

Learn with practical industrial examples

Join live online, Pune classroom or corporate in-plant automation training.

Request Course Details
Verified learning pathway

Discuss HMI User Administration and Backup

Explore practical curriculum, software, hardware and batch options for this technology.

Content reviewed: 16 October 2026

Siemens PLC & TIA Portal Learning Path

Continue with the related Siemens PLC tutorials in this practical learning series.

  1. SCL vs Ladder Logic
  2. Upload PLC Program
  3. TIA Selection Tool
  4. Analog Input Scaling
  5. PLC Counters
  6. PLC Timers
  7. Addressing & Data Types
  8. Hardware & PLC Tags
  9. OB, FB, FC & DB
☎ Call WhatsApp ✉ Email Enquire Now