In the installation procedure below, it is assumed that the name of the interface executable is PISIPowerTG and that the startup command file is called PISIPowerTG.sh.
Note: UNIX does not enforce file-naming conventions, and it is possible that the file name extensions for the actual interface executable and command files are different than .exe and .sh, or it is possible that the file extensions are eliminated entirely.
To run multiple copies of the interface from the same directory, it is necessary to rename the executable and the command file. It is customary to use PISIPowerTG1 and PISIPowerTG1.sh for interface number 1, PISIPowerTG2.exe and PISIPowerTG2.sh for interface number 2, and so on.
PIHOME Directory
PIHOME is an environment variable that points to the base directory where the PI API is installed. The setting of environment variables is discussed in the PI API manual.
Interface Installation Directory
There are two conventions for the installation directory. The first convention is to place all copies of the interface into a single directory. If this convention is followed, it is recommended to place PISIPowerTG1, PISIPowerTG2, PISIPowerTG3, etc., in the directory:
[PIHOME]/Interfaces/SIPowerTG
The second convention is to create a separate interface directory for each copy of the interface. If this convention is followed, it is recommended to place PISIPowerTG1, PISIPowerTG2, PISIPowerTG3, etc., in the directories:
[PIHOME]/Interfaces/SIPowerTG1
[PIHOME]/Interfaces/SIPowerTG2
[PIHOME]/Interfaces/SIPowerTG3
and so on.
Create the installation directories as necessary.
Note: Because the stop scripts use the name of the executable to locate the process to be stopped, it is important that the executable names used are different. If the same executable name is used for different instances of the interface, the stop scripts are likely to stop the wrong process.
Note: The apiverify on Linux will truncate the process names to 15 characters. Therefore, the interface executable names should be less that 15 characters long.
Before installing the interface, the PI API must be installed first. The following is a summary of the steps required to install the PI API on Linux.
Note: When installing on Power TG 8.2, the owner of the PI API and interfaces should be the ems user. When installing on Power TG 8.3 or later, the owner of the PI API and interfaces should be powertglocal.
Please check with Siemens to confirm the user that the PI API and interface should be owner and run as. It should be the same user as the Siemens software uses to generate the input data files.
Note: The PI SIPowerTG interface version 1.0.0.0 on Linux is only compatible with PIAPI 1.6.1.11 on Linux. The interface is NOT compatible with later versions of the PIAPI because of the version of the C++ compiler used to build the interface and the PIAPI.
These instructions assume that the owner the PI API and interface is powertglocal and the PI API will be installed in the /opt/piapi directory. If the user is not to be powertglocal, then substitute for the correct user name where required.
-
As root, create the PI API directory and change the ownership to the user that will be running the PI API processes.
su
mkdir /opt/piapi
chown powertglocal /opt/piapi
exit
-
Define the PIHOME environment variable to the name of the PI API directory. export PIHOME=/opt/piapi
-
Add the PIHOME definition to the profile of the powertglocal user.
For the csh shell (or tcsh), add the following to the ~/.cshrc file
# PI API settings
setenv PIHOME /opt/piapi
setenv PATH ${PATH}:${PIHOME}/bin::
For the bash shell, add the following to the ~/.bash_profile file
# PI API settings
export PIHOME=/opt/piapi
export PATH=$PATH:$PIHOME/bin::
-
Copy the PI API installation kit piapiLinux64-tar_xxxxx_.gz onto the Power TG machine using FTP/SFTP or similar. Put the file into the /opt/piapi directory.
-
Extract the contents of the piapiLinux64-tar_xxxxx_.gz installation file.
cd $PIHOME
gunzip piapiLinux-tar_xxxxx_.gz
tar xvf piapiLinux-tar_xxxxx_
This will create a directory called build which contains the PI API installation files.
-
Run the PI API installation script pi.install as root
cd $PIHOME/ build
su
sh ./pi.install
Answer the prompts for your system
Enter an existing user name for PI API [piadmin] ?
powertglocal
Please Enter the Node Name of the Default PI Home Node:
PISERVER1
Is PISERVER1 a PI v3.x (UNIX, NT) system? [Y] or N
Y
Check the installation messages and verify that there were no errors.
exit (to change back to the powertglocal user)
-
Start the PI API processes
cd $PIHOME/bin
pistart
Ignore the message “Warning: USER is not root or piadmin applications may not start.” This warning can be removed from the pistart and pistop scripts by changing the scripts to find the owner the of script and using that instead of the hard-coded “piadmin”.
OWNER=`ls -l $0 | awk '{ print $3 }'`
if [ "$USER" != "root" -a "$USER" != "$OWNER" ]; then
echo "Warning: USER is not root or $OWNER. Applications may not start."
fi
-
Use the apiverify script to check the running PI API processes. Initially, the bufserv process should not be running because buffering is not enabled by default.
-
Use the apisnap utility to verify that the PI API is able to connect to the PI server
Share with your friends: |