Pi interface for Siemens Spectrum Power tg (Linux)

Naming Conventions and Requirements

Download 0.55 Mb.
Size0.55 Mb.
1   2   3   4   5   6   7   8   9   ...   18

Naming Conventions and Requirements

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.

Interface Directories

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:


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:




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.

PI API Installation on a Linux Power TG machine

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 on Linux is only compatible with PIAPI 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.

  1. As root, create the PI API directory and change the ownership to the user that will be running the PI API processes.
    mkdir /opt/piapi
    chown powertglocal /opt/piapi

  2. Define the PIHOME environment variable to the name of the PI API directory. export PIHOME=/opt/piapi

  3. 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::

  4. 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.

  5. 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.

  6. Run the PI API installation script pi.install as root
    cd $PIHOME/ build
    sh ./pi.install

    Answer the prompts for your system

    Enter an existing user name for PI API [piadmin] ?

    Please Enter the Node Name of the Default PI Home Node:
    Is PISERVER1 a PI v3.x (UNIX, NT) system? [Y] or N

    Check the installation messages and verify that there were no errors.

    exit (to change back to the powertglocal user)

  7. Start the PI API processes
    cd $PIHOME/bin

    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."

  8. 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.

  9. Use the apisnap utility to verify that the PI API is able to connect to the PI server

Download 0.55 Mb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   18

The database is protected by copyright ©ininet.org 2022
send message

    Main page