How-to
How to Set Up Granular User Access on a CODESYS Touch Panel
Short answer
Yes: a CODESYS panel takes any number of users. Activate user management in the Visualization Manager, add accounts and passwords in its user management editor, then tick the per-element user checkboxes that appear on every visualization element. Changing or removing the login password changes only the gate, never per-control rights; the defaults are admin, Operator and user.
On this page
Yes — a CODESYS touch panel accepts as many user accounts as the project defines, and every element can carry its own access rights. The mechanism is CODESYS user management: activate it in the Visualization Manager and each placed element gains user-related checkboxes in its properties. The project starts with three default users — admin, Operator and user — and further accounts, with passwords and group membership, are added in the same editor. A password change or a disabled authentication never alters per-control rights; those live only in the element properties, and that is what this procedure sets.
What the login credential controls, and what it does not #
Three layers are involved, and confusing them wastes an afternoon:
- The credential. The username and password the panel or the web visualization asks for. Changing it changes the key, nothing else. Where that prompt comes from is a device or web-visualization configuration question, not a project question; for the device side, the route in is the one described for entering configuration mode on a touch HMI.
- The authentication switch. Turn it off and the visualization opens with no password at all. That removes the gate; it creates no identities and no rights. Keep it on whenever two people need different permissions.
- The rights. Per element, per user or group, defined in the project. This is the only layer that decides who may press what.
Decide it this way. A compromised password gets a password change. A station everyone may use, with no differentiation needed, can run on one shared credential. The moment one person may change setpoints and another may not, you need the rights layer — set it up as follows.
Activate user management in the Visualization Manager #
- Open the visualization project in the CODESYS engineering environment and go to the
Visualization Manager. - Select the User Management tab.
- Create the runtime user management from that tab, accepting the offered default configuration. This is the switch that connects the project's user list to the visualization runtime.
- Work through the user list: keep the three defaults (
admin,Operator,user), add one account per real person or role, give each a password, and assign each to a user group. - Save and compile. The properties of every placed element now show one checkbox per user or group.
Set the rights on each element #
- Select the element in the visualization editor — a button, an input field, or a grouped element.
- Open its properties and find the access-rights checkboxes that now list your users and groups.
- Tick exactly the accounts or groups allowed to operate the element. Unticked means the element ignores that identity at runtime.
- Reserve write access — setpoints, recipe memory, parameter save — for
adminor a supervisor group, and give the operator level only what the process needs. - Place a login button on the main screen. No login dialog is forced; the button is how identities get switched at runtime.
Access rights are operational access control, not a safety function: stop chains and guard interlocks must do their work no matter who is logged in.
A worked example: three accounts on one recipe screen #
Count before you configure, because the count is the acceptance test. Take a filling-line recipe screen with 9 interactive elements, assigned in three tiers:
| Tier | Elements | Count | user | Operator | admin |
|---|---|---|---|---|---|
| Basic | Start, Stop, Alarm acknowledge, Login button | 4 | yes | yes | yes |
| Process | Line speed setpoint, fill temperature setpoint, recipe select | 3 | no | yes | yes |
| Supervisor | Recipe save, dose edit | 2 | no | no | yes |
The verification is arithmetic: 3 accounts × 9 elements = 27 checks. Expected usable: 4 + 7 + 9 = 20. Expected refused: 27 − 20 = 7. Walk all 27 after download; if any of the 7 refused checks responds, a checkbox was missed or the old project is still running.
Run exactly this tiering when supervisors adjust the process and line operators only run it. Collapse the tiers only if the plant genuinely has a single user class.
Download and verify before handover #
- Download the project to the panel the normal way.
- Log in as each account and walk the
27-check matrix — usable where ticked, refused where not. - Power-cycle the panel and repeat the admin pass once; the rights must survive the restart.
- If a wrong rights set locks every account out of the controls, the fix is offline: correct the project and download it again, the same recovery as redownloading an HMI project after a user lockout.
Triage: a login fault or a rights fault #
Separate the two failure classes before touching anything:
- Rejected login. The account or password is wrong. Fix it in the
User Managementeditor and download; do not start re-ticking element checkboxes. - Login succeeds, wrong controls available. A rights fault. Check, in order: user management still active in the
Visualization Manager, the element's checkboxes, and whether the running project is the one you edited. - Checkboxes missing on an element. User management is not active in the project. Activate it and reopen the properties.
A rejected login is never fixed in the element properties, and a rights fault is never fixed with a password change. Classify first, then apply the one fix that matches. For logic that must react to the active identity, the VisuUserManagement function set gives the control program programmatic access to the user management.
Questions asked
Do the visualization accounts also open the panel's own login screen?
Not automatically. The accounts you define serve the visualization runtime. The User Management tab is also where visualization groups connected to the device user management are managed, so a linked setup can share identities, but an unlinked project keeps the two login worlds separate. Look at that tab to see which case your panel is in.
How do operators switch users during a shift?
No login dialog is forced, so the panel stays logged in as whoever authenticated last. Put a login button on the main screen: the next operator taps it, enters their own account and password, and the active identity is replaced without restarting the panel. Without such a button there is no route to change identity at runtime.
Does the user management also protect the web visualization?
Yes. The web visualization runs from the same project, so the same user management and the same element rights apply when the panel is viewed in a browser, and the browser session is asked to authenticate before the visualization loads. Configure the accounts once in the project; you do not maintain a second list for browser access.
Can the control program see who is logged in?
Yes, through the VisuUserManagement function set, which exists for programmatic access to the user management. Use it when logic must adapt to the active identity, for example logging setpoint changes against a name. Check the library documentation for the exact function list before designing the calls.