Hello,
I am using PLCnext Engineer with the integrated HMI Webserver (eHMI).
Setup:
-
I have configured HMI users with roles EHmiLevel1 … EHmiLevel10
-
One user has EHmiLevel = 5 (Service)
-
When this user is logged in, access to a protected HMI page works correctly
(Access / Visibility via ANY user level(s) ≥ 5)
PLC logic: In the PLC program I have a BOOL variable: Is_Service
If Is_Service = TRUE, the plant switches from automatic mode to manual mode
(e.g. actuators are no longer allowed to move automatically).
Requirement: I want the HMI tag / PLC variable Is_Service to be TRUE as long as at least one user with EHmiLevel ≥ 5 is logged in, and FALSE otherwise.
This should work:
-
without user interaction (no button click)
-
in the background
-
independent of the HMI client
-
including logout from another client
-
including automatic logout after session timeout (e.g. 20 minutes)
What I found so far:
-
EHmiLevel (e.g. EHmiLevel5) is available for HMI access rules, but
it does not exist as a tag or system variable that can be used in PLC code. -
I can set
Is_Service := TRUEwhen opening the protected page and reset it on logout, but this solution fails if:-
another HMI client logs out
-
the user is logged out automatically by timeout
-
Question: Is there any recommended or supported way in PLCnext Engineer / eHMI to:
-
link the current HMI user level (EHmiLevel ≥ 5)
-
to a PLC variable like
Is_Service -
centrally and client-independent?
Any best practice or official workaround would be highly appreciated.
Thank you!