Switching Vision Window based on operator logon

Hi Team,
What is the best practice to open up different page when user login with supervisor logon. Same with menu bar or navigation bar.

Where should it be scripted on client scripts or any other way it can be achieved.

Is there document which highlight example scripts for this functionality.

You're talking about navigating to a different starting window based on privilege level?

A common approach is to not have any window set to open on startup. Then, in the client startup script, examine the user roles and branch to an appropriate scripted window open call. This approach can also be used to open specific windows based on machine identity (MAC address is my preference).

4 Likes

Is it recommended to make a separate project for each separate Vision client/HMI?

Do separate projects burden the Gateway more than using a client startup script to open specific windows for Vision?

I think it must be discussed at length somewhere, but I am not finding the topic(s) when I search.

I don't recommend it. I prefer to put all client-machine-specific possibilities in a single project so the client startup event can ask a database which window that client should start up with.

Probably a wash. I would expect separate projects to be much more trouble to maintain, unless you used inheritance for nearly everything.

1 Like

Thanks

Thanks for this post too:

Mobile Client MAC Address - #9 by jlivingston]
I didn't understand it at first, but now that I used it, thanks so much.

# Call the function and print the MAC addresses
mac_addresses = myMacIds()
for mac in mac_addresses:
    print(mac)

I used this to print the addresses, but I could instead match and then open the window if I understand correctly. Thanks.

1 Like

@pturmel Am I wasting my time learning how to do things in Vision for my HMI?

Can I check the MAC address in Perspective?
Or another way to restrict access to specific hardware in Perspective?

This is the among the things that Perspective cannot do.

See this somewhat recent topic:

1 Like

Thanks again.

Thanks Pturmel,
Is there any example code which i can look into how the privilege level to open up the window.

Here is a thread on that topic: