When PI SDK support is enabled, the interface must make a connection to the PI Server via both the PI API and the PI SDK. Unlike the PI API, the PI SDK does not support proxy accounts (for more information, see “Proxy Logins” in the index of the PI Data Archive manual supplied with PI3 versions prior to 3.2). Since proxy accounts are not supported by the PI SDK, a user name and password are required for the PI SDK to establish a connection. To remain consistent, however, the interface attempts to log in via both the PI API and the PI SDK. The startup of the interface is suspended until login is successful via both the PI API and the PI SDK. This eliminates the need for proxy accounts altogether.
UniInt reads the user name and password from an encrypted file that is located in the same directory as the interface executable. The naming convention of the password file is:
.pwd That is, the name of the executable for the interface and the name of the password file are the same except for the .exe and .pwd extensions. Between UniInt 3.2.0 and 3.2.34, the password file can be created with the command:
/setlogin After executing this command, one will be prompted for a user name and password to be saved in an encrypted password file. Support for the /setlogin command was dropped in version 3.3.0 of UniInt to encourage users to use the trust relationships that are supported in PI 3.3 and PISDK 1.1. However, if the user does not have PI 3.3 or PISDK 1.1 (or greater), then a password file will still be needed for explicit logins if the piadmin password is not null. UniInt will detect this condition and will still generate a password file after an explicit login fails while the interface is running interactively as explained below.
When the interface is started, the interface looks for the password file. If the password file is not found, the interface will attempt to log in with a user name of “piadmin” and a blank (or null) password. If the login fails and if the interface is running interactively, the user will be prompted for a user name and password until login is successful. The interface will exit if the login fails and if the interface is running as a service. If the login fails because of a system error, the login will be retried once every minute until the login succeeds.