How could I start the application with different users without having to log in to the application.
You can't. Vision requires you to be logged in as some user. You could auto login to a "guest" user with no permissions, perhaps.
Many of the projects I maintain use the autologin feature to start the SCADA with a user with the lowest possible privileges, usually just viewing some main screen, but to do any actions or view other screens requires the user to login from within the application utilizing
system.security.validateUser() and then writing to some tag to indicate more privileges (not my favorite way) or
system.security.switchUser() which imo would be a better option as then you can use Ignitions built in security setup easier.
I am new to ignition, and I don't quite understand how to use this script.
Could you help me with an example?
- Set up auto login to a 'guest' user, with no/very restricted access.
- Have a simple login popup window, with a text field for the username, a password field for the password, and a button to submit. On the button, you'll run
system.security.switchUser, passing in the username and password from the text fields. If the user credentials were valid, you're now logged in as the appropriate user. If not, they'll get an error indicating a problem.
If you're new, go through some of the Inductive University classes, they're free.
A good look at 'Security in Ignition' should answer a lot of your questions about this topic.