10/06/2025
How-to | HMI | WebVisu

How-to start with CODESYS WebVisu user management

History

01 Oct. 2025 initial version

Features of example project

  • Legacy user management (=user+groups defined in ctrlX PLC Engineering)

  • Login & Logout

  • Display

    • User, group and full name

    • Auto logoff time

    • Set password

  • Restricted access dependent on logged in user

  • This documentation included as PDF and further programming hints

Introduction

User management allows different users of the webVisu to be assigned different rights. For example, an operator can only start the machine, acknowledge alarms, and load recipes. An administrator, on the other hand, has additional rights such as creating and deleting users and editing recipes.

The ctrlX PLC Engineering visualization offers 2 different options for user and group management.

  1. Use ctrlX PLC Engineering users and groups

  2. Use ctrlX OS users and groups (still buggy with ctrlX PLC Engineering 3.6.2)

HINT: The advanced features of the visualization (like user & alarm management) are only working, when program VisuElems.Visu_Prg is called in the task manager. To add this program call, add either a WebVisu or TargetVisu to you PLC project.

1. Use ctrlX PLC Engineering users and groups

This is called the “legacy” way, which means that the groups and users are defined within ctrlX PLC Engineering.

  1. Create new PLC project

  2. Add element “Visualization”

  3. Open “Visualization manager”, select tab “User Management” and press button “Create Runtime Based User management with Default Groups”

    Setup Visualization Manager for user management
  4. Press button “convert to Legacy”. This adds a new tabulator “Users”

  5. Add or remove groups, to your needs (e.g. group-admin, group-service, group-operator)

  6. Open tabulator “Users”

  7. Create a new user, by entering all requested information (login name, password, user group,…) (e.g. admin, service, operator)

2. Use ctrlX OS users and groups

Even though this option is still buggy with ctrlX PLC Engineering 3.6.2, its use is described here.

This is called the “Runtime based” way. While the user and groups are defined within the ctrlX OS web UI, an additional mapping step is necessary.

  1. Login to ctrlX OS web UI

  2. Create all groups and users which you need for the visualization (groups e.g. plcgrp-admin, plcgrp-service, plcgrp-operator)

    (users e.g. plc-admin, plc-service, plc-operator)

    HINT: We use here prefix plc in user and group names, to demonstrate that this elements are only used in PLC visualization not in ctrlX OS environment.

  3. While the rights are assigned in the visualization, you don’t have to assign any specific ctrlX OS access rights. Any rights defined in ctrlX OS are not used in webVisu.

  4. Create new PLC project in ctrlX PLC Engineering

  5. Add and open a visualization with the name “Visualization”

  6. Select tab “User Management” and press button

    “Create Runtime Based User management with Default Groups”

  7. Add or remove groups, to your needs for the application

  8. Enable mapping of groups

    1. Press button “Upload Device group Names” (1)

    2. Click arrow button of pull down “Mapping to Runtime Group” Administrator => plcgrp-admin Service => plcgrp-service Operator => plcgrp-operator (2)

      configure user groups

Configure access rights in ctrlX PLC visualization (for legacy & runtime)

Add WebVisu to project, which adds task VisuElems.Visu_Prg

For demonstration the example PLC project contains:

  • An input element for a number (group Administrator can edit all other read only)

  • A login button

  • An output for logged in user and its group

  • “Access rights” are defined in the property window of the rectangle. Option is only available, when "User Management" is activated.

Open window for configuring group access rights
  • Only the administrator group has write access, all others only have read access.

Configure access rights for existing user groups
  • The login command is assigned to the login button

Variables to display logged in user and group

  • Logged in user: VisuElems.CurrentUserName

  • Logged in group: VisuElems.CurrentUserGroupName

Related Links

User-Mngt-PLC-v3.6.2.project
989.97KB
Types
How-to
Products
HMI
PLC
Markets
Manufacturing
Assembly Lines
Building Automation
Logistic
Packaging
Printing

Latest published/updated articles