The pilogin.ini file must be edited by hand using Notepad or a similar editor if only the PI-API is installed on a machine. Users who have one of OSI’s client products, such as PI ProcessBook or PI DataLink, can use the Connections dialog in these programs to add, modify, and delete server entries in the file. This approach is preferred, as it will generate compatible node identifiers (node IDs) on different PCs connecting to the same server.
; PI#= Servername, NodeID, Port#
The default server name
; The user names for the servers above
The pilogin.ini file contains information for multiple connections. Each connection is given a sequential identifier (e.g., PI1, PI2, ... PIn) and this ID is used across sections to identify different aspects of the same connection.
The Services section contains the type of service supported for each connection. Currently only PI is a valid entry here. Only a single entry is required.
The PINodeIdentifiers section contains sets of server name, node ID, and port number separated by commas, one entry for each connection. These should be edited to reflect the desired server names, node IDs, and ports as discussed below. In addition, an optional time offset change may be set that can occur between the client and server. This is the time in seconds that the server and client local time offset is allowed to jump. Typically, 3600 if the nodes are in timezones whose DST rules differ.
The Network section contains the timeout settings, TIMEOUT indicates how long a PI-API function may take to read from the PI Server before timing out. WRITETIMEOUT indicates how long a connection attempt to PI, as well as any attempt to write data may take before timing out.
The Defaults section contains the name of the default server as the value associated with the PIServer item. This should be modified to reflect the local default server.
Following the default server are the default user names for each connection. Again, these should be modified to reflect the local environment.
For each connection there is an optional trust setting. This can be
"NONE", "FIRST", "LAST". This is used by
the method pilg_login to determine what to do when
connecting to the server.
NONE -> Don't assume a trust exists; if the various login attempts fail, bring up the login dialog. If that fails then report failure. This is also the case if the PIxTrust entry is missing for a particular server.
FIRST -> Don't bother with login attempts. Assume there is a trust and immediately add the server to the logged in server map with PIREAD access.
LAST -> Try all the various login attempts, if they all fail, then don't bring up login dialog; instead, assume there is a trust and add the server to the logged in server map with PIREAD access.
The HELPFILE entry indicates the location of the Login Services help file and should be set to reflect the installed PIHOME location.