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.
[Services]
PI1=PI
[PINodeIdentifiers]
; PI#= Servername, NodeID, Port#
PI1=MYVMSSERVER,34618,545
PI2=MYNTSERVER,85776,5450
[Defaults]
; HELPFILE=C:\PIPC\LIBRARY\PILOGIN.HLP
The default server name
PISERVER=MYVMSSERVER
; The user names for the servers above
PI1USER=newuser
PI2USER=newuser
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.
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. The HELPFILE entry indicates the location of the Login Services help file and should be set to reflect the installed PIHOME location.
In the example above two servers are specified, MYNTSERVER and MYVMSSERVER. MYVMSSERVER is at port 545, which is standard for all Open VMS servers. MYNTSERVER is at 5450, which is typical of Windows NT and UNIX servers. Port numbers are used for TCP/IP connections.
The node ID (34618 for MYVMSSERVER above) is used to give a numeric alias to the server. This may be used by applications to promote moving applications to different servers or replacing or moving of PI Systems among servers. For example, if an application stores significant points, it will likely need to store a reference to the server where this point resides.
Applications that store many such points save significant space and processing time using a numeric representation. In addition, an application that uses the pilogin.ini file to associate server names to stored node IDs, can handle the PI System moving to a new server. Simply edit the pilogin.ini file to reflect the new server mapping and the internal node ID information about the location of the data will resolve to the new server.
NOTE: It is a good idea to use a consistent set of node IDs throughout a site, only changing them to reflect server changes.