We are using Vision for an HMI, it is a touch screen without keyboard in a wash down environment.
We have a fluid processing room that run’s mostly unmanned. An operator checks in periodically and changes set points as necessary and leaves.
I’d like to have log-in’s for all the operators, preferably badge ID. In the event something needs to be rapidly adjusted or stopped I do not want a lengthy long-in process. I would like it to log off after X minutes of inactivity. I would prefer it log out to a “default” user that can view but not operate the HMI.
Ideal situation: Operator walks up to HMI, swipe badge, switches from default user to the specific operator. make changes, log back out to default user, if they forget to log out, it automatically changes back to the default user after 10 minutes.
Using the internal default Identity provider, I finally got the badge login to work. Its clunky, it completely logs you out of vision, requiring closing windows and loading screens to get back to the HMI. It’s completely impractical, if you don’t use the badge, you have to use windows on-screen keyboard, with is not user friendly.
I made a generic “default” user with minimal security permissions. Using the system.security.switchUser I got the following code to work.
if system.util.getInactivitySeconds() > 600 and system.security.getUsername() != "default":
system.security.switchUser("default","password")
With the “Classic” authentication strategy the SwitchUser code works perfect, BUT obviously the Badge Log-in does not work. With a “Identity Provider” Authentication Strategy the badge log in works clunky but works. but the switchUser script does not work.
Is there a method to do what I’m after? This does not seem like something that should be this difficult or outlandish.