Westinghouse Westation/NT

Total Page:16

File Type:pdf, Size:1020Kb

Westinghouse Westation/NT

Westinghouse WEStation/NT Interface to the PI System

Version 2.5.0.1 to 2.6.0.1 Rev H How to Contact Us

Phone (510) 297-5800 (main number) (510) 297-5828 (technical support) Fax (510) 357-8136 E-mail [email protected] World Wide http://www.osisoft.com Web Mail OSIsoft OSI Software, Ltd P.O. Box 727 P O Box 8256 San Leandro, CA 94577-0427 Symonds Street USA Auckland 1035 New Zealand

OSI Software GmbH OSI Software, Asia Pte Ltd Hauptstrae 30 152 Beach Road D-63674 Altenstadt 1 #09-06 Gateway East Deutschland Singapore, 189721

Unpublished – rights reserved under the copyright laws of the United States. RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013

Trademark statement—PI is a registered trademark of OSIsoft, Inc. Microsoft Windows, Microsoft Windows for Workgroups, and Microsoft NT are registered trademarks of Microsoft Corporation. Solaris is a registered trademark of Sun Microsystems. HP-UX is a registered trademark of Hewlett Packard Corp.. IBM AIX RS/6000 is a registered trademark of the IBM Corporation. DUX, DEC VAX and DEC Alpha are registered trademarks of the Digital Equipment Corporation. PI_WESPI.doc

 2002-2005 OSIsoft, Inc. All rights reserved 777 Davis Street, Suite 250, San Leandro, CA 94577 Table of Contents

Introduction...... 1 Reference Manuals...... 1 Supported Features...... 2 Diagram of Hardware Connection...... 4

Principles of Operation...... 5

Installation Checklist...... 7

Interface Installation on NT...... 9 Naming Conventions and Requirements...... 9 Interface Directories...... 10 The PIHOME Directory Tree...... 10 Interface Installation Directory...... 10 Interface Installation Procedure...... 10 Installing the Interface as an NT Service...... 10 Installing the Interface Service with PI-Interface Configuration Utility...... 11 Installing the Interface Service Manually...... 13 Interface Installation on Solaris2...... 15

PointSource...... 19

PI Point Configuration...... 21 Point Attributes...... 21 Tag...... 21 PointSource...... 21 PointType...... 21 Location1...... 21 Location2...... 22 Location3...... 22 Location4...... 25 Location5...... 26

Westinghouse WEStation/NT Interface to the PI System iii Table of Contents

Instrument Tag...... 26 ExDesc...... 26 Scan Flag...... 27 Source Tag...... 27 Shutdown...... 27

Performance Point Configuration...... 29 Configuring Performance Points with PI-ICU (NT-Intel)...... 29 Configuring Performance Points Manually...... 31

I/O Rate Tag Configuration...... 33 Monitoring I/O Rates on the Interface Node...... 33 Configuring I/O Rate Tags with PI-ICU (NT-Intel)...... 33 Configuring I/O Rate Tags Manually...... 35 Configuring the PI Point on the PI Server...... 35 Configuration on the Interface Node...... 35

Startup Command File...... 37 Command-line Parameters...... 39 Sample WES_PI.Bat File - NT...... 43 Sample wes_pi.sh File – Solaris2...... 44

Interface Node Clock...... 45 NT...... 45 UNIX...... 45

Security...... 47

Starting / Stopping the Interface on NT...... 49 Starting Interface as a Service...... 49 Stopping Interface Running as a Service...... 49 Starting / Stopping the Interface on Solaris2...... 51 Command-line Syntax for Background Processes...... 51 Terminating Background Processes...... 52 Anomalous Background Job Termination...... 52

Buffering...... 53 Configuring Buffering with PI-ICU (NT-Intel)...... 53 Configuring Buffering Manually...... 56

iv Example piclient.ini File...... 58

Appendix A: Error and Informational Messages...... 59 Message Logs...... 59 Messages...... 59 System Errors and PI Errors...... 59

Appendix B: Define PI Tags Using WDPF Database Information...... 61 wes_pnt Utility...... 61 Obtaining Analog Points...... 61 Obtaining Digital Points...... 62 Using piconfig...... 63 Creating Analog Points...... 63 Creating Digital Points...... 64 Westinghouse SPD_list Utility...... 65

Appendix C: Trend PI Data on WDPF WEStation or Classic Operator Console...... 67

Revision History...... 69

Westinghouse WEStation/NT Interface to the PI System v Introduction

The PI-Westinghouse WEStation/NT Interface (PI-WEStation) provides for two-way communication between a Westinghouse distributed control system (WDPF) and the Plant Information (PI) System. The interface can reside on either a WEStation (Solaris) or an NT Interface node that is connected to the WDPF network. Multiple copies of the interface can run on a single WEStation or NT Interface node, or on multiple WEStations or NT Interface Nodes, to collect data from the WDPF system.

Versions of WESation/NT The PI-WEStation Interface requires the user to obtain the WesAPI software from Westinghouse for each separate node on which the interface will run. The WEStation must be loaded and configured with the standard WEStation software level 8.4 or greater. The NT Interface requires version 1.0 or higher.

Versions of WDPF The WEStation (Solaris) version of the interface will run with version 6.0 and greater of WDPF and may be able to run with some versions of 6.x. However, customers need to check with Westinghouse about WEStation and WDPF version 6.x. The NT version will run with version 6.8 and greater of WDPF. The PI-WEStation Interface can collect data from any level WDPF system providing that the compatibility issues have been addressed. Additionally, the user must obtain either the WEStation or NT Interface hardware directly from Westinghouse. A WEStation can support communication to a maximum of 16 WDPF networks. The NT Interface can support communication to a single WDPF network. Note: If you are using PI-API version 1.3.0, you will need the wes_pi interface version 2.3.7. If you are using PI-API version 1.3.1.2, you will need the wes_pi interface version 2.3.9. Reference Manuals

OSIsoft  PI Server manuals  PI-API manual

Note: It is important to read the UniInt End User Document for more information related to this interface.

Westinghouse WEStation/NT Interface to the PI System 1 Introduction

Supported Features

Feature Support Part Number PI-IN-WH-WES-NTI Platforms NT 4.0 and above / Solaris APS Connector No Point Builder Utility Yes ICU Control Yes PI Point Types PI2: Integer, Real, Digital PI3: int16, int32, float16, float32, float64, digital Sub-second Timestamps No Sub-second Scan Classes No Automatically Incorporates PI Point Yes Attribute Changes Exception Reporting Yes Outputs from PI Yes Inputs to PI: Scan-based / Unsolicited / Scan-based Event Tags Maximum Point Count 16383 per WDPF System Uses PI-SDK No PINet to PI 3 String Support N/A * Source of Timestamps PI Server / WEStation History Recovery No * Failover Yes * UniInt-based Yes * Vendor Software Required on PI-API / Yes PINet Node * Vendor Software Required on Foreign Yes Device * Vendor Hardware Required Yes * Additional PI Software Included with Yes Interface * Device Point Types See below * See paragraphs below for further explanation.

Source of Timestamps The user specifies with the /time=x command-line parameter whether the PI Server timestamps are used or the WEStation API node timestamps are used.

2 Failover If there are redundant WEStations, there may be a separate copy of the interface on the primary and the backup WEStations for failover. The interface on the primary WEStation collects data while the interface on the backup WEStation establishes a connection to the WEStation and continually updates its database, but it does not collect data until there is a problem with the primary interface. Each interface checks on a periodic basis to see whether the WEStation it is communicating to has changed status. If so, the interface running as primary stops collecting data and the interface on the backup WEStation starts collecting data. The interfaces on the primary and the backup WEStations should be configured identically.

UniInt-based UniInt stands for Universal Interface. UniInt is not a separate product or file; it is an OSIsoft-developed template used by our developers, and is integrated into many interfaces, such as the PI-WES interface. The purpose of UniInt is to keep a consistent feature set and behavior across as many of our interfaces as possible. It also allows for the very rapid development of new interfaces. In any UniInt-based interface, the interface uses some of the UniInt-supplied configuration parameters and some interface-specific parameters. UniInt is constantly being upgraded with new options and features. The UniInt End User Document is a supplement to this manual.

Vendor Software Required The software required to be obtained from Westinghouse for the WEStation/NT interface is:  WDPF Highway Interface (WesAPI)

Vendor Hardware Required The hardware required to be obtained from Westinghouse for the WEStation/NT interface is:  IGI card for NT or the SGI/PGI card for the WEStation  The appropriate interface cable to connect the above card to the Generic Highway Controller (GHC)  Generic Highway Controller (GHC) Assy

Additional PI Software The PI-API is required to run the WEStation Interface. A PI Tag builder utility is shipped with the interface.

Device Point Types The interface supports all of the WDPF point types:  Analog  Digital

Westinghouse WEStation/NT Interface to the PI System 3 Introduction

 Packed Digital  Packed Group  Device Diagram of Hardware Connection

The following figure shows the hardware and software required for both the WEStation and NT interfaces. PI-Westinghouse WEStation/NT Interface Software and Hardware Requirements

OSI PI-API Client Operating System (NT or Solaris) PI-Westinghouse WEStation/NT Interface

WDPF Highway Interface (WESapi)

ISA BUS or S-Bus/PCI-Bus

IGI or SGI/PGI card SA-GHC Interface(IGI) or S-Bus-GHC Interface (SGI) card Interface Cable

PC Generic Highway Controller (GHC) Assy (a.k.a. the Pizza Box) or SUN Westnet II Highway

 IGI stands for ISA-GHC Interface.  SGI stands for S-Bus-GHC Interface  PGI stands for PCI-Bus-GHC Interface Interfaces running on NT will require an ISA bus to connect up to the IGI card. Interfaces running on Solaris require either an S-Bus or PCI-Bus to connect to either the SGI or PGI card respectively. The user will purchase all the required hardware and some software from Westinghouse.

4 Principles of Operation

Depending upon the configuration of the PI-WEStation Interface point directory, a single copy of the interface may be able to communicate to multiple WDPF networks. For this case, all WDPF tag names must be unique. The NT Interface only communicates to a single WDPF network so there is no issue regarding unique tag names. Values are sent from the Interface to the PI System on an exception report basis. For analog inputs, both the status word and value must be examined. Bits 8 and 9 (quality) and 15 (updating) of the status word determine the status of the value. An exception is generated (the value is sent to the PI System) if:  Status changes,  Exception maximum time has been exceeded, or  Both the exception minimum time and the exception deviation have been exceeded. For digital inputs, PI integer points, and PI digital points defined for analog inputs, an exception is generated whenever:  Integer value changes  Digital value changes, or  Status changes.

Westinghouse WEStation/NT Interface to the PI System 5 Installation Checklist

For those users who are familiar with running PI data collection interface programs, this checklist helps get the PI-WES interface running. If you are not familiar with PI interfaces, return to this section after reading the rest of the manual in detail. 1. Install the PI-Interface Configuration Utility (which installs PI-SDK and PI-API) 2. Verify that PI-API has been installed. 3. Install the interface. 4. Define digital states. 5. Choose a point source. If PI 2 home node, create the point source. 6. Configure PI points. Location1 is the interface instance. Location2 specifies input (0) or output (1). Location3 is used for status word interpretation. Location4 is the scan class. Location5 is used for status word interpretation. ExDesc is only used for UniInt-related items. InstrumentTag is the name of the WDPF point. 7. Configure Performance Points. 8. Configure I/O Rate tag. 9. Use the PI-ICU to configure the interface startup command file or edit it manually. 10. Set interface node clock. 11. Set up security. 12. Start the interface without buffering. 13. Verify data. 14. Stop interface, start buffering, start interface.

Westinghouse WEStation/NT Interface to the PI System 6 Interface Installation on NT

OSIsoft recommends that interfaces be installed on PI Interface Nodes instead of directly on the PI Server node. A PI Interface Node is any node other than the PI Server node where the PI Application Programming Interface (PI-API) has been installed (see the PI-API manual). With this approach, the PI Server need not compete with interfaces for the machine’s resources. The primary function of the PI Server is to archive data and to service clients that request data. After the interface has been installed and tested, Bufserv should be enabled on the PI Interface Node (once again, see the PI-API manual). Bufserv is distributed with the PI-API. It is a utility program that provides the capability to store and forward events to a PI Server, allowing continuous data collection when communication to the PI Server is lost. Communication will be lost when there are network problems or when the PI Server is shut down for maintenance, upgrades, backups, or unexpected failures. In most cases, interfaces on PI Interface Nodes should be installed as automatic services. Services keep running after the user logs off. Automatic services automatically restart when the computer is restarted, which is useful in the event of a power failure. The guidelines are different if an interface is installed on the PI Server node. In this case, the typical procedure is to install the PI Server as an automatic service and interfaces as manual services that are launched by site-specific command files when the PI Server is started. Interfaces that are started as manual services are also stopped in conjunction with the PI Server by site-specific command files. This typical scenario assumes that Bufserv is not enabled on the PI Server node. Bufserv can be enabled on the PI Server node so that interfaces on the PI Server node do not need to be started and stopped in conjunction with PI, but it is not standard practice to enable buffering on the PI Server node. See the UniInt End User Document for special procedural information. Naming Conventions and Requirements

In the installation procedure below, it is assumed that the name of the interface executable is WES_PI.exe and that the startup command file is called WES_PI.bat. It is customary for the user to rename the executable and the startup command file when multiple copies of the interface are run. For example, one would typically use WES_PI1.exe and WES_PI1.bat for interface number 1, WES_PI2.exe and WES_PI2.bat for interface number 2, and so on. When an interface is run as a service, the executable and the command file must have the same root name because the service looks for its command-line arguments in a file that has the same root name.

Westinghouse WEStation/NT Interface to the PI System 7 Installation on NT

Interface Directories

The PIHOME Directory Tree The PIHOME directory tree is defined by the PIHOME entry in the pipc.ini configuration file. This pipc.ini file is an ASCII text file, which is located in the WinNT directory. A typical pipc.ini file contains the following lines: [PIPC] PIHOME=c:\pipc

The above lines define the \pipc directory as the root of the PIHOME directory tree on the C: drive. OSIsoft recommends using \pipc as the root directory name. The PIHOME directory does not need to be on the C: drive.

Interface Installation Directory Place all copies of the interface into a single directory. The suggested directory is: PIHOME\interfaces\WESPI\ Replace PIHOME with the corresponding entry in the pipc.ini file. Interface Installation Procedure

The PI-WEStation Interface setup program uses the services of the Microsoft Windows Installer. Windows Installer is a standard part of Windows 2000. When running on Windows NT 4.0 systems, the PI-WEStation Interface setup program will install the Windows Installer itself if necessary. To install, run the WESPI_x.x.x.x.exe installation kit. Installing the Interface as an NT Service

The PI-WEStation Interface service can be created, preferably, with the PI-Interface Configuration Utility, or can be created manually.

8 Installing the Interface Service with PI-Interface Configuration Utility The PI-Interface Configuration Utility provides a user interface for creating, editing, and deleting the interface service:

Service Configuration

Service Name The Service to Add box shows the name of the current interface service. This service name is obtained from the interface executable.

Display Name The Display Name text box shows the current Display Name of the interface service. If there is currently no service for the selected interface, the default Display Name is the service name with a “PI-” prefix. Users may specify a different Display Name. OSIsoft suggests that the prefix “PI-” be appended to the beginning of the interface to indicate that the service is part of the OSI suite of products.

Service Type The Service Type indicates whether the interface service will start automatically or need to be started manually on reboot.  If the Auto option is selected, the service will be installed to start automatically when the machine reboots.  If the Manual option is selected, the interface service will not start on reboot, but will require someone to manually start the service.  If the Disabled option is selected, the service will not start at all. Generally, interface services are set to start automatically.

Dependencies The Installed services list is a list of the services currently installed on this machine. Services upon which this Interface is dependent should be moved into the

Westinghouse WEStation/NT Interface to the PI System 9 Installation on NT

Dependencies list using the button. For example, if API Buffering is running, then “bufserv” should be selected from the list at the right and added to the list on the left. To remove a service from the list of dependencies, use the button, and the service name will be removed from the “Dependencies” list. When the PI Interface is started (as a service), the services listed in the dependency list will be verified as running (or an attempt will be made to start them). If the dependent service(s) cannot be started for any reason, then the PI interface service will not run.

Note: Please see the PI Log and Operating System Event Logger for messages that may indicate the cause for any server not running as expected.

- Add Button To add a dependency from the list of Installed services, select the dependency name, and click the Add button.

- Remove Button To remove a selected dependency, highlight the service name in the Dependencies list, and click the Remove button. The full name of the service selected in the Installed services list is displayed below the Installed services list box.

Create The Create button adds the displayed service with the specified Dependencies and with the specified Startup Type.

Remove The Remove button removes the displayed service. If the service is not currently installed, or if the service is currently running, this button will be grayed out.

Start or Stop Service To Start or Stop an interface service, use the Start button and a Stop button on the ICU toolbar. If this interface service is not currently installed, these buttons will remain grayed out until the service is added. If this interface service is running, the Stop button is available. If this service is not running, the Start button is available. The status of the Interface service is indicated in the lower portion of the PI-ICU dialog.

Status of the ICU Status of the Service Interface installed or Service uninstalled

10 Installing the Interface Service Manually One can get help for installing the interface as a service at any time with the command: WES_PI.exe –help Change to the directory where the WES_PI1.exe executable is located. Then, consult the following table to determine the appropriate service installation command.

NT Service Installation Commands on a PI Interface Node or a PI Server node with Bufserv implemented Manual service WES_PI.exe –install –depend “tcpip bufserv” Automatic service WES_PI.exe –install –auto –depend “tcpip bufserv” NT Service Installation Commands on a PI Interface Node or a PI Server node without Bufserv implemented Manual service WES_PI.exe –install –depend tcpip Automatic service WES_PI.exe –install –auto –depend tcpip

When the interface is installed as a service on the PI Server node and when Bufserv is not implemented, a dependency on the PI network manager is not necessary because the interface will repeatedly attempt to connect to the PI Server until it is successful.

Note: Interfaces are typically not installed as automatic services when the interface is installed on the PI Server node. Check the Microsoft Windows NT services control panel to verify that the service was added successfully. One can use the services control panel at any time to change the interface from an automatic service to a manual service or vice versa.

Westinghouse WEStation/NT Interface to the PI System 11 Interface Installation on Solaris2

The interface consists of the interface executable file wes_pi, the script file to start the interface, wes_pi.sh, and the executable wes_pnt to assist in PI point creation. Prior to installing the interface, you must first install the PI-API on the node where the interface will run. Then the following interface installation steps must then be completed. 1. This step can be skipped if this is an upgrade, and these settings have already been configured. Set up the environmental variables required by the wes_pi interface. Edit the wdpf logon script (.cshrc for the c shell, .profile for the korn shell) to customize the PIHOME, LD_LIBRARY_PATH, and WDPF_PDIR environment variables. These environmental variables need to be set before interface startup in the account used to start the interface and the PI API. LD_LIBRARY_PATH contains the openwin libraries: LD_LIBRARY_PATH=/opt/pi/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH PIHOME contains the home directory of the PI-API. Typically set to /opt/piapi: PIHOME=/opt/piapi export PIHOME WDPF_PDIR contains the full path to the WDPF point directory file. Typically set to /usr/wdpf/shc/config/spd.online: WDPF_PDIR=/usr/wdpf/shc/config/spd.online export WDPF_PDIR 2. Load the interface from tape  Log into the WEStation as the wdpf user.  Change to the /tmp directory: cd /tmp  Load the compressed tar file from tape or CD: tar -xvf /dev/rst4 (where rst4 is the tape device) 3. Uncompress the compressed tar file: $ uncompress wespi_x.x.x.tar.Z (where x.x.x is the version) 4. Load the files from the WEStation to PI interface tar file into the /interfaces/WEStation directory under the home directory for the PI-API for SOLARIS. The PI-API home directory is typically set to /opt/piapi. If this is a new installation, you will need to make the WEStation interface directories: cd /opt/piapi mkdir interfaces (skip if interfaces directory exists) cd interfaces mkdir WEStation (skip if WEStation directory exists) cd WEStation 5. Extract the files from the wespi_x.x.x.tar file:

Westinghouse WEStation/NT Interface to the PI System 12 $ tar -xvf wespi_x.x.x.tar 6. Change the site-specific startup and shutdown shells for automatically starting and stopping the interface as follows: PI Home Node To run wes_pi on a PI home node, edit the following line in both: $PIHOME/adm/pisitestart.sh and $PIHOME/adm/pisitestop.sh Include wes_pi for PROCNAME in random rmp_sk wes_pi.

PI Interface Node Edit the /opt/piapi/bin/sitestart file to start the WEStation to PI interface. Add the following as the first line of sitestart: #!/bin/ksh Then add the following lines to sitestart after the comment section: # pid=`ps -e | grep 'wes_pi' | grep -v grep | awk '{ print $1 }'` if [ "$pid" != "" ]; then echo "The WEStation to PI interface is already running" else if [ -x ../interfaces/WEStation/wes_pi.sh ]; then ( cd ../interfaces/WEStation; sh ./wes_pi.sh ) fi fi #

Edit the /opt/piapi/bin/sitestop file to stop the WEStation to PI interface. Add the following as the first line of sitestop: #!/bin/ksh Then add the following lines to sitestop after the comment section: # if [ -x ../interfaces/WEStation/wes_pi.sh ]; then pid=`ps -e | grep 'wes_pi' | grep -v grep | awk '{ print $1 }'` if [ "$pid" != "" ]; then echo "Stopping WEStation to PI Interface" kill -2 $pid else echo "The WEStation to PI Interface NOT Found" fi fi

Westinghouse WEStation/NT Interface to the PI System 13 Installation on UNIX

7. Configure an event counter on the receiving node, if desired, by creating a tag with point source ‘L’, point type of real and appropriate zero, span and typical value. Then create an entry in $PIHOME/dat/iorates.dat to associate the event counter number with the tag. sywespi,11 8. To start the PI-API automatically during the WEStation startup, create a file named S99_ZPIAPI in the /etc/rc3.d directory: $cd /etc/rc3.d $vi S99_ZPIAPI Insert the following into the file and save it: #!/bin/ksh ########## # file: S99_ZPIAPI # Startup PI-API for SOLARIS # ########## if [ -x /opt/piapi/bin/pistart ]; then USER=wdpf export USER LOGNAME=wdpf export LOGNAME PIHOME=/opt/piapi export PIHOME sh /opt/piapi/bin/pistart fi

14 PointSource

The PointSource is a single, unique character that is used to identify the PI point as a point that belongs to a particular interface. For example, one may choose the letter W to identify points that belong to the PI-WEStation Interface. To implement this, one would set the PointSource attribute to W for every PI Point that is configured for the PI-WEStation Interface. Then, if one uses /ps=W on the startup-command line of the PI_WESPI interface, the Interface will search the PI Point Database upon startup for every PI point that is configured with a PointSource of W. Before an interface loads a point, the interface usually performs further checks by examining additional PI point attributes to determine whether a particular point is valid for the interface. For additional information, see the /ps argument.

PI 2 Server Nodes The following point source characters are reserved on PI 2 systems and cannot be used as the point source character for an interface: C, ?, @, Q, T. Also, if one does not specify a point source character when creating a PI point, the point is assigned a default point source character of L. Therefore, it would be confusing to use L as the point source character for an interface. Before a PI point with a given point source can be created, the point source character must be added to the PI 2 point source table. For example, if point source W is not defined in the PI 2 point source table, a point with a point source of W cannot be created. This prevents the user from accidentally creating a point with an incorrect point source character.

Defining a Point Source Character in the PI 2 Point Source Table 1. Enter PI by typing the following command from a VMS command prompt: @pisysexe:pi 2. Select the PointSrc option from the menu. 3. Select New from the menu. 4. Assign a point source next to the Code: field. Also, assign minimum and maximum values for the Location1 to Location5 attributes. Location1 Location2 Location3 Location4 Location5 Minimum 1 0 -2147483648 0 -20000000 Maximum 99 - 2147483648 256 20000000

5. Select “Save” from the menu. PI 3 Server Nodes No point source table exists on a PI 3 Server, which means that points can be immediately created on PI 3 with any point source character. Several subsystems and applications that ship with PI 3 are associated with default point source characters.

Westinghouse WEStation/NT Interface to the PI System 15 Point Source

The Totalizer Subsystem uses the point source character T, the Alarm Subsystem uses G and @, Random uses R, RampSoak uses 9, and the Performance Equations Subsystem uses C. Either do not use these point source characters or change the default point source characters for these applications. Also, if one does not specify a point source character when creating a PI point, the point is assigned a default point source character of L. Therefore, it would be confusing to use L as the point source character for an interface.

16 PI Point Configuration

The PI point is the basic building block for controlling data flow to and from the PI Server. A single point is configured for each measurement value that needs to be archived. Use the point attributes below to define what data to transfer. Please refer to the Appendix for information on use of the utility program wes_pnt to facilitate creation of the PI database.

Note: PI2 and PI3 point requirements differ in some instances with respect to the content of the point database fields; these differences will be pointed out. Point Attributes

Tag A tag is a label or name for a point. Any tag name can be used in accordance with the normal PI point naming conventions.

PointSource The PointSource is a single, unique character that is used to identify the PI point as a point that belongs to a particular interface. For additional information, see the /ps command-line argument and the “Point Source” section.

PointType Typically, device point types do not need to correspond to PI point types. For example, integer values from a device can be sent to floating point or digital PI tags. Similarly, a floating-point value from the device can be sent to integer or digital PI tags, although the values will be truncated. Please refer to the discussion of the Location3 parameter that shows the correlation between WDPF and PI point types.

PI 2 Server Nodes Scaled real, full-precision real, integer, and digital point types are supported on PI 2 Servers. For more information on the individual point types, refer to the Data Archive (DA) section of PI System Manual I.

PI 3 Server Nodes Float16, float32, int16, int32, and digital point types are supported on PI 3 Servers. For more information on the individual point types, see PI Server manuals.

Location1 The first location is the interface number. There can be up to 99 copies of the interface running using the same point source.

Westinghouse WEStation/NT Interface to the PI System 17 PI Point Configuration

Location2 The second location is used to specify whether the point is an input from or an output to the WDPF system. 0 = Input 1 = Output

Location3 This is the status word interpretation. Interpretation depends on the highway resource type and the PI point type. The WDPF point type does not have to match the PI point type. There may be several PI points associated with a single WDPF point (e.g., value, alarm state, acknowledge). Each PI point is associated with only one WDPF point. The following table shows how the various point types are handled by the interface program.

Note: A point type of R includes Float16 and Float32 and a point type of I includes Int16 and Int32 for the information contained in the table below. Bits 8, 9, and 15 determine the status of inputs from WDPF. For all input points, the value is set to “Bad Input” if bits 8 and 9 (bad quality) or bit 15 (not being updated) are set in the status word. For all output points, bits 8 and 9 of the status word are set if the PI status is bad. The processing specified by the Location3 parameter is done only for good inputs.

WDPF PI Location3 Locatio Processing Point Poi n5 Type nt Typ e Analog R 0 0 The PI value is the “Analog Current Value” from Received the WDPF record. I 0 0 This point is processed the same way as the real point type described above except that the value is rounded off to an integer in the range of 0- 32767 if the status is good. A value outside this range is stored as “Under Range” or “Over Range”. R or 0 82 The High Alarm Limit (HL) of Record Type AI I or AL (2.5.0.1) R or 0 86 The Low Alarm Limit (LL) of Record Type AI or I AL. (2.5.0.1) I 1- 32767 0 This point is processed the same way as the digital point type described below for Analog Received points. D 0 – 15 0 Specifies the bit of interest. The PI value is the state of the specified bit in the status word. D 16 0 This point type is used to store the alarm state of the analog point. The possible states are:

18 WDPF PI Location3 Locatio Processing Point Poi n5 Type nt Typ e 0 0 – No alarm (not bits 0, 1, 3, 4, 6, 13) 0 1 – Incremental better alarm (bit 0) 0 2 – Incremental worse alarm (bit 1) 0 3 – Low limit alarm (bit 2 but not 3) 0 4 – High limit alarm (bit 3 but not 2) 0 5 – Sensor alarm (bits 2 and 3) 0 6 – Alarm checking off (bits 6 or 13) D 17 0 This point type is used to store the alarm acknowledged/unacknowledged state of the analog point., the possible states are: 0 0 – No Alarm (not bit 7) 0 1 – Alarm with no acknowledge (bits 7 and 5) 0 2 – Alarm with acknowledge (bit 7 and not 5) D 18 - 65535 0 The low order 16 bits are used as a bit map for determining the digital value. The bit map processing uses the bits in LOCATION3 to determine which bits are used in the appropriate WDPF status word. For example, if LOCATION3 is 0448 hexadecimal, bits 10, 6, and 3 will be used from the status word. These bits will be moved to bits 2, 1, and 0 for the PI value. If the status word is 663 hexadecimal, the PI value is determined by moving bit 3 (not set) of the status word to bit 0 of the PI value. Bit 6 (set) of the status word is moved to bit 1 of the PI value. Bit 10 (set) of the status word is moved to bit 2 of the PI value. The other bits of the status word are ignored. The PI value in this case is 6. Digital R 0 0 The value is stored as 0 or 1 depending on the Received state of bit 0.

I, D 0 - 15 0 The PI value is the state of the LOCATION3 bit in the status word. I, D 16 0 This point type is used to store the alarm state. The possible states are: 0 0 – No alarm (not bits 2&3, 6, 7, 13) 0 1 – Sensor alarm (bits 2&3) 0 2 – Alarm checking off (bit 6 or 13) 0 3 – Alarm (bit 7) I, D 17 0 The possible states are:

Westinghouse WEStation/NT Interface to the PI System 19 PI Point Configuration

WDPF PI Location3 Locatio Processing Point Poi n5 Type nt Typ e 0 0 – No Alarm (not bit 7) 0 1 – Alarm with no acknowledge (bits 7 and 5) 0 2 – Alarm with acknowledge (bit 7 but not 5) 18 - 65535 0 The low order 16 bits are used as a bit map for determining the digital value. The bit map processing uses the bits in LOCATION3 to determine which bits are used in the appropriate WDPF status word. For example, if LOCATION3 is 0448 hexadecimal, bits 10, 6, and 3 will be used from the status word. These bits will be moved to bits 2, 1, and 0 for the PI value. If the status word is 663 hexadecimal, the PI value is determined by moving bit 3 (not set) of the status word to bit 0 of the PI value. Bit 6 (set) of the status word is moved to bit 1 of the PI value. Bit 10 (set) of the status word is moved to bit 2 of the PI value. The other bits of the status word are ignored. The PI value in this case is 6. Packed R, I, 0 0 The alarm state of the first status word of digital Digital D points is recorded with the possible values shown Received below. 0 0 – No alarm (not bits 2&3, 6, 7, 13) 0 1 – Sensor alarm (bits 2&3) 0 2 – Alarm checking off (bit 6 or 13) 0 3 – Alarm (bit 7) R 0 For packed digital inputs, a R value is now set to lower 15 bits of Packed status word when location3 is 32767 and lower 16 bits when Location3 is 65535. R, I, - 0 The digital state is determined from the bit map D 2147450880 using all 32 bits of LOCATION3. For packed – group points, the lower order 16 bits of this 2147450880 parameter correspond to the 16 digital point values and the higher order 16 bits correspond to the 16 force indication bits. For device points, the lower order 16 bits correspond to the second status word and the higher order 16 bits correspond to the third status word. Analog R 0 0 The PI analog value is transferred. Originate d I 0 0 The PI integer value is transferred.

20 WDPF PI Location3 Locatio Processing Point Poi n5 Type nt Typ e D 0 0 The analog value is the digital state code minus the starting digital state code (0,1,2,…). Digital R 0 0 The least significant bit in the status word is set if Originate the PI analog value is non-zero. If the PI value is d 0, this bit is cleared. I 0 0 The least significant bit in the status word is set if the PI integer value is non-zero. If the PI value is 0, this bit is cleared. D 0 0 If the PI digital code equals the digital start code, the least significant bit in the status word is cleared. Otherwise, this bit is set. Packed R 0 0 Input: This combination is not logical. Digital Output: The value of this tag will be output to the Originate PB/PX record. (2.4.7.4) d (PB) I - 0 Location3 is used as a bit map to convert the PI 2147450880 integer value to the long status word. The – algorithm is the reverse of the Packed Digital 2147450880 Received conversion for integer points. Output: If location3 is 0, then the entire integer value will be output. If location3 is not 0, then the above rule applies. (2.4.7.4) D - 0 Location3 is used as a bit map to convert the PI 2147450880 digital state to the long status word. The – algorithm is the reverse of the Packed Digital 2147450880 Received conversion for digital points. Output: If location3 is 0, then the entire integer value will be output. If location3 is not 0, then the above rule applies. (2.4.7.4) Packed R 0 0 Output: The value of this tag will be output to the Group PB/PX record. (2.4.7.4) Originate d (GP) I - 0 Output: Location3 is used as a bit map to convert 2147450880 the PI integer value to the long status word. The – algorithm is the reverse of the Packed Digital 2147450880 Received conversion for integer points. A value of 0 in location3 will output the entire integer value. (2.4.7.4)

Westinghouse WEStation/NT Interface to the PI System 21 PI Point Configuration

WDPF PI Location3 Locatio Processing Point Poi n5 Type nt Typ e D - 0 Output: Location3 is used as a bit map to convert 2147450880 the PI integer value to the long status word. The – algorithm is the reverse of the Packed Digital 2147450880 Received conversion for integer points. A value of 0 in location3 will output the entire integer value. (2.4.7.4)

Location4 Scan class number. Scan classes are defined in the interface startup file; each scan class defines an update period. This location code defines which scan class period is used to update the PI point. For example, if the following scan classes are specified in the interface startup command file as follows: /f=00:00:05 /f=00:00:15,00:00:02 /f=00:01:00 then, Location4 = 1 for a frequency of 00:00:05, Location4 = 2 for a frequency of 00:00:15 with an offset of 2 seconds, and Location4 = 3 for a frequency of 00:01:00. Event-based points (points that scan when another PI point receives a snapshot value) and output points do not use this location code; Location4 = 0 for these points. Sub-second scan classes are available in version 2.4.8.0 and later. For details on setting up a scan class that can scan sub-second timestamps, please see the section on the /f command line parameter below in the section titled “Interface Startup File Configuration”.

Location5 This attribute is used for status word interpretation.

Instrument Tag For a PI 2 Server, the instrument tag attribute is limited to 32 characters. For a PI 3 Server, the instrument tag is limited to 32 characters if UniInt was not compiled to use the PI-SDK and to 1024 characters if UniInt was compiled to use the PI-SDK. This field contains the name of the WDPF input or output point.

ExDesc The extended descriptor is limited to 80 characters.

Performance Points For UniInt-based interfaces, the extended descriptor is checked for the string “PERFORMANCE_POINT.” If this character string is found, UniInt treats this point as a performance point. See the section called “Performance Points.”

22 Trigger-based Inputs For trigger-based input points, a separate trigger point must be configured. An input point is associated with a trigger point by entering a case-insensitive string in the extended descriptor (ExDesc) PI point attribute of the input point of the form: keyword=trigger_tag_name where keyword is replaced by “event” or “trig” and trigger_tag_name is replaced by the name of the trigger point. There should be no spaces in the string. UniInt automatically assumes that an input point is trigger-based instead of scan- based when the keyword=trigger_tag_name string is found in the extended descriptor attribute. An input is triggered when a new value is sent to the Snapshot of the trigger point. The new value does not need to be different than the previous Snapshot value to trigger an input, but the timestamp of the new value must be greater than (more recent than) or equal to the timestamp of the previous value. This is different than the trigger mechanism for output points. For output points, the timestamp of the trigger value must be greater than (not greater than or equal to) the timestamp of the previous value.

Scan Flag By default, the Scan attribute has a value of 1, which means that scanning is turned on for the point. Setting the scan attribute to 0 turns scanning off. If the scan attribute is 0 when the interface starts, SCAN OFF will be written to the PI point. If the scan attribute is changed from 1 to 0 while the interface is running, SCAN OFF will also be written to the PI point after the point edit is detected by the interface. There is one other situation, which is independent of the Scan attribute, where UniInt will write SCAN OFF to a PI point. If a point that is currently loaded by the interface is edited so that the point is no longer valid for the interface, the point will be removed from the interface, and SCAN OFF will be written to the point. For example, if the PointSource of a PI point that is currently loaded by the interface is changed, the point will be removed from the interface and SCAN OFF will be written to the point.

Source Tag This field is only used for output points. The Source Tag field should contain the name of the PI point whose value will be sent to the WDPF system. The source tag can be any other point on the PI system; e.g. performance calculation, lab tag, etc. The value of the source tag will be written back to the output tag when an output is sent out. When the source tag is not defined for an output point then the value of the output tag will be sent to the WDPF.

Shutdown

PI 2 Server Nodes The Shutdown attribute is not used if the server node is a PI 2 system. For information on configuring shutdown events for PI 2, see Data Archive (DA) section 4.2.3 of PI System Manual I.

Westinghouse WEStation/NT Interface to the PI System 23 PI Point Configuration

PI 3 Server Nodes The shutdown attribute is used only if the server node is a PI 3 system. The Shutdown attribute is 1 (true) by default. The default behavior of the PI Shutdown subsystem is to write the SHUTDOWN digital state to all PI points when PI is started. The timestamp that is used for the SHUTDOWN events is retrieved from a file that is updated by the Snapshot Subsystem. The timestamp is usually updated every 15 minutes, which means that the timestamp for the SHUTDOWN events will be accurate to within 15 minutes in the event of a power failure. For additional information on shutdown events, refer to PI Server manuals.

Note: The SHUTDOWN events that are written by the PI Shutdown subsystem are independent of the SHUTDOWN events that are written by the interface when the /stopstat=Shutdown command-line argument is specified. One can disable SHUTDOWN events from being written to PI when PI is restarted by setting the Shutdown attribute to 0 for each point. Alternatively, one can change the default behavior of the PI Shutdown Subsystem to write SHUTDOWN events only for PI points that have their Shutdown attribute set to 0. To change the default behavior, edit the \PI\dat\Shutdown.dat file, as discussed in PI Server manuals.

Bufserv It is undesirable to write shutdown events when Bufserv is being used. Bufserv is a utility program that provides the capability to store and forward events to a PI Server, allowing continuous data collection when the Server is down for maintenance, upgrades, backups, and unexpected failures. That is, when PI is shut down, Bufserv will continue to collect data for the interface, making it undesirable to write SHUTDOWN events to the PI points for this interface.

24 Performance Point Configuration

One can configure performance points to monitor the amount of time in seconds that an interface takes to complete a scan for a particular scan class. The closer the scan completion time is to 0 seconds, the better the performance. The scan completion time is recorded to millisecond resolution Configuring Performance Points with PI-ICU (NT-Intel)

The PI-Interface Configuration Utility (PI-ICU) provides a user interface for creating and managing Performance Points.

Create To create a Performance Point, right-click the line belonging to the tag to be created, and select Create.

Delete To delete a Performance Point, right-click the line belonging to the tag to be deleted, and select Delete.

Westinghouse WEStation/NT Interface to the PI System 25 Performance Point Configuration

Correct If the “Status” of a point is marked “Incorrect”, the point configuration can be automatically corrected by ICU by right-clicking on the line belonging to the tag to be corrected, and selecting Correct. The Performance Points are created with the following PI attribute values. If ICU detects that a Performance Point is not defined with the following, it will be marked Incorrect:

Attribute Details Tag Tag name that appears in the list box PointSource PointSource for tags for this interface, as specified on the first tab Compressing Off ExcMax 0 Descriptor Interface name + “ Scan Class # Performance Point”

Rename To rename a Performance Point, right-click the line belonging to the tag to be renamed, and select “Rename”. Status The Status column in the Performance Points table indicates whether the Performance Point exists for the scan class in column 2.  Created – Indicates that the Performance Point does exist  Not Created – Indicates that the Performance Point does not exist  Deleted – Indicates that a Performance Point existed, but was just deleted by the user

Scan Class The Scan Class column indicates which scan class the Performance Point in the Tagname column belongs to. There will be one scan class in the Scan Class column for each scan class listed in the Scan Classes combo box on the Uniint Parameters tab.

Tagname The Tagname column holds the Performance Point tag name.

Snapshot The Snapshot column holds the snapshot value of each Performance Point that exists in PI. The Snapshot column is updated when the Performance Points/Counters tab is clicked, and when the interface is first loaded.

26 Configuring Performance Points Manually

Performance point configuration is the same on all operating system platforms. Performance points are configured as follows. 1. Set the extended descriptor to: PERFORMANCE_POINT or to: PERFORMANCE_POINT=interface_id where interface_id corresponds to the identifier that is specified with the /id flag on the startup command line of the interface. The character string PERFORMANCE_POINT is case insenstive. The interface_id does not need to be specified if there is only one copy of an interface that is associated with a particular point source. 2. Set Location4 to correspond to the scan class whose performance is to be monitored. For example, to monitor scan class 2, set Location4 to 2. See the /f flag for a description of scan classes. 3. Set the PointSource attribute to correspond to the /ps flag on the startup command line of the interface. 4. Set the PointType attribute to float32.

Westinghouse WEStation/NT Interface to the PI System 27 I/O Rate Tag Configuration

An I/O Rate point can be configured to receive 10-minute averages of the total number of exceptions per minute that are sent to PI by the interface. An exception is a value that has passed the exception specifications for a given PI point. Since 10- minute averages are taken, the first average is not written to PI until 10 minutes after the interface has started. One I/O Rate tag can be configured for each copy of the interface that is in use. Monitoring I/O Rates on the Interface Node

For NT and UNIX nodes, the 10-minute rate averages (in events/minute) can be monitored with a client application such as PI ProcessBook. For Open VMS nodes, the rate (events/minute) can be monitored with the PISysExe:IOMonitor.exe program or with another client program such as Process Book. The IOMonitor program is discussed on page DA-71 of PI System Manual I. Configuring I/O Rate Tags with PI-ICU (NT-Intel)

The PI-Interface Configuration Utility (PI-ICU) provides a user interface for creating and managing IORates Tags.

PI-ICU currently allows for one I/O Rate tag to be configured for each copy of the interface that is in use. Some interfaces allow for multiple I/O Rates tags.

Enable IORates for this Interface The Enable IORates for this interface check box enables or disables IORates for the current interface. To disable IORates for the selected interface, uncheck this box. To enable IORates for the selected interface, check this box.

Westinghouse WEStation/NT Interface to the PI System 28 Tag Status The Tag Status column indicates whether the IORates tag exists in PI. The possible states are:  Created – This status indicates that the tag exist in PI  Not Created – This status indicates that the tag does not yet exist in PI  Deleted – This status indicates that the tag has just been deleted  Unknown – This status indicates that the ICU is not able to access the PI Server

In File The In File column indicates whether the IORates tag listed in the tag name and the event counter is in the IORates.dat file. The possible states are:  Yes – This status indicates that the tag name and event counter are in the IORates.dat file  No – This status indicates that the tag name and event counter are not in the IORates.dat file

Event Counter The Event Counter correlates a tag specified in the iorates.dat file with this copy of the interface. The command line equivalent is /ec=x, where x is the same number that is assigned to a tag name in the iorates.dat file.

Tagname The tag name listed under the Tagname column is the name of the IORates tag.

Snapshot The Snapshot column holds the snapshot value of the IORates tag, if the IORates tag exists in PI. The Snapshot column is updated when the IORates/Status Tags tab is clicked, and when the interface is first loaded.

Right Mouse Button Menu Options Create Create the suggested IORates tag with the tag name indicated in the Tagname column.

Delete Delete the IORates tag listed in the Tagname column.

Rename Allows the user to specify a new name for the IORates tag listed in the Tagname column.

Westinghouse WEStation/NT Interface to the PI System 29 I/O Rate Tag Configuration

Add to File Adds the tag to the IORates.dat file with the event counter listed in the Event Counter Column.

Search Allows the user to search the PI Server for a previously defined IORates tag. Configuring I/O Rate Tags Manually

There are two configuration steps. 1. Configuring the PI Point on the PI Server 2. Configuration on the Interface Node

Configuring the PI Point on the PI Server

PI 2 Server Nodes A listing of the I/O Rate Tags that are currently being monitored can be obtained with the command: @PISysDat:IOMonitor.com Create an I/O Rate Tag using one of the existing I/O Rate Tags as a template.

PI 3 Server Nodes Create an I/O Rate Tag with the following point attribute values.

Attribute Value PointSource L PointType float32 Compressing 0 ExcDev 0

Configuration on the Interface Node For the following examples, assume that the name of the PI tag is WESPI001, and that the name of the I/O Rate on the home node is WESPI001.

NT Nodes 1. Edit/Create a file called iorates.dat in the PIHOME\dat directory. The PIHOME directory is defined either by the PIPCSHARE entry or the PIHOME entry in the pipc.ini file, which is located in the \WinNT directory. If both are specified, the PIPCSHARE entry takes precedence. Since the PIHOME directory is typically C:\PIPC, the full name of the iorates.dat file will typically be C:\PIPC\dat\iorates.dat.

30 Add a line in the iorates.dat file of the form: WESPI001, x where WESPI001 is the name of the I/O Rate Tag and x corresponds to the first instance of the /ec=x flag in the startup command file. X can be any number between 2 and 34 or between 51 and 200, inclusive. To specify additional rate counters for additional copies of the interface, create additional I/O Rate tags and additional entries in the iorates.dat file. The event counter, /ec=x, should be unique for each copy of the interface. 2. Set the /ec=x flag on the startup command file of the interface to match the event counter in the iorates.dat file. The interface must be stopped and restarted in order for the I/O Rate tag to take effect. I/O Rates will not be written to the tag until 10 minutes after the interface is started.

UNIX Nodes 1. Edit/Create a file called iorates.dat in the $PIHOME/dat directory. PIHOME is an environment variable that is set equal to the PI home directory name as discussed in the PI-API manual. Add a line in the iorates.dat file of the form: WESPI001, x where WESPI001 is the name of the I/O Rate Tag and x corresponds to the first instance of the /ec=x flag in the startup command file. X can be any number between 1 and 34 or between 51 and 200, inclusive. However, it is best to use an event counter, x, that is not equal to 1 because 1 is the default event counter for UniInt-based interfaces. To specify additional rate counters for additional copies of the interface, create additional I/O Rate tags and additional entries in the iorates.dat file. The event counter, /ec=x, should be unique for each copy of the interface. 2. Set the /ec=x flag on the startup command file of the interface to match the event counter in the iorates.dat file. 3. The I/O Rate shared memory server and the I/O Rate monitor program must be stopped and started for the changes to take effect. The easiest way to do this is to run the pistop and pistart command scripts with the following commands: sh $PIHOME/bin/pistop nohup sh $PIHOME/bin/pistart One can determine that the shared memory server and the I/O Rate monitor are running with the commands: ps –ef | grep ioshmsrv ps –ef | grep iorates

Westinghouse WEStation/NT Interface to the PI System 31 Startup Command File

Command-line arguments can begin with a / or with a -. For example, the /ps=M and –ps=M command-line arguments are equivalent.

Notes for NT For NT, command file names have a .bat extension. The NT continuation character (^) allows one to use multiple lines for the startup command. The maximum length of each line is 1024 characters (1 kilobyte). The number of flags is unlimited, and the maximum length of each flag is 1024 characters. The PI-Interface Configuration Utility (PI-ICU) provides a tool for configuring the Interface startup command file. The PI-WESPI interface on Windows has a PI-ICU Control that will aid in configuring the PI-WESPI interface startup command file:

The PI-WEStation Interface control for PI-ICU has 4 sections. A yellow text box indicates that an invalid value has been entered, or that a required value has not been entered.

Westinghouse WEStation/NT Interface to the PI System 32 General Parameters – Please specify the environment variable that points to the PDIR: The WDPF PDIF is the WDPF point directory path environment variable. The environment variable named by this parameter must contain the full path to the WDPF point directory file. Generally, the value is WDPF_PDIR. (/PDIR=envvariable)

General Parameters – Do not send out of order data to PI Checking this box causes the interface not to allow any out of order data being sent to PI. (/NO_OUT_SEQ)

Timestamps – Get timestamps from PI Server / Get timestamps from WEStation The Timestamps option allows users to set whether the interface is to use the client timestamp or the PI server timestamp. Set this parameter to "client" to have current values sent to the PI server with a timestamp of the current WEStation or NT time. Or, set this parameter to "server" to have current values sent to the PI server with a timestamp of the current PI server time. (/TIME=type, where type is client or server)

Debug Flags – Debug On / Verbose Debug On The Debug On check box is used to turn on debug messaging. (/DB). The Developer Debug Flag check box should only be checked if the interface developer has asked that it be turned on. If this box is checked, the interface will generate many MB of log files, and cause the interface to slow down.

Additional Parameters The Additional Parameters section is used to specify and command line parameters not currently supported by the ICU Control.

Notes for UNIX For UNIX, command file names typically have a .sh extension, but UNIX does not enforce file-naming conventions. The backslash (\) continuation character allows one to use multiple lines for the startup command. There is no limit to the command-line length and there is no limit to the number or length of the command line parameters.

Note: The UniInt End User Document includes details about other command-line parameters, which may be useful.

Westinghouse WEStation/NT Interface to the PI System 33 Startup Command File

Command-line Parameters

The interface command line parameters must be edited with site-specific startup parameters. The site specific interface parameters required for interface startup are the same for both the NT and UNIX platforms.

Parameter Description /db Turns on debug messaging from UniInt and Interface Optional /ec=# The first instance of the /ec flag on the command line is used to Optional specify a counter number, x, for an I/O Rate point. If x is not specified, then the default event counter is 1. Also, if the /ec flag Default: /ec=1 is not specified at all, there is still a default event counter of 1 associated with the interface. If there is an I/O Rate point that is associated with an event counter of 1, each copy of the interface that is running without /ec=x explicitly defined will write to the same I/O Rate point. This means that one should either explicitly define an event counter other than 1 for each copy of the interface or one should not associate any I/O Rate points with event counter 1. Configuration of I/O Rate points is discussed in the section called “I/O Rate Tag Configuration.” /f=SS The /f flag defines the time period between scans in terms of or hours (HH), minutes (MM), and seconds (SS). The scans can be /f=SS,SS scheduled to occur at discrete moments in time with an optional or time offset specified in terms of hours (hh), minutes (mm), and /f=HH:MM:SS seconds (ss). If HH and MM are omitted, then the time period that or is specified is assumed to be in seconds. /f=HH:MM:SS,hh: mm:ss Each instance of the /f flag on the command line defines a scan class for the interface. There is no limit to the number of scan classes that can be defined. The first occurrence of the /f flag on Required the command line defines the first scan class of the interface; the second occurrence defines the second scan class, and so on. PI Points are associated with a particular scan class via the Location4 PI Point attribute. For example, all PI Points that have Location4 set to 1 will receive input values at the frequency defined by the first scan class. Similarly, all points that have Location4 set to 2 will receive input values at the frequency specified by the second scan class, and so on. Two scan classes are defined in the following example: /f=00:01:00,00:00:05 /f=00:00:07 or, equivalently: /f=60,5 /f=7 The first scan class has a scanning frequency of 1 minute with an offset of 5 seconds, and the second scan class has a scanning frequency of 7 seconds. When an offset is specified, the scans occur at discrete moments in time according to the formula: scan times = (reference time) + n(frequency) + offset where n is an integer and the reference time is midnight on the day that the interface was started. In the above example, frequency is 60 seconds and offset is 5 seconds for the first scan class. This

34 Parameter Description means that if the interface was started at 05:06:06, the first scan would be at 05:06:10, the second scan would be at 05:07:10, and so on. Since no offset is specified for the second scan class, the absolute scan times are undefined. The definition of a scan class does not guarantee that the associated points will be scanned at the given frequency. If the interface is under a large load, then some scans may occur late or be skipped entirely. See the section called “Performance Point Configuration” for more information on skipped or missed scans. Sub-second Scan Classes (NT and UNIX Only) One can also specify sub-second scan classes on the command line such as /f=0.5 /f=00:00:00.1 where the scanning frequency associated with the first scan class is 0.5 seconds and the scanning frequency associated with the second scan class is 0.1 of a second. Similarly, sub-second scan classes with sub-second offsets can be defined, such as /f=0.5,0.2 /f=1,0 Wall Clock Scheduling

Scan classes that strictly adhere to wall clock scheduling are now possible. This feature is available for interfaces that run on NT and/or UNIX. Previously, wall clock scheduling was possible, but not across daylight savings time. For example, /f=24:00:00,08:00:00 corresponds to 1 scan a day starting at 8 AM. However, after a Daylight Savings Time change, the scan would occur either at 7 AM or 9 AM, depending upon the direction of the time shift. To schedule a scan once a day at 8 AM (even across daylight savings time), one should use /f=24:00:00,00:08:00,L. The ,L at the end of the scan class tells UniInt to use the new wall clock scheduling algorithm. /host=host:port The /host flag is used to specify the PI Home node. Host is Required the IP address of the PI Sever node or the domain name of the PI Server node. Port is the port number for TCP/IP communication. The port is always 5450 for a PI 3 Server and 545 for a PI 2 Server. It is recommended to explicitly define the host and port on the command line with the /host flag. Nevertheless, if either the host or port is not specified, the interface will attempt to use defaults. Defaults: The default port name and server name is specified in the pilogin.ini or piclient.ini file. The piclient.ini file is ignored if a pilogin.ini file is found. Refer to the PI- API manual for more information on the piclient.ini and pilogin.ini files. Examples:

Westinghouse WEStation/NT Interface to the PI System 35 Startup Command File

Parameter Description The interface is running on a PI Interface Node, the domain name of the PI 3 home node is Marvin, and the IP address of Marvin is 206.79.198.30. Valid /host flags would be: /host=marvin /host=marvin:5450 /host=206.79.198.30 /host=206.79.198.30:5450 /id=# The /id flag is used to specify the interface identifier. Required The interface identifier is a string that is no longer than 9 characters in length. UniInt concatenates this string to the header that is used to identify error messages as belonging to a particular interface. See the section called “Error and Informational Messages” for more information. UniInt always uses the /id flag in the fashion described above. This interface also uses the /id flag to identify a particular interface copy number that corresponds to an integer value that is assigned to Location1. For this interface, one should use only numeric characters in the identifier. For example, /id=1 /no_out_seq If this argument is present, no out-of-order data will be sent to PI. Optional /pdir= This parameter names the WDPF point directory path environment EnvVariable variable. The environment variable must contain the full path to the WDPF point directory file, normally WDPF_PDIR. Required /ps=c The /ps flag specifies the point source for the interface. X is not Required case sensitive and can be any single character. For example, /ps=P and /ps=p are equivalent. The point source that is assigned with the /ps flag corresponds to the PointSource attribute of individual PI Points. The interface will attempt to load only those PI points with the appropriate point source. /q Tells the interface to queue up events before putting the data into the PI system. The q version is more efficient if the interface is on Optional a separate computer from the PI Server. However, it will slightly delay the update of the snapshot value if the data rate is low. The buffer size of the event queue for the interface is 128 events.

36 Parameter Description /sio The /sio flag stands for “suppress initial outputs.” The flag Optional applies only for interfaces that support outputs. If the /sio flag is not specified, the interface will behave in the following manner. When the interface is started, the interface determines the current Snapshot value of each output tag. Next, the interface writes this value to each output tag. In addition, whenever an individual output tag is edited while the interface is running, the interface will write the current Snapshot value to the edited output tag. This behavior is suppressed if the /sio flag is specified on the command line. That is, outputs will not be written when the interface starts or when an output tag is edited. In other words, when the /sio flag is specified, outputs will only be written when they are explicitly triggered. /stopstat If the /stopstat flag is present on the startup command line, or then the digital state Intf shut will be written to each PI Point when /stopatat= the interface is stopped. digstate If /stopstat=digstate is present on the command line, then Default: the digital state, digstate, will be written to each PI Point when /stopstat= the interface is stopped. For a PI 3 Server, digstate must be in ”Intf shut” the system digital state table. For a PI 2 Server, where there is only Optional one digital state table available, digstate must simply be somewhere in the table. UniInt uses the first occurrence in the table. If neither /stopstat nor /stopstat=digstate is specified on the command line, then no digital states will be written when the interface is shut down. Examples: /stopstat=”Intf shut” The entire parameter is enclosed within double quotes when there is a space in digstate. /time= Use PI client or server timestamp. Determines which system time the interface program will use as the timestamp for point values sent to the PI snapshot. Set this parameter to "client" to have Required current values sent to the PI server with a timestamp of the current WEStation or NT time. Or, set this parameter to "server" to have current values sent to the PI server with a timestamp of the current PI server time.

Westinghouse WEStation/NT Interface to the PI System 37 Startup Command File

Sample WES_PI.Bat File - NT

The startup file for the interface will reside in the directory PIHOME\interfaces\WESPI and is called WES_PI.bat. An example WES_PI.bat.new is included in the installation file and is shown below. REM WES_PI.bat REM REM Sample batch file for the PI-WEStation Interface Startup REM REM This command procedure passes parameters to the REM process WES_PI. REM REM If multiple copies of the interface are to be run, copy wes_pi.bat to REM wes_pi#.bat where # is the same number passed by /id=# in the command REM string. REM REM Required command-line parameters: REM ------REM REM /ps=c point source character REM /ec=# I/O rate counter REM /f=##:##:##,##:##:## requires at least one frequency (e.g. f=hh:mm:ss) REM /host=Node:Port name of the PI server node REM /id=# Interface number to associate with particular REM interface. Valid numbers are 0 to 7 REM /time=source where source is either client or server REM /pdir=EnvVariable WDPF_PDIR environmental variable that points to REM the WDPF Point Directory REM REM Optional command-line parameters: REM ------REM REM /db=# turns on debug messages REM /sio When the /sio flag is specified, outputs are no REM longer written at startup or when points are REM edited. REM /q Queue up data before sending to PI. REM /stopstat Write Intf Shut to all INPUT points (not REM OUTPUT), zeros the event counters, and disconnect REM from the PI server when interface is stopped. REM REM Run string needs a space between parameters, no spaces within parameters REM unless enclosed in double quotes. REM WES_PI /ps=W /ec=10 /id=1 /host=localhost:5450 /f=00:00:10 /f=00:00:30 ^ /pdir=WDPF_PDIR /time=server REM REM End of WES_PI.bat

38 Sample wes_pi.sh File – Solaris2

The startup file for the interface will reside in the directory $PIHOME/interfaces/WEStation and is called wes_pi.sh. An example wes_pi.sh.new file is shown below and included with the installation. #!/bin/sh # %W% %G% # # wes_pi.bat # # Interactive PI-WEStation Interface Startup # # This command procedure passes parameters to the # process WES_PI. # # If multiple copies of the interface are to be run, copy # wes_pi.bat to wes_pi#.bat where # is the same number passed # by /id=# in the command string. # # Required command-line parameters: # ------# /ps=c point source character # /ec=# I/O rate counter # /f=##:##:##,##:##:## requires at least one frequency (e.g. f=hh:mm:ss) # /host=Node:Port name of the PI server node # /id=# Interface number to associate with particular # interface. Valid numbers are 0 to 7 # /time=source where source is either client or server # /pdir=EnvVariable WDPF_PDIR environmental variable that points to # the WDPF Point Directory # # Optional command line parameters: # ------# /db=# turns on debug messages # /sio When the /sio flag is specified, outputs are no # longer written at startup or when points are # edited. # /q Queue up data before sending to PI. # /stopstat Write Intf Shut to all INPUT points (not # OUTPUT), zeros the event counters, and disconnects # from the PI server when interface is stopped. # # Run string needs a space between parameters, but no spaces # within parameters unless enclosed in double quotes. echo "Starting WEStation to PI interface" ./wes_pi /ps=W /ec=10 /f=00:00:03 /id=1 /pdir=WDPF_PDIR \ /host=prune:5450 /time=client > ../../dat/wes_pi.log 2>&1 &

Westinghouse WEStation/NT Interface to the PI System 39 Interface Node Clock

NT

The correct settings for the time and time zone should be set in the Date/Time control panel. If local time participates in Daylight Savings, from the control panel, configure the time to be automatically adjusted for Daylight Savings Time. The correct local settings should be used even if the interface node runs in a different time zone than the PI Server node. Make sure that the TZ environment variable is not defined. The currently defined environment variables can be listed by going to Start | Settings | Control Panel, double clicking on the system icon, and selecting the environment tab on the resulting dialog box. Also, make sure that the TZ variable is not defined in an autoexec.bat file. When the TZ variable is defined in an autoexec.bat file, the TZ variable may not appear as being defined in the System control panel even though the variable is defined. Admittedly, autoexec.bat files are not typically used on NT, but this does not prevent a rogue user from creating such a file and defining the TZ variable unbeknownst to the System Administrator. UNIX

The correct time and time zone must be configured on the interface node. Also, the interface node should be configured to automatically adjust for daylight savings time for locations that use daylight savings time. The correct local settings should be used even if the interface node runs in a different time zone than the PI Server node.

Westinghouse WEStation/NT Interface to the PI System 40 Security

If the home node is a PI 3 Server, the PI Firewall Database and the PI Proxy Database must be configured so that the interface is allowed to write data to the PI Server. See “Modifying the Firewall Database” and “Modifying the Proxy Database” in the PI Server manuals. Note that the Trust Database, which is maintained by the Base Subsystem, replaces the Proxy Database used prior to PI version 3.3. The Trust Database maintains all the functionality of the proxy mechanism while being more secure. See “Trust Login Security” in the chapter “PI System Management” of the PI Universal Data Server System Management Guide. If the home node is a PI 2 Server, the read/write permissions should be set appropriately in the pisysdat:piserver.dat file on the PI 2 home node. For more information on setting permissions on PI 2, see the pibuild:piserver.txt file on the PI 2 home node. If the interface cannot write data to a PI 3 Server because it has insufficient privileges, a –10401 error will be reported in the pipc.log file. If the interface cannot send data to a PI2 Serve, it writes a –999 error. See the section “Appendix A: Error and Informational Messages” for additional information on error messaging.

Westinghouse WEStation/NT Interface to the PI System 41 Starting / Stopping the Interface on NT

This section describes starting and stopping the interface once it has been installed as a service. See the UniInt End User Document to run the interface interactively.

Starting Interface as a Service

If the interface was installed a service, it can be started from PI-ICU, the services control panel or with the command: WES_PI.exe –start To start the interface service with PI-ICU, use the button on the PI-ICU toolbar. A message will be echoed to the screen informing the user whether or not the interface has been successfully started as a service. Even if the message indicates that the service started successfully, make sure that the service is still running by checking in the services control panel. There are several reasons that a service may immediately terminate after startup. One is that the service may not be able to find the command-line arguments in the associated .bat file. For this to succeed, the root name of the .bat file and the .exe file must be the same, and the .bat file and the .exe file must be in the same directory. If the service terminates prematurely for whatever reason, no error messages will be echoed to the screen. The user must consult the pipc.log file for error messages. See the section “Appendix A: Error and Informational Messages,” for additional information. Stopping Interface Running as a Service

If the interface was installed a service, it can be stopped at any time from PI-ICU, the services control panel or with the command: WES_PI.exe –stop The service can be removed by: WES_PI.exe –remove To stop the interface service with PI-ICU, use the button on the PI-ICU toolbar.

Westinghouse WEStation/NT Interface to the PI System 42 Starting / Stopping the Interface on Solaris2

This section describes starting and stopping the interface as a background process. See the UniInt End User Document to run the interface as a foreground process. Command-line Syntax for Background Processes

Jobs that are run in the background remain in existence even after the user that has started the process has logged off of the system. The command line in the WES_PI1.sh startup command file should begin with nohup and end with &. For example: nohup WES_PI1.exe program_arguments > WES_PI1.log 2>&1 & The & at the end of the command line causes the job to be launched in the background. The nohup at the beginning of the command line causes hang-ups and quits to be ignored. HPUX boxes are notorious for sending hang-up signals to jobs that a user has started when that user logs off. Always execute a background job with nohup, either by incorporating it into the startup command file of the interface or by typing nohup WES_PI1.sh or nohup sh WES_PI1.sh from the terminal. Unless the job is executed with nohup, the hang-up signal will cause the job to be terminated even if it is run in the background. A job that is started with nohup will have its standard output redirected to the file nohup.out, unless the standard output is redirected to a different file name. On the command line above, the standard output is redirected with the > director to the file WES_PI1.log. The optional sequence 2>&1 causes the standard error to be redirected to standard output so that the standard error will also appear in WES_PI1.log. System commands typically send error messages to the standard error. For example, the command: cat nonexistentfile fails with the error message “cat: cannot open nonexistent file: No such file or directory.” This error message is redirected to the standard error, which is normally seen on the screen. Typically, messages that interfaces write to the standard output are also written to the $PIHOME/dat/pimesslogfile. To avoid this duplication, the user can redirect the standard output to the null device, which discards the messages. For example: nohup WES_PI1.exe program_arguments > /dev/null & redirects the standard output to the null device. Initially, it is recommended to use the first command-line example, where the output is redirected to the WES_PI1.log file.

Westinghouse WEStation/NT Interface to the PI System 43 Starting / Stopping the Interface on UNIX

Terminating Background Processes

First, obtain the process id (PID) of the background job. This is done as follows. First execute the command: ps –ef | grep WES_PI which produces output similar to: matzen 12788 12707 2 09:55:27 ttys1 0:00 WES_PI1.exe /ps=B … The second column is the pid of the process. That is, 12788 is the pid of the WES_PI1.exe interface in the example above. The process is then stopped by: kill 12788 The kill command sends the SIGTERM signal to the interface, causing the exit handler to be invoked. Unless it cannot be avoided, do NOT stop the interface with kill –9 pid. The option -9 causes the SIGKILL signal to be sent to the interface. The exit handler cannot catch this signal. SIGKILL will immediately terminate the process. Anomalous Background Job Termination

On some platforms, processes that are started in the background will be terminated if one types “control-c” in the same window that the job was started in. If one closes the window in which the interface was started or if one logs off and logs back on, the user will not be able to accidentally terminate the job in this manner.

44 Buffering

For complete information on buffering, please refer to the PI-API Installation InstructionWestinghouse Westation/NT. PI Interface Node buffering consists of a buffering process which runs continuously on the local node, a PI-API library whose calls can send data to this buffering process, and a utility program for examining the state of buffering and controlling the buffering process.

Note: Change the Local Security Policy on Windows XP. 1. Open "Administrative Tools" from the control panel. 2. Open "Local Security Policy" from administrative tools. 3. Browse to "Security Options" under "Local Policies." 4. Double click on "System Objects: Default owner for objects created by members of the Administrators group." 5. Change the dropdown from "Object Creator" to "Administrators group." The behavior of Bufserv should now be the same on XP as it was for NT4 and 2000. Configuring Buffering with PI-ICU (NT-Intel)

Buffering is enabled through the PI-Interface Configuration Utility’s Tools>API Buffering… menu. Unless buffering is explicitly enabled, the PI-API will not buffer data, sending data directly to the home node. The API Buffering… dialog allows the user to view and configure the parameters associated with the API Buffering (bufserv) process. The user can start and stop the API Buffering process from the Service tab:

Westinghouse WEStation/NT Interface to the PI System 45 Buffering

Service Tab The Service tab allows for some API Buffering service configuration. For further configuration changes, use the Services applet.

Service Name The Service name displays the name of the API Buffering Service.

Display Name The Display name displays the full name associated with the API Buffering service.

Log On As Log on as indicates the Windows user account under which the API Buffering service is setup to start automatically on reboot, or manually.

Password Password is the name of the password for the Windows user account entered in the Log on as: above.

Confirm password You must reenter the password again to verify you have typed it correctly both times.

Dependencies The Dependencies lists the Windows services on which the API Buffering service is dependent.

Dependent Services The Dependent services area lists the Windows services that depend on bufserv to function correctly.

Start / Stop Service The Start / Stop buttons allow for the API Buffering service to be started and stopped. If the service is not created, this box will show Not Installed. After a change is made to any of the settings on the Settings tab, the OK button must be clicked to save these settings, and then the service must be stopped and restarted for the changes to be picked up by bufserv.

Service Startup Type The Startup Type indicates whether the API Buffering service is setup to start automatically on reboot or manually on reboot, or is disabled.  If the Auto option is selected, the service will be installed to start automatically when the machine reboots.  If the Manual option is selected, the interface service will not start on reboot, but will require someone to manually start the service.  If the Disabled option is selected, the service will not start at all.

46 Generally, the API Buffering service is set to start automatically.

Create/Remove Service The Create / Remove buttons allow for the creation or removal of the API Buffering service. Clicking the Create button will cause the service to be created using the Log on as and passwords given. Once the service is created the Start / Stop buttons will be activated.

Settings Tab The Settings tab allows for configuration of the 7 configurable settings used by API Buffering. Default values are used if no other value is provided.

Enable Buffering Enables the API Buffering feature.

Maximum File Size Maximum buffer file size in kilobytes before buffering fails and discards events. Default value is 100,000. Range is 1 to 2,000,000. The Use Default button places the default value into the text box. To keep this value, click the Apply button.

Send Rate Send rate is the time to wait between sending up to MAXTRANSFEROBJS to the server (milliseconds). Default value is 100. Range is 0 to 2,000,000. The Use Default button places the default value into the text box. To keep this value, click the Apply button.

Westinghouse WEStation/NT Interface to the PI System 47 Buffering

Primary Memory Buffer Size Primary memory buffer size is the size in bytes of the Primary memory buffer. Default value is 32768. Range is 64 to 2,000,000. The Use Default button places the default value into the text box. To keep this value, click the Apply button.

Secondary Memory Buffer Size Secondary memory buffer size is the size in bytes of the Secondary memory buffer. Default value is 32768. Range is 64 to 2,000,000. The Use Default button places the default value into the text box. To keep this value, click the Apply button.

Max Transfer Objects Max transfer objects is the maximum number of events to send between each SENDRATE pause. Default value is 500. Range is 1 to 2,000,000. The Use Default button places the default value into the text box. To keep this value, click the Apply button.

Pause Rate When buffers are empty the buffering process will wait for this number of seconds before attempting to send more data to the home node. Default value is 2. Range is 0 to 2,000,000. The Use Default button places the default value into the text box. To keep this value, click the Apply button.

Retry Rate When the buffering process discovers the home node is unavailable it will wait this number of seconds before attempting to reconnect. Default value is 120. Range is 0 to 2,000,000. The Use Default button places the default value into the text box. To keep this value, click the Apply button.

Max Theoretical Send Rate This is the theoretical max send rate which is calculated like this: max = MAXTRANSFEROBJS / SENDRATE * 1000 Default value is 5000. This value is automatically calculated for the user and can not be changed. There are no additional steps needed to install buffering after installing the PI-API. The delivered PI-API library supports both buffered and un-buffered calls. Configuring Buffering Manually

Buffering is enabled through the use of a configuration file, piclient.ini. Unless this file is modified to explicitly enable buffering, the PI-API will not buffer data, sending data directly to the home node.

48 There are no additional steps needed to install buffering after installing the PI-API. The delivered PI-API library supports both buffered and un-buffered calls.

Note: When buffering is configured to be on, the bufserv process must be started before other programs using the PI-API, so that these programs can access the shared buffering resources. Any program that makes a connection to a PI Server has this requirement even if it does not write to PI.

Configuration of buffering is achieved through entries in the piclient.ini file. The file is found in the dat subdirectory of the PIHOME directory (typically c:\pipc\dat) under Windows NT. On UNIX systems, the file is found in the dat subdirectory of the PIHOME directory (e.g., /opt/piapi/dat). This file follows the conventions of Microsoft Windows initialization files with sections, keywords within sections, and values for keywords. All buffering settings are entered in a section called [APIBUFFER]. To modify settings, simply edit the piclient.ini file in a text editor (Notepad on Windows, vi on UNIX) to the desired values. The following settings are available for buffering configuration:

Keywords Values Defaul Description t BUFFERING 0,1 0 Turn off/on buffering. OFF = 0, ON = 1, PAUSERATE 0 – 2,000,000 2 When buffers are empty the buffering process will wait for this long before attempting to send more data to the home node (seconds) RETRYRATE 0 – 2,000,000 120 When the buffering process discovers the home node is unavailable it will wait this long before attempting to reconnect (seconds) MAXFILESIZE 1 – 2,000,000 100,000 Maximum buffer file size before buffering fails and discards events. (Kbytes) MAXTRANSFEROBJS 1 – 2,000,000 500 Maximum number of events to send between each SENDRATE pause. BUF1SIZE 64 – 2,000,000 32768 Primary memory buffer size. (bytes) BUF2SIZE 64 – 2,000,000 32768 Secondary memory buffer size. (bytes) SENDRATE 0 – 2,000,000 100 The time to wait between sending up to MAXTRANSFEROBJS to the server (milliseconds)

In addition to the [APIBUFFER] section, the [PISERVER] section may be used to define the default PI server and an optional time offset change that may occur between the client and server.

Keywords Values Defaul Description t PIHOMENODE string none Default server for UNIX. Windows default server is in pilogin.ini

Westinghouse WEStation/NT Interface to the PI System 49 Buffering

DSTMISMATCH 0 – 2,000,000 0 The time that the server and client local time offset is allowed to jump. Typically, 3600 if the nodes are in time zones whose DST rules differ (seconds)

Example piclient.ini File

NT On Windows NT the default server information is stored in the pilogin.ini file so the piclient.ini would only have the [APIBUFFER] section. The BUFFERING=1 indicates that buffering is on. The MAXFILESIZE entry in Kbytes of 100000 allows up to 100 Megabytes of data storage. Do not use commas or other separators in the numeric entries. The retry rate is set to 600 seconds, meaning “Wait 10 minutes after losing a connection before retrying”. On NT a piclient.ini file might look like: [APIBUFFER] BUFFERING=1 MAXFILESIZE=100000 ; The PI-API connection routines have a 1 minute default timeout. RETRYRATE=600 Unix The BUFFERING=1 indicates that buffering is on. The MAXFILESIZE entry in Kbytes of 100000 allows up to 100 Megabytes of data storage. Do not use commas or other separators in the numeric entries. The retry rate is set to 600 seconds meaning wait 10 minutes after losing a connection before retrying. The [PISERVER] and [TCP/IP] sections are used to define the default connection. Comment lines begin with a semicolon. On UNIX a piclient.ini file might look like: [PISERVER] PIHOMENODE=MYNTSERVER ; DSTMISMATCH=0 [TCP/IP] PORT=5450 [APIBUFFER] BUFFERING=1 MAXFILESIZE=100000 ; The PI-API connection routines have a 1 minute default timeout. RETRYRATE=600

50 Appendix A: Error and Informational Messages

A string NameID is pre-pended to error messages written to the message log. Name is a non-configurable identifier that is no longer than 9 characters. ID is a configurable identifier that is no longer than 9 characters and is specified using the /id flag on the startup command line. Message Logs

The location of the message log depends upon the platform on which the interface is running. See the UniInt End User Document for more information. Messages are written to PIHOME\dat\pipc.log at the following times. When the interface starts many informational messages are written to the log. These include the version of the interface, the version of UniInt, the command-line parameters used, and the number of points. As the interface retrieves points, messages are sent to the log if there are any problems with the configuration of the points. If the /db is used on the command line, then various informational messages are written to the log file. Messages

Problem: The following error is found in the wespi.log: ld.so.1: ./wes_pi: fatal: relocation error: symbol not found: _vector_con_: referenced in /opt/piapi/lib/libpiapi.so and the interface will not start. Explanation: Those affected are Westinghouse WEStation users upgrading the PI API to 1.3.0+. Solution: The solution is to upgrade to the Westinghouse WEStation to PI Interface version 2.3.7 or later. System Errors and PI Errors

System errors are associated with positive error numbers. Errors related to PI are associated with negative error numbers.

Error Descriptions on NT and Unix On NT and Unix, descriptions of system and PI errors can be obtained with the pidiag utility: NT:\PI\adm\pidiag –e error_number Unix: /PI/adm/pidiag –e error_number

Westinghouse WEStation/NT Interface to the PI System 51 Appendix B: Define PI Tags Using WDPF Database Information wes_pnt Utility

The wes_pnt program, provided with the WEStation to PI Interface, creates a text file of point information from the WDPF system. The text file created can then be used as input to piconfig (PI3) or pidiff (PI2) to create PI tags. When executed, wes_pnt queries the WDPF database for information on the WDPF points matching the WDPF record types as specified by the user. The information retrieved is written to an output file specified by the user. The wes_pnt program should be run twice, once for analog points and once for digital points. This keeps the analogs and digitals in separate files for loading into piconfig or pidiff. Keeping them separated allows for setting up different defaults for the analogs and digitals when loading with piconfig or pidiff. The wes_pnt program prompts the user for input.

Obtaining Analog Points An example of running wes_pnt to obtain WDPF analog points is given below: cd /opt/piapi/interfaces/WEStation wes_pnt Enter the directory path and file name of the point directory file to be used: /usr/wdpf/shc/config/spd.online Enter the WDPF network number to use in the point directory (0 - 15): 1 Enter comma delimited record types (AI,AL,DI,...) [blank for all]: ai,al Get descriptor, eng units from WDPF ([Y]/N)? y Enter the directory path and file name of the output file for the points found: /opt/piapi/adm/wes_analogs.dat

This results in the following information printed to the file wes_analogs.dat. AAAOUT , 65940, 80, 1, 1, AOUT/309 ANALOG OUTPUT , VOLTS , , 0, 10 AACTLDGN , 65941, 80, 1, 1, AVALGEN/316 DERIVATIVE GAIN , D GAIN, , 0, 100

Westinghouse WEStation/NT Interface to the PI System 52 AACTLERR , 65942, 80, 1, 1, AVALGEN/311 INPUT ERROR , ERROR , , -100, 200 AACTLGN , 65943, 80, 1, 1, AVALGEN/314 GAIN , GAIN , , 0, 100 AACTLHIL , 65944, 80, 1, 1, AVALGEN/312 HIGH LIMIT , HI LIM, , -100, 200 AACTLLOL , 65945, 80, 1, 1, AVALGEN/313 LOW LIMIT , LO LIM, , -100, 200 AACTLRC , 65946, 80, 1, 1, AVALGEN/317 RATE CONSTANT , RATE C, , 0, 100 AACTLRST , 65947, 80, 1, 1, AVALGEN/315 RESET TIME , RESET , , 0, 100 AACTLTRI , 65948, 80, 1, 1, AVALGEN/318 TRACK INPUT VALUE , TRK IN, , -100, 200 AAINT01 , 65950, 80, 1, 1, INTEGRAL/320 OUTPUT , INT320, , -100, 200 AAINT02 , 65951, 80, 1, 1, INTEGVGR/321 OUTPUT , INT321, , -100, 200 AAINT03 , 65952, 80, 1, 1, INTEGVLM/322 OUTPUT , INT322, , -110, 220 Obtaining Digital Points An example of running wes_pnt to obtain WDPF digital points is given below: cd /opt/piapi/interfaces/WEStation wes_pnt Enter the directory path and file name of the point directory file to be used: /usr/wdpf/shc/config/spd.online Enter the WDPF network number to use in the point directory (0 - 15): 1 Enter comma delimited record types (AI,AL,DI,...) [blank for all]: di,dl Get descriptor, eng units from WDPF ([Y]/N)? y Enter the directory path and file name of the output file or the points found: /opt/piapi/adm/wes_digitals.dat

This results in the following information printed to the file wes_digitals.dat. ADCTLTRM , 65996, 130, 1, 1, DVALGEN/319 TRACK MODE , ONE , ZERO , 0, 100 ADCUTALG , 65997, 130, 0, 1, SOFTWARE CUTOUT FOR ALGORITHMS, CUTOUT, NOTCUT, 0, 100 ADCUTBC , 65998, 130, 0, 1, SOFTWARE CUTOUT FOR BOILER CTL, CUTOUT, NOTCUT, 0, 100

Westinghouse WEStation/NT Interface to the PI System 53 Define PI tags Using WDPF Database Information

ADCUTHSR , 65999, 130, 0, 1, SOFTWARE CUTOUT FOR HSR POINTS, CUTOUT, NOTCUT, 0, 100 ADCUTLOG , 66000, 130, 0, 1, SOFTWARE CUTOUT FOR LOG POINTS, CUTOUT, NOTCUT, 0, 100 ADCUTSOE , 66001, 130, 0, 1, SOFTWARE CUTOUT FOR SOE POINTS, CUTOUT, NOTCUT, 0, 100 ADDOUT , 66002, 130, 1, 1, DOUT/310 DIGITAL OUTPUT , ONE , ZERO , 0, 100 ADLA901 , 66004, 130, 1, 1, COIL 1 FOR LADDER VERIFY , ON , OFF , 0, 100 ADLA902 , 66005, 130, 1, 1, COIL 2 FOR LADDER VERIFY , ON , OFF , 0, 100 ADLA903 , 66006, 130, 1, 1, COIL 3 FOR LADDER VERIFY , ON , OFF , 0, 100 ADQINC1 , 66011, 130, 1, 1, GROUP 01 QUALITY INCREMENT , INC Q , SAME Q, 0, 100 ADQINC2 , 66012, 130, 1, 1, GROUP 02 QUALITY INCREMENT , INC Q , SAME Q, 0, 100 ADQINC3 , 66013, 130, 1, 1, GROUP 03 QUALITY INCREMENT , INC Q , SAME Q, 0, 100 ADQINC4 , 66014, 130, 1, 1, GROUP 04 QUALITY INCREMENT , INC Q , SAME Q, 0, 100 ADQINC5 , 66015, 130, 1, 1, GROUP 05 QUALITY INCREMENT , INC Q , SAME Q, 0, 100

Using piconfig

To load the wes_pnt data files into PI3 using piconfig use the following piconfig commands to define the structure of the data and set defaults.

Creating Analog Points * structure file for loading wes_pnt analog data file * @ptclass classic @table pipoint @mode create @stype F @istruct TAG,1,1,16 @istruct INSTRUMENTTAG,1,1,16 @istruct DESCRIPTOR,1,40,30 @istruct ENGUNITS,1,72,6 @istruct ZERO,1,88,10 @istruct SPAN,1,100,10 @istruct TYPICALVALUE,1,88,10 @modify PTCLASS=classic @modify POINTTYPE=float32 @modify POINTSOURCE=W

54 @modify DATAACCESS='o:rw g:rw w:rw' @modify LOCATION1=1 @modify LOCATION2=0 @modify LOCATION3=0 @modify LOCATION4=1 @modify LOCATION5=0 @modify COMPMIN=0 @modify EXCMIN=0 Creating Digital Points * create a default digital state set * @table pids @mode create @istruct set,state,... boolean, False, True @endsection

* * structure file for loading wes_pnt digital data file * @ptclass classic @table pipoint @mode create @stype F @istruct TAG,1,1,16 @istruct INSTRUMENTTAG,1,1,16 @istruct DESCRIPTOR,1,40,30 @modify DIGITALSET=boolean @modify PTCLASS=classic @modify POINTTYPE=digital @modify POINTTSOURCE=W @modify DATAACCESS='o:rw g:rw w:rw' @modify LOCATION1=1 @modify LOCATION2=0 @modify LOCATION3=0 @modify LOCATION4=1 @modify LOCATION5=0 @modify COMPMIN=0 @modify EXCMIN=0

Westinghouse WEStation/NT Interface to the PI System 55 Define PI tags Using WDPF Database Information

Westinghouse SPD_list Utility

The Westinghouse utility SPD_list provides a list of the Westinghouse tag names and their associated VXI SPD numbers. An example usage is C:\wdpf\shc\bin> SPD_list c:\wdpf\shc\spd\spd.dir > file.txt The result is a file.txt file with Westinghouse tag names and VXI SPD numbers.

56 Appendix C: Trend PI Data on WDPF WEStation or Classic Operator Console

Trending data on either the WDPF WEStation or Classic operator consoles is completely independent upon the collection of data by a PI interface to the WDPF system. The ability to trend data on a WDPF WEStation operator console is included with the standard WEStation operator console software. The user can choose to display PI data by specifying the appropriate PI Server name as the source of the historical data. Trending on a WDPF Classic operator console requires an intermediary WEStation to provide the necessary software to retrieve data from the PI Server. Again, the user can choose to display PI data by specifying the appropriate PI Server name as the source of the historical data.

Westinghouse WEStation/NT Interface to the PI System 57 Revision History

Date Author Comments 2-Jul-98 HAO Document taken over from Bob N. Westinghouse 12-Aug-98 HAO Added note about using gunzip 3-Dec-98 HAO Added Appendix D on .exe distribution files 13-Jan-99 HAO Incremented version to 2.3.4 28-Jan-99 HAO Removed references to RNI interface 13-Apr-99 HAO Added Packed Digital and Packed Group reads 04-May-99 HAO Added Troubleshooting section with _vector_con_ error 21-Jul-99 HAO Just some cleanup 29-Jul-99 HAO Added section on WDPF and WEStation software version compatibility. 14-Dec-99 HAO Removed incorrect statement that only one scan class is allowed. (2.3.6+, doc rev A) 28-Mar-00 HAO Removed incorrect reference to Exception not being used by the interface. (2.3.6+, doc rev B) 28-Apr-00 HAO Modified installation instructions (2.3.6+, doc rev C) 15-May-00 HAO Doc incorrectly stated that NT version does not need the /pdir. (2.3.6+, doc rev D) 22-May-00 HAO Corrected sitestart, sitestop, and S99_ZPIAPI scripts (2.3.6+, doc rev E) 02-Jun-00 HAO Added wdpfservice dependency to NT service startup; info on the Westinghouse SPD_list utility. (2.3.6+, doc rev F) 20-Jun-00 HAO Added support for PB/PX GB/GX outputs (2.4.7.4) 13-Nov-00 HAB Modified references to /q= to be /q, as no value is passed (2.4.7.4, doc rev A) 08-Mar-01 HAB Added section on WESPI ICU Control. (2.4.7.4, doc rev B) 17-Apr-01 HAB Added info on sub-second timestamps. (2.4.8.0) 05-Sep-01 HAB Updated ICU Control section (2.4.8.0, Doc Rev A) 25-Oct-01 HAB Updated version to 2.5.0.0 to match ICU Control compatible version 06-Feb-02 HAB Added support for AI and AL High Alarm Limit and Low Alarm Limit (2.5.0.1) 07-Feb-02 HAB Added info on MSI setup for Windows platforms (2.5.0.1) 11-Feb-02 HAB Corrected references to /opt/pi to /opt/piapi (2.5.0.1, doc rev A). 17-May-02 HAB Clarified event-based as a based on another PI tag receiving a

Westinghouse WEStation/NT Interface to the PI System 58 Date Author Comments snapshot (2.5.0.1, doc rev B). 23-Nov-02 Chrys Added 2.5.0.7 to version on title page 24-Jan-03 HAB Added /no_out_seq command line arg (2.5.0.7, doc rev D) 31-Jan-03 HAB WDPF must be 6.8 or later to allow NT interface to work (2.5.0.7, doc rev E) 7-Sep-05 MKelly Updated the manual to conform to Interface Skeleton Manual (1.15) (2.6.0.1, doc rev F) 15-Sep-05 MKelly Minor formatting changes. Fixed headers and footer and made final. 5-Oct-05 Chrys Version 2.5.0.1 to 2.6.0.1 Rev G: Took out references to VMS interface nodes as this does not run on VMS; reformatted; cleaned up command-line parameters 23-May-07 GMillar Fixed wrong reference for LD_LIBRARY_PATH

Westinghouse WEStation/NT Interface to the PI System 59

Recommended publications