foxboro i/a 51 and 70 series interface to the pi...

211
Foxboro I/A 51 and 70 Series Interface to the PI System Version 2.3.8.66 Revision B

Upload: others

Post on 25-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Foxboro I/A 51 and 70 SeriesInterface to the PI System

Version 2.3.8.66Revision B

Copyright © 1997-2023 OSIsoft, Inc.

Page 2: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

OSIsoft, Inc. 777 Davis St., Suite 250San Leandro, CA 94577 USA(01) 510-297-5800 (main phone)(01) 510-357-8136 (fax) (01) 510-297-5828 (support phone) http://[email protected], TX Johnson City, TN Longview, TX Mayfield Heights, OHPhiladelphia, PAPhoenix, AZ Savannah, GA

OSIsoft AustraliaPerth, Australia

OSI Software GmbH Altenstadt, Germany

OSIsoft Asia Pte Ltd.Singapore

OSIsoft Canada ULCMontreal, CanadaCalgary, Canada 

OSIsoft, Inc. Representative OfficeShanghai, People’s Republic of China 

OSIsoft Japan KKTokyo, Japan 

OSIsoft Mexico S. De R.L. De C.V.Mexico City, Mexico

OSIsoft do Brasil Sistemas Ltda.Sao Paulo, Brazil  

Sales Outlets/DistributorsMiddle East/North AfricaRepublic of South AfricaRussia/Central Asia

South America/CaribbeanSoutheast AsiaSouth Korea Taiwan

www.osisoft.comAll rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, photocopying, recording, or otherwise, without the prior written permission of OSIsoft, Inc. 

OSIsoft, the OSIsoft logo and logotype, PI Analytics, PI ProcessBook, PI DataLink, ProcessPoint, Sigmafine, Analysis Framework,  PI Datalink, IT Monitor, MCN Health Monitor, PI System, PI ActiveView, PI ACE, PI AlarmView, PI BatchView, PI ManualLogger, PI ProfileView, ProTRAQ, RLINK, RtAnalytics, RtBaseline, RtPortal, RtPM, RtReports and RtWebParts are all trademarks of OSIsoft, Inc. All other trademarks or trade names used herein are the property of their respective owners.

RESTRICTED RIGHTS LEGEND

Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph I(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013

iii

Page 3: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Table of Contents

Terminology.................................................................................................................. ix

Introduction....................................................................................................................1Reference Manuals......................................................................................................1

Supported Features......................................................................................................2

Diagram of Hardware Connection................................................................................6

Principles of Operation.................................................................................................9Buffered Access...........................................................................................................9

Unbuffered Access.......................................................................................................9

Object Status..............................................................................................................10

Outputs.......................................................................................................................10

Installation Checklist...................................................................................................13Data Collection Steps.................................................................................................13

Interface Diagnostics..................................................................................................16

Advanced Interface Features.....................................................................................16

Interface Installation on Windows..............................................................................17Naming Conventions and Requirements....................................................................17

Interface Directories...................................................................................................17

PIHOME Directory Tree..........................................................................................17

Interface Installation Directory................................................................................18

FoxAPI Installation.....................................................................................................18

Interface Installation Procedure..................................................................................18

Installing Interface as a Windows Service..................................................................20

Installing Interface Service with PI Interface Configuration Utility...........................20

Installing Interface Service Manually......................................................................23

Interface Installation on UNIX.....................................................................................25Naming Conventions and Requirements....................................................................25

Interface Directories...................................................................................................26

Foxboro I/A 51 and 70 Series Interface to the PI System iii

Page 4: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PIHOME Directory..................................................................................................26

Interface Installation Directory................................................................................26

FoxAPI Installation.....................................................................................................26

PI API Installation Procedure.....................................................................................27

Interface Installation Procedure..................................................................................30

Installing Multiple Instances of the Interface..............................................................32

Multiple Instances in a Single Directory..................................................................32

Multiple Instances in a Separate Directories..........................................................33

FoxAPI Test Program..................................................................................................37

Digital States................................................................................................................41

PointSource..................................................................................................................43

PI Point Configuration.................................................................................................45Point Attributes...........................................................................................................45

Tag.........................................................................................................................45

PointSource............................................................................................................46

PointType...............................................................................................................46

Location1................................................................................................................46

Location2................................................................................................................46

Location3................................................................................................................47

Location4................................................................................................................48

Location5................................................................................................................49

InstrumentTag........................................................................................................49

ExDesc...................................................................................................................49

UserInt1..................................................................................................................54

Scan.......................................................................................................................54

Shutdown................................................................................................................54

Output Points..............................................................................................................55

Trigger Method 1 (Recommended).........................................................................55

Trigger Method 2....................................................................................................56

Point Configuration Examples....................................................................................56

Profile Points..............................................................................................................57

Startup Command File.................................................................................................59Configuring the Interface with PI ICU.........................................................................59

Foxboro I/A 51 and 70 Series Interface to the PI System iv

Page 5: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Fxbais Interface page.............................................................................................62

Command-line Parameters.........................................................................................67

Sample fxbais.bat file.................................................................................................72

Sample fxbais.sh file..................................................................................................73

fxbais.ini Configuration File........................................................................................77

Interface Node Clock...................................................................................................81

Security.........................................................................................................................83Windows and UNIX....................................................................................................83

Starting / Stopping the Interface on Windows...........................................................85Starting Interface as a Service...................................................................................85

Stopping Interface Running as a Service...................................................................85

Starting / Stopping the Interface on UNIX..................................................................87Interface Startup Script...............................................................................................87

Interface Stop Script...................................................................................................87

Automatic startup and shutdown................................................................................88

Automatic startup on a reboot....................................................................................88

Terminating Background Processes...........................................................................89

Anomalous Background Job Termination..................................................................89

Buffering.......................................................................................................................91Which Buffering Application to Use............................................................................91

How Buffering Works..................................................................................................92

Buffering and PI Server Security................................................................................93

Enabling Buffering on an Interface Node with the ICU...............................................93

Choose Buffer Type................................................................................................93

Buffering Settings...................................................................................................94

Buffered Servers.....................................................................................................97

Installing Buffering as a Service...........................................................................100

Configuring PI API Buffer Server (BufServ) Manually..............................................102

Buffering Settings.................................................................................................102

BufServ and n-way buffering................................................................................103

Kernel Resource Configuration on Solaris............................................................105

Interface Diagnostics Configuration........................................................................109Scan Class Performance Points...............................................................................109

Foxboro I/A 51 and 70 Series Interface to the PI System v

Page 6: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Table of Contents

Configuring Scan Class Performance Points on UNIX.............................................112

Performance Counters Points on Windows..............................................................112

Interface Health Monitoring Points...........................................................................115

Configuring Interface Health Points with the ICU.................................................115

Configuring Interface Health Points Manually.......................................................117

Interface Health Point Keywords..........................................................................117

I/O Rate Point...........................................................................................................122

Configuring I/O Rate Tags On UNIX........................................................................124

Configuring PI Point on the PI Server...................................................................124

Configuration on the Interface Node.....................................................................125

Interface Status Point...............................................................................................125

Appendix A: Error and Informational Messages.....................................................127Message Logs..........................................................................................................127

System Errors and PI Errors.....................................................................................127

Extra Debugging Messages.....................................................................................128

List Event Counters and Location5..........................................................................130

Common Problems...................................................................................................130

Operational Hints......................................................................................................134

Solaris/Unix...........................................................................................................134

Updates and HotFixes for the FoxAPI..................................................................135

Reading an Entire MCIN/MCOUT Block...............................................................136

Reading I/A Series Messages..............................................................................136

FoxAPI Configuration Settings (foxapi.cfg)...........................................................136

Time Difference Reported by the Interface...........................................................138

Appendix B: Failover Support.................................................................................139Parameters for Operation.........................................................................................141

Design Details..........................................................................................................144

Operational Scenarios..............................................................................................148

Failover Installation Checklist...................................................................................150

Miscellaneous Information on Failover.....................................................................151

Appendix C: Notes on Upgrading from Previous Versions...................................153Required -host= argument........................................................................................153

ExDesc keywords no longer supported....................................................................153

PIHOME and LD_LIBRARY variables defined in /.cshrc..........................................153

vi

Page 7: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Install Procedure......................................................................................................154

Appendix D: FoxAPI Configuration..........................................................................157

Appendix E: FoxAPI Status Definition.....................................................................159Status Definition for I/A Series Version 4.1 and Earlier............................................159

Status Definition for I/A Series Version 4.2 and Later..............................................160

Storing Status Values in PI.......................................................................................161

Revision History.........................................................................................................163

Foxboro I/A 51 and 70 Series Interface to the PI System vii

Page 8: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

TerminologyTo understand this interface manual, you should be familiar with the terminology used in this document.

BufferingBuffering refers to an Interface Node’s ability to store temporarily the data that interfaces collect and to forward these data to the appropriate PI Servers.

N-Way BufferingIf you have PI Servers that are part of a PI Collective, PIBufss supports n-way buffering. N-way buffering refers to the ability of a buffering application to send the same data to each of the PI Servers in a PI Collective. (Bufserv also supports n-way buffering to multiple PI Server however it does not guarantee identical archive records since point compressions specs could be different between PI Servers. With this in mind, OSIsoft recommends that you run PIBufss instead.)

ICUICU refers to the PI Interface Configuration Utility. The ICU is the primary application that you use to configure and run PI interface programs. You must install the ICU on the same computer on which an interface runs. A single copy of the ICU manages all of the interfaces on a particular computer.

You can configure and run an interface by editing a startup command file. However, OSIsoft discourages this approach. Instead, OSIsoft strongly recommends that you use the ICU for interface management tasks.

ICU ControlAn ICU Control is a plug-in to the ICU. Whereas the ICU handles functionality common to all interfaces, an ICU Control implements interface-specific behavior. Most PI interfaces have an associated ICU Control.

Interface NodeAn Interface Node is a computer on which

the PI API and/or PI SDK are installed, and

PI Server programs are not installed.

PI APIThe PI API is a library of functions that allow applications to communicate and exchange data with the PI Server. All PI interfaces use the PI API.

PI CollectiveA PI Collective is two or more replicated PI Servers that collect data concurrently. Collectives are part of the High Availability environment. When the primary PI Server in a collective becomes unavailable, a secondary collective member node seamlessly continues to collect and provide data access to your PI clients.

Foxboro I/A 51 and 70 Series Interface to the PI System ix

Page 9: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PIHOMEPIHOME refers to the directory that is the common location for PI client applications. A typical PIHOME is C:\Program Files\PIPC. PI interfaces reside in a subdirectory of the Interfaces directory under PIHOME. For example, files for the Modbus Ethernet Interface are in C:\Program Files\PIPC\Interfaces\ModbusE.

This document uses [PIHOME] as an abbreviation for the complete PIHOME directory. For example, ICU files in [PIHOME]\ICU.

PI SDKThe PI SDK is a library of functions that allow applications to communicate and exchange data with the PI Server. Some PI interfaces, in addition to using the PI API, require the use of the PI SDK.

PI Server NodeA PI Server Node is a computer on which PI Server programs are installed. The PI Server runs on the PI Server Node.

PI SMTPI SMT refers to PI System Management Tools. PI SMT is the program that you use for configuring PI Servers. A single copy of PI SMT manages multiple PI Servers. PI SMT runs on either a PI Server Node or a PI Interface Node.

Pipc.logThe pipc.log file is the file to which OSIsoft applications write informational and error messages. While a PI interface runs, it writes to the pipc.log file. The ICU allows easy access to the pipc.log.

PointThe PI point is the basic building block for controlling data flow to and from the PI Server. For a given timestamp, a PI point holds a single value.

A PI point does not necessarily correspond to a “point” on the foreign device. For example, a single “point” on the foreign device can consist of a set point, a process value, an alarm limit, and a discrete value. These four pieces of information require four separate PI points.

ServiceA Service is a Windows program that runs without user interaction. A Service continues to run after you have logged off from Windows. It has the ability to start up when the computer itself starts up.

The ICU allows you to configure a PI interface to run as a Service.

Tag (Input Tag and Output Tag)The tag attribute of a PI point is the name of the PI point. There is a one-to-one correspondence between the name of a point and the point itself. Because of this relationship, PI System documentation uses the terms “tag” and “point” interchangeably.

Foxboro I/A 51 and 70 Series Interface to the PI System x

Page 10: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interfaces read values from a device and write these values to an Input Tag. Interfaces use an Output Tag to write a value to the device.

Foxboro I/A 51 and 70 Series Interface to the PI System xi

Page 11: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

IntroductionThe PI Foxboro data collection interface program provides for the bi-directional transfer of data between OSIsoft’s PI Server and Foxboro’s I/A Series system. Foxboro’s I/A Series systems run on either Solaris (51 Series) or Windows NT/XP (70 Series) computers.

In order to run the PI Foxboro Interface, a computer must have the following software installed:

OSIsoft PI API version 1.3.x or higher (the current released version of the PI API is recommended).

Foxboro local FoxAPI version 4.x.x if the Interface is to run on an I/A Series AW/AP, or

Foxboro netFoxAPI version 4.x.x if the Interface is to run on a generic Solaris machine

Foxboro recommends the use of the current release of the FoxAPI.

The choice of the FoxAPI version (i.e., whether local or networked) depends on the type of machine on which the PI Foxboro Interface runs. If this machine is:

An I/A Series AW/AP, local FoxAPI is required. Note that Foxboro does not install the FoxAPI on WP machines, and so they cannot be used to run the interface.

A generic Solaris machine which is not a part of the Foxboro I/A system, then netFoxAPI must be purchased and installed on this generic Solaris machine. In addition, netFoxAPI software must also be licensed at the netFoxAPI server machine. The standard FoxAPI manuals describe this operation.

Reference Manuals

OSIsoft PI Server manuals

PI API Installation Manual

UniInt Interface User Manual

Foxboro Foxboro I/A Series documentation

I/A Series FoxAPI Installation Guide (B0193UC)

I/A Series FoxAPI User’s Guide (B0193UD)

Foxboro I/A 51 and 70 Series Interface to the PI System 1

Page 12: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Supported FeaturesFeature Support

Part Number PI-IN-FX-IA-SOL2PI-IN-FX-IA-NTI

* Platforms Solaris 2.5.1 / 8 / 10Windows (XP, 2003)

APS Connector No

Point Builder Utility No

ICU Control Yes (Windows only)

PI Point Types float16 / float 32 / float 64 / int16 / int32 / digital / string

Sub-second Timestamps Yes

Sub-second Scan Classes Yes (but of limited use. See note below)

Automatically Incorporates PI Point Attribute Changes

Yes

Exception Reporting Yes

Outputs from PI Yes

Inputs to PI: Scan-based / Unsolicited / Event Tags Scan-based / Event tags

Supports Questionable Bit Yes

Supports Multi-character PointSource Yes

Maximum Point Count Unlimited

* Uses PI SDK No

PINet String Support No

* Source of Timestamps Synchronized to the PI server

* History Recovery No

* UniInt-based* Disconnected Startup* SetDeviceStatus

YesYesYes

* Failover Interface specific

* Vendor Software Required on PI Interface Node / PINet Node

Yes

Vendor Software Required on Foreign Device No

Vendor Hardware Required No

Additional PI Software Included with Interface No

* Device Point Types See below

Serial-Based Interface No

* See paragraphs below for further explanation.

Foxboro I/A 51 and 70 Series Interface to the PI System 2

Page 13: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Diagram of Hardware Connection

PlatformsThe Interface is designed to run on the above mentioned UNIX and Microsoft Windows operating systems and their associated service packs.

Please contact OSIsoft Technical Support for more information.

Sub-second Timestamps and Scan ClassesThe interface supports sub-second scan classes and timestamps. However, there are limitations within the I/A system which mean that the accuracy of the timestamps may not be reliable.

Firstly, the fastest the I/A stations check for updates for the FoxAPI is 0.5 second (this is independent of the station BPC). Therefore, defining a scan class for the interface faster than 0.5 second will only result in duplicate values being read.

Secondly, the FoxAPI does not return timestamps with the values. Therefore the interface must apply a timestamp when it reads the value and there will be a delay between the value scanned in the I/A control station and when the timestamp is applied.

Also note that high scan frequencies impose a high CPU load on the system and should be avoided if not absolutely required.

Uses PI SDKOn the Windows platform, the PI SDK and the PI API are bundled together and must be installed on each Windows PI Interface node. This Interface does not specifically make PI SDK calls.

Source of TimestampsThe time on the PI server is treated as the master clock when time-stamping values received by the interface. The timestamp is calculated by using the current time on the interface node and applying an offset calculated from the different in the interface node time and the time on the PI server.

Because the Foxboro I/A series workstation may have its time zone set to GMT and its clock set to wall clock time, the time as indicated internally on this machine is technically incorrect. Therefore, PI Foxboro uses the PI API to determine the PI Server’s local time. The Interface then applies an additional time offset to obtain the correct Coordinated Universal Time (UTC). This offset is recalculated every 10 minutes.

Profile data points have a timestamp that corresponds to the value of the I/A object associated with the Profile Trigger tag. See the section on Profile Points for more information.

UniInt-basedUniInt stands for Universal Interface. UniInt is not a separate product or file. It is an OSIsoft-developed template used by developers, and is integrated into many interfaces, including this interface. The purpose of UniInt is to keep a consistent feature set and behavior across as many of OSIsoft’s 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 Interface User Manual is a supplement to this manual.

Foxboro I/A 51 and 70 Series Interface to the PI System 3

Page 14: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Introduction

Disconnected Start-UpThe PI fxbais interface is built with a version of UniInt that supports disconnected start-up. Disconnected start-up is the ability to start the interface without a connection to the PI server. This functionality is enabled by adding /cachemode to the list of start-up parameters or by enabling disconnected startup using the ICU. Refer to the UniInt Interface User Manual for more details on UniInt Disconnect startup.

SetDeviceStatusFunctionality has been added to UniInt 4.3.0.15 and later to support health tags. The PI Foxboro I/A interface is built against a version of UniInt that supports the health tags.

The Health tag with a string point type and the attribute Exdesc = [UI_DEVSTAT], is used to represent the status of the interface. The possible values for this string point are:

“1 | Starting” – The Interface remains in this state until it has loaded the PI points and either starts scanning, or if running in failover, it initializes the failover state.

“2 | Connected/No Data” - the interface is part of a failover pair and currently initializing or changing failover state.

“Good” – The interface is able to collect data. A value of “Good” does not mean that all tags are receiving good values, but it is a good indication that there are no hardware or network problems. When using failover, a “Good” status can indicate that the interface is active or on standby. The failover status PI points will show the status of the individual instances of the interface.

“4 | Intf Shutdown” – The Interface has shut down.

The Interface updates this point whenever the interface is started or stopped.

FailoverThe user may simultaneously run two copies of PI Foxboro in a failover configuration. In this manner, if one copy of the Interface fails, the other automatically assumes responsibility for data collection. See the Failover section of this manual for details.

The netFoxAPI version of the interface does not run in a failover configuration.

Note The failover mechanism used by the interface is specific to the Foxboro interface. The interface does not support the UniInt-based failover. -UFO_ID= is not supported.

Vendor Software RequiredThe PI Foxboro Interface program requires software from Foxboro, Inc. This software is either:

FoxAPI, version 4.x.x, or

netFoxAPI, version 4.x.x.

Device Point TypesThe PI Foxboro Interface supports the following Foxboro I/A point types:

char (I/A type 1)

short integer (I/A type 2)

4

Page 15: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Diagram of Hardware Connection

float (I/A type 3)

string (I/A type 4)

Boolean (I/A type 5)

long integer (I/A type 6)

short integer (I/A type 8)

packed Boolean (I/A type 9)

long packed Boolean (I/A type 10)

The Interface does not support the reading of I/A Series Messages. For example, messages such as:

Control Station Generated: Process Alarms Sequence of Events Sequence Block

System Monitor Operator Action Journal

are not supported.

Foxboro I/A 51 and 70 Series Interface to the PI System 5

Page 16: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Introduction

Diagram of Hardware ConnectionThe following diagrams indicate the connectivity between the various hardware and software components. Note that the Interface must run on a machine that is separate from the PI Server. That is, the user must install the Interface on a machine known in OSIsoft’s terminology as a “PI Interface node”.

6

Page 17: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Diagram of Hardware Connection

Please note that PI FoxboroNet connects to a single netFoxAPI server only. For example:

If the user wishes to connect to multiple netFoxAPI servers, run multiple instances of PI FoxboroNet interface on the non-Foxboro machine to connect to

Foxboro I/A 51 and 70 Series Interface to the PI System 7

Page 18: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Principles of OperationThe following description of the PI Foxboro Interface assumes that the user is familiar with running OSIsoft interface programs in general. First-time users of the PI System may wish to skim this section and return at a later time.

Before PI Foxboro can start up, the FoxAPI processes must already be running. On Solaris, these processes are launched by Foxboro’s aisstart command. On Windows, the service control manager starts up Fox Apps, Fox Monitor, Fox NTApp Service, and Fox Shm Service.

Upon startup, PI Foxboro reads the PI point database and determines which PI points it services by looking at the Point Source and Location1 point attribute fields. The InstrumentTag field should contain the name of the Foxboro I/A object. Otherwise, the Extended Descriptor must have the name of the Foxboro I/A object.

PI Foxboro makes calls to FoxAPI functions in order to retrieve data from the I/A system. The Location2 value determines whether the Interface utilizes unbuffered or buffered FoxAPI access routines. Values written from PI to the I/A are also via either buffered or unbuffered FoxAPI function calls.

Buffered AccessBuffered access involves reading from or writing to I/A object values in the I/A shared memory. The interface uses the FoxAPI scopen() function to open the lists. When opening the lists of buffered objects, the interface uses the value from the ExcDev attribute of the PI points as the “delta” value within the FoxAPI data sets. When the Foxboro system sees that an object has changed by more that the “delta” value, then it updates the value in the I/A shared memory. When the interface reads a buffered value using the FoxAPI mreaidx() function, it is actually reading from the I/A shared memory. An ExcDev value of zero should be avoided as the Foxboro system will send an update to the I/A shared memory, regardless of whether the value has changed or not. The loading on the system caused by these unnecessary updates can cause problems.

When the interface is using buffered output points, it will open FoxAPI lists with write access. These write lists will secure all the objects within the list and stop any other application from updating them. The objects will be unsecured when the interface is stopped.

Unbuffered AccessUnbuffered access involves the FoxAPI broadcasting a message across the I/A system to locate the objects requested and waiting until it receives a reply or times out. This generates a lot of network traffic and CPU loading on the I/A system. Another problem with unbuffered access is caused when the station hosting an unbuffered object is not available (offline, network problem etc), then the interface must wait for the FoxAPI call to timeout. During this timeout period, the interface is not able to do anything else, and this can cause gaps in the scanning of the other points within the interface. For this reason, unbuffered access should be avoided if possible. Unfortunately, some I/A objects

Foxboro I/A 51 and 70 Series Interface to the PI System 9

Page 19: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

can only be accessed with unbuffered calls. These include all string objects. Care should be taken when using unbuffered access.

Object StatusWhen the interface receives a value from the I/A system, it also gets status information. The interface examines the status to determine whether the value is valid. By default, the interface can send either “Bad Input” or “I/O Timeout” when the object to the PI point depending on the object status.

“I/O Timeout” is sent when the status indicated that the object is not being scanned. (i.e. no response, disconnected, deleted etc). The connection status are bits 5 to 7 of the status.

“Bad Input” is sent when the object is bad (status bit 8) or out-of-service (status bit 11).

The system digital states sent can be changed using the -doubtful= and -no_connect= command-line arguments.

For more information of the I/A object manager status information returned with the values, see “Appendix E: FoxAPI Status Definition”. It is also possible to store the status itself in a PI point by setting Location3=0. Note that the object status is not the same as a block status. The block status can be read by configuring a point to read the .BLKSTA parameter.

The interface can also be configured to ignore the object status and to always send the value to PI. This can be configured for all points with the BadStatusIndication parameter in the fxbais.ini file, or on a point-by-point basis with the userint1 point attribute. For more information on the BadStatusIndication parameter, see the section on the fxbais.ini Configuration File.

OutputsOutputs from the PI System to the Foxboro I/A are performed via OSIsoft’s standard event-based mechanism. That is, when the Interface determines that a PI point has received a new value, it sends this value to the corresponding I/A object. Similar to the inputs, outputs can be either buffered or unbuffered. When an object is in a write list, the object is secured and only the interface will be able to write to that object. For speed and reliability, buffered outputs are recommended.

However, care must be taken when configuring buffered output points. The parameter that the interface is writing to must not be an output parameter from a block, or a parameter that can be secured by the block. The parameters accessibility must be connectable and settable and with no configured connections. For example, the OUT parameter from a PID cannot be used. Similarly, the SPT parameter of a PID block cannot be used because it can be secured when the PID controller is put into remote. However, the RI0x parameter of a CALC block with no configured connections can be safely used.

There are limitations with writing values to I/A objects with buffered lists. It is not possible to use buffered lists to write to any output parameters of I/A blocks. This includes the VALUE parameter of I/A variable block types (BOOL, LONG, PACK, REAL, STRING etc). They can be read with buffered lists, but they cannot be written to

Foxboro I/A 51 and 70 Series Interface to the PI System 10

Page 20: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Outputs

with buffered lists. The interface may hang when attempting to open write lists that contain output parameters (even when the blocks are in manual and the I/A system is not securing the outputs). The unbuffered writes do not have the same problems, but any unbuffered access have other problems. When writing values to the I/A system, it is advisable to use buffered lists (location2>0) to write to the input parameters of blocks.

Foxboro I/A 51 and 70 Series Interface to the PI System 11

Page 21: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installation ChecklistIf you are familiar with running PI data collection interface programs, this checklist helps you get the Interface running. If you are not familiar with PI interfaces, return to this section after reading the rest of the manual in detail.

This checklist summarizes the steps for installing this Interface. You need not perform a given task if you have already done so as part of the installation of another interface. For example, you only have to configure one instance of Buffering for every interface that runs on an Interface Node.

The Data Collection Steps below are required. Interface Diagnostics and Advanced Interface Features are optional.

Data Collection Steps

AW70 stations (Windows)

Note: For Windows systems, the interface service must be started with the standard Foxboro user “fox”.

1. Confirm that you can use PI SMT to configure the PI Server. You need not run PI SMT on the same computer on which you run this Interface.

2. Edit the PI Server’s Trust Table to allow the Interface to write data.

3. Run the installation kit for PI Interface Configuration Utility (ICU) on the interface node. This kit runs the PI SDK installation kit, which installs both the PI API and the PI SDK. When installing on I/A 7.x or earlier, the current PI SDK will not install correctly. For instructions on installing the PI SDK on I/A 7.x or earlier, please see Appendix XXXX.

4. Run the installation kit for this Interface. This kit also runs the PI SDK installation kit, which installs both the PI API and the PI SDK.

5. Run the ICU and configure a new instance of this Interface. Essential startup parameters for this Interface are

Point Source

Interface ID

PI Server

Scan Class

Enable Outputs (optional)

6. If you will use digital points, define the appropriate digital state sets.

7. Build input tags and, if desired, output tags for this Interface. Important point attributes and their use are:

Location1 specifies the Interface instance ID multiplied by 100.Location2 is the PI list number for buffered access to I/A objects. Zero for

Foxboro I/A 51 and 70 Series Interface to the PI System 13

Page 22: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

unbuffered points.Location3 is the data type of the I/A object. A positive value indicates input (from I/A to PI) and a negative value indicates an output (from PI to I/A). Zero indicates that the FoxAPI object status will be store instead of the object value.Location4 specifies the scan class.Location5 is normally zero, but when non-zero makes the interface write the FoxAPI list change count to the PI point.InstrumentTag specifies the Foxboro I/A object.ExDesc specifies the Foxboro I/A object or various other special operations.

8. Start the Interface interactively and confirm its successful connection to the PI Server without buffering.

9. Confirm that the Interface collects data successfully.

10. Stop the Interface and configure a buffering application (either Bufserv or PIBufss).

11. Start the buffering application and the Interface. Confirm that the Interface works together with the buffering application by either physically removing the connection between the Interface Node and the PI Server Node or by stopping the PI Server.

12. Configure the Interface to run as a Service. Confirm that the Interface runs properly as a Service.

13. Restart the Interface Node and confirm that the Interface and the buffering application restart.

A detailed step-by-step set of instructions is given in section “Interface Installation on Windows”.

AW51 Stations (Solaris)

Note: For Solaris systems, the PI API and the interface must be installed and run by the “root” user. To access the FoxAPI, the interface must have “root” privileges.

1. Confirm that you can use PI SMT to configure the PI Server. You need not run PI SMT on the same computer on which you run this Interface.

2. Edit the PI Server’s Trust Table to allow the Interface to write data.

3. Set the PIHOME and LD_LIBRARY_PATH environment variables in the default shell.

4. Install the PI API. Set the PI API user to “root” and ensure that the v0 (single-threaded) version of the PI API library is installed. Start the PI API processes and verify the connection to the PI server with the apisnap utility.

5. Extract the interface install kit into the $PIHOME/Interfaces/fxbais directory.

6. Copy the fxbais.sh_new file to fxbais.sh and edit the fxbais.sh script file to define the site-specific command-line arguments.

Point Source (-ps=)

Interface ID (-id=)

PI server (-host=)

Foxboro I/A 51 and 70 Series Interface to the PI System 14

Page 23: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Data Collection Steps

Scan Classes (-f=)

Enable Outputs (-write) (optional)

7. If you will use digital points, define the appropriate digital state sets.

8. Build input tags and, if desired, output tags for this Interface. Important point attributes and their use are:

Location1 specifies the Interface instance ID multiplied by 100.Location2 is the PI list number for buffered access to I/A objects. Zero for unbuffered points.Location3 is the data type of the I/A object. A positive value indicates input (from I/A to PI) and a negative value indicates an output (from PI to I/A). Zero indicates that the FoxAPI object status will be store instead of the object value.Location4 specifies the scan class.Location5 is normally zero, but when non-zero makes the interface write the FoxAPI list change count to the PI point.InstrumentTag specifies the Foxboro I/A object.ExDesc specifies the Foxboro I/A object or various other special operations.

9. Start the Interface interactively and confirm its successful connection to the PI Server without buffering.

10. Confirm that the Interface collects data successfully.

11. Stop the Interface and configure a buffering application (Bufserv).Note: If buffering to more than a single PI server is required then see the section “Kernel Resource Configuration on Solaris”.

12. Start the buffering application and the Interface. Confirm that the Interface works together with the buffering application by either physically removing the connection between the Interface Node and the PI Server Node or by stopping the PI Server.

13. Edit the sitestart and sitestop scripts so that the interface will be started and stopped when the other PI API processes are started and stopped.

14. Copy the go_pistart script from the interface directory into the $PIHOME/bin directory.Note that the go_pistart script is a csh script and requires that the PIHOME and LD_LIBRARY_PATH environment variables be defined in the /.cshrc file.

15. Edit the /etc/fox/user_apps.dat file to include the $PIHOME/bin/go_pistart script.

16. Reboot the Foxboro node and ensure that the PI API processes and the interface are started automatically and collect data correctly.

A detailed step-by-step set of instructions is given in section “Interface Installation on UNIX”.

Interface Diagnostics1. Windows Only

Foxboro I/A 51 and 70 Series Interface to the PI System 15

Page 24: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installation Checklist

a. Install the PI Performance Monitor Interface (Full Version only) on the Interface Node.

b. Configure Performance Counter points.

2. Configure UniInt Health Monitoring points.

3. Configure the I/O Rate points.

4. Install and configure the Interface Status Utility on the PI Server Node.

5. Configure the Interface Status point.

Advanced Interface Features1. Configure the Interface for Disconnected Startup. Refer to the UniInt Interface User

Manual for more details on UniInt Disconnect startup.

2. Configure interface failover if required. See that section in this document for details related to configuring the interface for failover.

16

Page 25: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Installation on WindowsOSIsoft recommends that interfaces be installed on a 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, Buffering should be enabled on the PI Interface Node. Buffering refers to either PI API Buffer Server (Bufserv) or the PI Buffer Subsystem. For more information about Buffering see the Buffering section of this manual.

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 interface cannot be installed on a PI Server node.

Naming Conventions and RequirementsIn the installation procedure below, it is assumed that the name of the interface executable is fxbais.exe and that the startup command file is called fxbais.bat.

When Configuring the Interface ManuallyIt is customary for the user to rename the executable and the startup command file when multiple copies of the interface are run. For example, fxbais1.exe and fxbais1.bat would typically be used for interface number 1, fxbais2.exe and fxbais2.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 parameters in a file that has the same root name.

Interface Directories

PIHOME Directory TreeThe 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 %windir% 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 DirectoryThe interface install kit will automatically install the interface to:

Foxboro I/A 51 and 70 Series Interface to the PI System 17

Page 26: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PIHOME\Interfaces\fxbais\PIHOME is defined in the pipc.ini file.

FoxAPI InstallationEnsure that the FoxAPI software is installed and running correctly before attempting to install the OSIsoft PI API and fxbais interface software. The FoxAPI is normally installed on the D:\opt\fox\ais\bin directory. Foxboro recommend using the current release of the FoxAPI, so check with Foxboro to ensure that the version on the system is up to date.

For details on installing the FoxAPI software, refer to the Foxboro manual “FoxAPI Installation Manual” B0193UC.

Note: The FoxAPI Release Notes (B0193UH) refers to “Special Instructions for Existing OSI PI Applications”. These notes only apply to fxbais 2.2.5 or earlier and are not relevant for the current release of the fxbais interface.

The FoxAPI entry in the Windows XP Control Panel can be selected to allow the FoxAPI to start on a reboot and to manually start or stop the FoxAPI process.

Ensure that the files open_action.bat and clsset_action.bat are present in the D:\opt\fox\ais\bin directory so that warnings are not output when the interface opens or closes data sets. If not present, create the files using procedure in the section “Warnings “open_action: not found” and “clsset_action : not found”

Interface Installation ProcedureThe following procedure shows the steps required to install the PI fxbais interface on a Foxboro I/A AW70 machine, along with the other OSIsoft software required.

1. Check that the FoxAPI software has been installed and that is it configured to start automatically on a reboot. “.

2. Ping the PI server to verify the network connection and the IP name resolution is set up correctly.

3. Ensure that the trusts on the PI server are setup to allow the interface to write to the PI server.

4. Boot the AW70 with the I/A software turned off by selecting Control Panel > Foxboro I/A > I/A Series Off / Autologon and then rebooting.

5. Run the “Interface Configuration Utility” prerequisites install kit. The prerequisite install kit used depends on the version of Windows is running on the AW70.

Note: On machines running Windows XP with no service pack or service pack 1, you must use the Windows 2000 prerequisite install kit (OSIprerequisites-w2k_#_#_#_#). The Windows XP prerequisite install kit can only be used on Windows XP service pack 2 or later and will not install on I/A 7.x AW70s.

The installation of the prerequisites may require the station to be rebooted. After the reboot, the installation should continue.

Foxboro I/A 51 and 70 Series Interface to the PI System 18

Page 27: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installing Interface as a Windows Service

6. Run the “Interface Configuration Utility (ICU)” install kit. The ICU install kit will also install the PI SDK, the PI API and the pibufss components. During the installation, it will ask for a destination folder. It is recommended that “D:\PIPC” be used. For the PI server name, the FQDN is recommended.

7. Once the ICU and its components are installed, the connection to the PI server should be verified. Using the “About-SDK” utility, test the connection to the PI server.

8. Run the fxbais_#.#.#.#.exe install kit to install the interface and the fxbais ICU control.

9. Enable the I/A software by selecting the Control Panel > Foxboro I/A > I/A Series On / Autologon and reboot the station.

Once the interface and its required packages and installed then the interface can be configured and set up as a service using either the ICU or manually.

Foxboro I/A 51 and 70 Series Interface to the PI System 19

Page 28: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Installation on Windows

Installing Interface as a Windows ServiceThe PI fxbais Interface service can be created, preferably, with the PI Interface Configuration Utility, or can be created manually.

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

Service Configuration

Service nameThe Service name box shows the name of the current interface service. This service name is obtained from the interface executable.

IDThis is the service id used to distinguish multiple instances of the same interface using the same executable.

Display nameThe 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 OSIsoft suite of products.

20

Page 29: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installing Interface as a Windows Service

Log on asThe Log on as text box shows the current “Log on as” Windows User Account of the interface service. The PI fxbais interface MUST be configured to run with the default Foxboro “fox” user.

PasswordAs the “Log on as” parameter must be “fox” then the Password must contain the password for the “fox” user.

Confirm passwordThe password is entered in the Password text box, and then it must be confirmed in the Confirm Password text box.

DependenciesThe 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 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 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 interface service will not run.

The PI fxbais interface does not have any dependencies with the Foxboro services. Within the interface itself, it will wait for the FoxAPI executable to start before proceeding. The FoxAPI process is not a service so it is not possible to have the interface dependent on it.

Normally, the PI fxbais interface will be dependent on tcpip and whichever buffering service is being used (bufserv or PIBufss).

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

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

- Remove ButtonTo 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.

Foxboro I/A 51 and 70 Series Interface to the PI System 21

Page 30: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Installation on Windows

Startup TypeThe Startup Type indicates whether the interface service will start automatically or needs 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.

CreateThe 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 ServiceThe toolbar contains a Start button and a Stop button . 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.

22

Status of the ICU Service

installed or uninstalled

Status of the Interface Service

Page 31: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installing Interface as a Windows Service

Installing Interface Service ManuallyHelp for installing the interface as a service is available at any time with the command:fxbais.exe –help

Open a Windows command prompt window and change to the directory where the fxbais1.exe executable is located. Then, consult the following table to determine the appropriate service installation command.

Windows Service Installation Commands on a PI Interface Node or a PI Server Nodewith Bufserv implemented

Manual service fxbais.exe -install -depend "tcpip bufserv"

Automatic service fxbais.exe -install -auto -depend "tcpip bufserv"

*Automatic service with service id

fxbais.exe -serviceid X -install -auto -depend "tcpip bufserv"

Windows Service Installation Commands on a PI Interface Node or a PI Server Nodewithout Bufserv implemented

Manual service fxbais.exe -install -depend tcpip

Automatic service fxbais.exe -install -auto -depend tcpip

*Automatic service with service id

fxbais.exe -serviceid X -install -auto -depend tcpip

*When specifying service id, the user must include an id number. It is suggested that this number correspond to the interface id (/id) parameter found in the interface .bat file.

Check the Microsoft Windows Services control panel to verify that the service was added successfully. The services control panel can be used at any time to change the interface from an automatic service to a manual service or vice versa.

Foxboro I/A 51 and 70 Series Interface to the PI System 23

Page 32: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Installation on UNIXOne of the first issues that must be resolved is where the interface should be installed. Should the interface be installed on the PI Server node or on a remote PI Interface Node? OSIsoft recommends that the interface be installed on a remote PI Interface Node. The primary function of the server node is to archive data and to service the clients that request that data. The PI Server should not need to compete with interfaces for the machine’s resources. If the interface is installed on a remote PI Interface Node, then the PI API must be installed on that node before the interface is installed. Refer to the PI API manual.

When the interface is installed on a PI Interface Node, it is also a good idea to install and run Bufserv on the PI Interface Node. 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. It is not critical to install Bufserv before the initial installation of the interface. In fact, it is recommended that Bufserv be installed after the interface has been shown to work to ease troubleshooting. Refer to the PI API manual for installation instructions and additional information on Bufserv.

Currently there is no PI Buffer Subsystem for the UNIX platform. PI API Buffer Server is the only type of buffering available for the UNIX platform.

If the interface is installed on the PI Server node, the advantage of using Bufserv is diminished because it is no longer needed to protect against network failures. Bufserv would still allow data to be collected when the PI Server is brought down for routine maintenance, but this advantage must be weighed against the additional load that Bufserv incurs on the server. Typically, users do not choose to run Bufserv on the PI Server node. If Bufserv is used on the server node, make sure that Bufserv is started before any interfaces by the startup script for PI.

If the interface is installed on a server node, the interface should be configured to start and stop in conjunction with the PI Server. If the interface is installed on a PI Interface Node, then the interface should be configured to start and stop with the PI API. Site-specific scripts can be edited for this purpose, as described in the installation procedure below. The PI Server and the PI API, in turn, can be configured to start and stop automatically when the system is shut down or rebooted. Procedures for automatic startup and shutdown of PI or the PI API are platform specific. The automation procedures are discussed in the PI System Management chapter of the PI Server manuals.

Naming Conventions and RequirementsIn the installation procedure below, it is assumed that the name of the interface executable is fxbais and that the startup command file is called fxbais.sh.

Note: UNIX does not enforce file-naming conventions, and it is possible that the file name extensions for the actual interface executable are different than those shown, or it is possible that the file extensions are eliminated entirely.

To run multiple copies of the interface from the same directory, it is necessary to rename the executable and the command file. It is customary to use fxbais1 and fxbais1.sh for interface number 1, fxbais2 and fxbais2.sh for interface number 2, and so on.

Foxboro I/A 51 and 70 Series Interface to the PI System 25

Page 33: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Directories

PIHOME DirectoryPIHOME is an environment variable that points to the base directory where the PI API is installed. The setting of environment variables is discussed in the PI API manual.

Interface Installation DirectoryThere are two conventions for the installation directory when installing multiple instances of the interface.

The first convention is to place all copies of the interface into a single directory. If this convention is followed, it is recommended to place fxbais1, fxbais2, fxbais3, etc., in the directory:$PIHOME/Interfaces/fxbais

The second convention is to create a separate interface directory for each copy of the interface. If this convention is followed, it is recommended to place fxbais1, fxbais2, fxbais3, etc., in the directories:$PIHOME/Interfaces/fxbais1$PIHOME/Interfaces/fxbais2$PIHOME/Interfaces/fxbais3and so on.

Create the installation directories as necessary.

FoxAPI InstallationEnsure that the FoxAPI software is installed and running correctly before attempting to install the OSIsoft PI API and fxbais interface software. For details on installing the FoxAPI software, refer to the Foxboro manual “FoxAPI Installation Manual” B0193UC.

Note: The FoxAPI Release Notes (B0193UH) refer to “Special Instructions for Existing OSI PI Applications”. These notes only apply to fxbais 2.2.5 or earlier and are not relevant for the current release of the fxbais interface.

The FoxAPI is normally installed on the /opt/fox/ais/bin directory. Foxboro recommend using the current release of the FoxAPI, so check with Foxboro to ensure that the version on the system is up-to-date.

Ensure that the FoxAPI processes are configured to start automatically on a reboot. The command /opt/fox/ais/bin/P can be used to show the list of running FoxAPI processes. For example,# /opt/fox/ais/bin/P root 1476 1 0 15:00:29 ? 0:00 ./an_server.tcp -

ian_init.tcp root 1449 1 0 15:00:03 ? 0:00 /opt/fox/ais/bin/foxapi root 1464 1 0 15:00:17 ? 0:00 /opt/fox/ais/bin/foxapi

om_poll

Foxboro I/A 51 and 70 Series Interface to the PI System 26

Page 34: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installing Multiple Instances of the Interface

root 1460 1 0 15:00:16 ? 0:00 /opt/fox/ais/bin/foxapi wrtimr

root 1462 1 0 15:00:17 ? 0:00 /opt/fox/ais/bin/foxapi wrproc

root 1477 1 0 15:00:29 ? 0:00 /opt/fox/ais/bin/histlnbcIf the FoxAPI processes do not automatically start on a reboot, consult with Foxboro to resolve the problem.

Check that the files open_action.bat and clsset_action.bat are present in the D:\opt\fox\ais\bin directory so that warnings are not output when the interface opens or closes data sets. If not present, create the files using procedure in the section “Warnings “open_action: not found” and “clsset_action : not found”

PI API Installation ProcedureIn the installation procedure below, it is assumed that interface number 1 is being installed and that all copies of the interface will be installed in the same directory. To install another copy of the interface, repeat the following procedure with fxbais# used in place of fxbais1, where # is the interface number between 1 and 99.

1. Root in as root with a csh command prompt.

If using the VT100.local window, enter the following command to start a C shell command tool window.cmdtool csh &

If using telnet to log into the machine and you are using Solaris 2.5.1 or Solaris 8 then the default C shell login is all that is required. If using Solaris 10, the default shell for root is a Bourne shell, so you need to start a separate C shell with the csh command.

All FoxAPI applications (which include the PI fxbais interface) should be run from a C shell.

2. Verify that the PI server can be pinged by name.

3. Verify that the FoxAPI is installed on the machine and is running. The FoxAPI is installed in the /opt/fox/ais/bin directory. Use the script called P to list the running FoxAPI processes.

4. Create the home directory for the PI softwaremkdir /opt/piapi

5. Edit the root C shell configuration file /.cshrc to define the required environment variables. Append the following to the /.cshrc file.setenv PIHOME /opt/piapisetenv LD_LIBRARY_PATH ${PIHOME}/lib

Optionally, to make using the PI API and PI fxbais interface easier, add the followingsetenv PATH ${PATH}:${PIHOME}/binalias show_pilog ‘tail -60f ${PIHOME}/dat/pimesslogfile’

6. Log out of the current session and log back in (as in step 1) so that the environment variables defined above are set in the C shell.

Foxboro I/A 51 and 70 Series Interface to the PI System 27

Page 35: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Installation on UNIX

7. Transfer the PI API install kit (piapi#.#.#.#_SunOS_tar.Z) and the PI fxbais interface install kit (fxbais_#.#.#.#.tar.Z) into the PIHOME directory /opt/piapi.

8. Extract the PI API installation files into the PIHOME directorycd $PIHOMEzcat piapi#.#.#.#_SunOS_tar.Z | tar xvf -

9. Run the PI API installation script to install the PI API.cd $PIHOME/buildsh ./pi.install -v0

When prompted, enter root as the user name for PI API and the default PI server name must be in uppercase.

For example,--- PI API Installation log ---PIHOME is properly defined: /opt/piapiInstalling version 0 library compatible PIAPIInstalling programming filesCreating/Updating the PI API file systemInstalling PI API from /opt/piapi/buildBLDDIR existsLIBDIR createdBINDIR createdDATDIR createdINCDIR createdSRCDIR createdEnter an existing user name for PI API [piadmin] ?rootUser name: rootCreating File: piclient.iniPlease Enter the Node Name of the Default PI Home Node:XXXXXXXIs XXXXXX a PI v3.x (UNIX, NT) system? [Y] or NYHome node: XXXXXXPI3 node: YInstalling iorates.datVersion (5 5 1) API install type = 0Installing Base System - PI APIAPI Installation ScriptSetting working directorySetting source files for SunOSInstalling /opt/piapi/bin/pistart /opt/piapi/bin/pistopInstalling /opt/piapi/bin/sitestartInstalling /opt/piapi/bin/sitestopInstalling /opt/piapi/build/sitelinkInstalling /opt/piapi/bin/apiverifyInstalling /opt/piapi/bin/apiprocsInstalling piapi.h piparams.h pidefs.h pistatus.h piba.h piapix.h pidgstat.hInstalling /opt/piapi/lib/libpiapi.soInstalling /opt/piapi/lib/libpiapi.a

28

Page 36: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installing Multiple Instances of the Interface

Installing files in /opt/piapi/bin: apisnap bufserv bufutil iorates ioshmcls ioshmsrv mqcls mqmgr mqsrv pilogsrv shootqRunning the Site Specific Link ScriptInstalling examples: apisnap.c apisnap.mak

Note: the version 0 (-v0) instance of the PI API must be installed as the current version 2 instance of the PI API has compatibility problems with bufserv on Solaris.

10. Verify that the PI API processes are installed correctly by starting the processes, running apiverify to see the running processes, running apisnap to read from the PI server and then stopping the processes.

For example,

cd $PIHOME/binpistartStarting PI...Starting the PI Message Log ServerStarting the PI Message Log ManagerBuffer server is not started.Starting I/O Rates Shared Memory ServerStarting the I/O Rates ProgramPI Startup is CompleteIORATES>getiotags> 0 rate tag(s) registered.

apiverifyNAME PID TIME %CPU %MEMWARNING: bufserv is NOT runningmqmgr 2115 0:00 0.0 1.4mqsrv 2110 0:00 0.1 1.3ioshmsrv 2121 0:00 0.0 1.4iorates 2126 0:00 0.0 1.5

apisnapPI API version 1.6.1.7 Attempting connection to Default homenodeConnected to XXXXXX (151.128.8.63)Enter tagname: sinusoid

Tag = SINUSOID Point Number = 1 Type = Real-32 12 Hour Sine Wave

Snapshot value Value = 89.526 20-May-09 04:15:32 Status = Good

Latest archive value Value = 98.119 20-May-09 03:31:32 Status = Good

Foxboro I/A 51 and 70 Series Interface to the PI System 29

Page 37: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Installation on UNIX

Enter tagname:

pistopStopping PI...Stopping the I/O Rates ProgramStopping the I/O Rates Shared Memory ServerStopping the PI Message Log ServerStopping the PI Message Log ManagerPI Shutdown is Complete

The PI API is now installed. It still needs to be configured for buffering and support for PI collectives etc, but this should be done after the interfaces have been installed.

Interface Installation ProcedureThe following procedure describes the installation of the PI fxbais interface on Solaris based AW51 stations.

1. Extract the PI fxbais interface files from the install kitcd $PIHOMEzcat fxbais_#.#.#.#.tar.Z | tar xvf -

2. Use the template files fxbais.sh_new and fxbais.ini_new to create the startup script and the optional configuration file for the interface.cd $PIHOME/interfaces/fxbaiscp fxbais.sh_new fxbais.shcp fxbais.ini_new fxbais.ini

3. Check that that interface executable can locate the required libraries to run by checking the version of the interface.fxbais -v PI-Foxboro I/A Interface, 2.3.8.60 (Solaris) UNIINT version @(#)uniint.cxx 4.3.3.9_UNIX API version 1.6.1.7

4. Alter the command-line parameters in the fxbais.sh file as discussed in the section “Startup Command File.”

5. Edit the fxbais.ini file. See the “Configuration File” for details of the fxbais.ini parameters.Note that the number in the section name must match the -id= parameter of the interface. For example, if the interface is using -id=3 then the fxbais.ini should contain the section [fxbais-3]. Edit any of the other parameters as required. For the initial testing, it is recommended that the parameters not be changed. The default values should work in the majority of cases. Failover should not be configured until the interface has been configured and tested running in standalone mode.

6. Add the PI fxbais interface process to the list of processes checked by the apiverify script.echo fxbais >>$PIHOME/bin/apiprocs

7. Start the PI API processes and then start the interface using the fxbais.sh script. The fxbais.sh script must be run from the interface directory and will start the interface in the background. The progress of the interface can be seen by checking the

30

Page 38: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installing Multiple Instances of the Interface

$PIHOME/dat/fxbais.out file (stdout form the interface) and the PI message log file ($PIHOME/dat/pimesslogfile). Stop the interface with the fxastop script ($PIHOME/interfaces/fxbais/fxastop).

For example,

cd $PIHOME/interfaces/fxbais$PIHOME/bin/pistartStarting PI...Starting the PI Message Log ServerStarting the PI Message Log ManagerBuffer server is not started.Starting I/O Rates Shared Memory ServerStarting the I/O Rates ProgramPI Startup is CompleteIORATES>getiotags> 0 rate tag(s) registered.

fxbais.shOutput file is in /opt/piapi/datRenamed fxbais.out as fxbais.oldStarting interface (fxbais process)

apiverifyNAME PID TIME %CPU %MEMWARNING: bufserv is NOT runningmqmgr 1873 0:00 0.2 1.4mqsrv 1868 0:00 0.1 1.3ioshmsrv 1879 0:00 0.1 1.4iorates 1884 0:00 0.1 1.5fxbais 1905 0:00 0.4 2.4

tail -60f $PIHOME/dat/pimesslogfile

25-May-09 15:18:19FXBAIS 1> Opening PILIST01L301: 2 objs [scannum=2, rw=1]

25-May-09 15:18:21FXBAIS 1> Opened PILIST01L301: 0 obj errors of 2 [dset=15, scannum=2, rw=1]

25-May-09 15:18:22FXBAIS 1> Finished opening lists

25-May-09 15:18:24FXBAIS 1> Starting scans^C

fxastop Stopping Foxboro I/A AIS interface (PI part) Can take about 5 sec per interface list to finish.. fxbais (1905) interface successfully stopped.

Foxboro I/A 51 and 70 Series Interface to the PI System 31

Page 39: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Installation on UNIX

pistopStopping PI...Stopping the I/O Rates ProgramStopping the I/O Rates Shared Memory ServerStopping the PI Message Log ServerStopping the PI Message Log ManagerPI Shutdown is Complete

8. Once the interface is successfully running, configure the interface to start as one of the PI API processes as described in the section “Starting / Stopping the Interface on UNIX”.

9. Configure the PI API buffering as described in section “Buffering”.

10. Finally, edit Foxboro startup script to start the PI API and the interface processes automatically on a reboot of the Foxboro station, as described in the section “Starting / Stopping the Interface on UNIX”.

Installing Multiple Instances of the InterfaceTo install multiple instances of the interface, the system requires multiple executables with unique names. This is because the start and stop scripts need to be able to match the instances with the running processes. If all the interfaces used the same executable name, there would be no simple way of distinguishing between them.

As mentioned above in the “Interface Installation Directory” section, it is possible to install multiple instances in a single directory, or use separate directories for each instance. Because the interface will read some of its configuration settings from the fxbais.ini file, if multiple instances of the interface use the same -id= parameter (but different PointSources) then the interface MUST be installed in separate directories.

Multiple Instances in a Single DirectoryThe following is the procedure to install multiple instances of the interface is the same directory. The procedure shows installing 3 instances, named fxbais1, fxbais2 and fxbais3.

1. Extract the PI fxbais interface files from the install kitcd $PIHOMEzcat fxbais_#.#.#.#.tar.Z | tar xvf -

2. Change to the interface directorycd $PIHOME/interfaces/fxbais

3. Create the fxbais.ini filecp fxbais.ini_new fxbais.ini

4. For each instance of the interface required (where # is the instance number)

a. Create a copy of the executable and scripts for the interfacecp fxbais fxbais#cp fxbais.sh_new fxbais#.shcp fxastop fxastop#

b. Edit the fxbais#.sh script

32

Page 40: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installing Multiple Instances of the Interface

i. Change the PROG_NAME variable definition at the start of the script from fxbais to fxbais#

ii. Edit the command-line parameters near the end of the script as required for this instance of the interface.Note: the -id= argument must be different for each instance of the interface as the id number is used to retrieve settings from the fxbais.ini file.

c. Edit the fxastop# script

i. Change the PROG_NAME variable definition at the start of the script from fxbais to fxbais#

d. Add the interface name to the apiprocs file so that the interface status will be shown by the apiverify utility.echo fxbais# >>$PIHOME/bin/apiprocs

5. Edit the fxbais.ini file to set up a section for each of the interface instances where the number in the section name is the same as the -id= argument.

6. Start the PI API processes and verify that the processes have started$PIHOME/bin/pistart$PIHOME/bin/apiverify

7. Start each of the instances manually, check that the interface is running correctly and then stopfxbais#.shtail -60f $PIHOME/dat/pimesslogfilefxastop#

8. Once the interface is successfully running, configure the interface to start as one of the PI API processes as described in the section “Starting / Stopping the Interface on UNIX”.

9. Configure the PI API buffering as described in section “Buffering”.

10. Finally, edit Foxboro startup script to start the PI API and the interface processes automatically on a reboot of the Foxboro station, as described in the section “Starting / Stopping the Interface on UNIX”.

Multiple Instances in a Separate DirectoriesThe following is the procedure to install multiple instances of the different directories. This is required when the interfaces are using different -ps= arguments, but the same -id argument. It can also be used when there is no conflict in -id= arguments.

1. Extract the PI fxbais interface files from the install kitcd $PIHOMEzcat fxbais_#.#.#.#.tar.Z | tar xvf -

2. Change to the main interface directorycd $PIHOME/interfaces

3. Change the name of the initial instance of the fxbais interface directory to the first instance of the interfacemv fxbais fxbais1

Foxboro I/A 51 and 70 Series Interface to the PI System 33

Page 41: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Installation on UNIX

4. For each remaining instance of the interface required, copy the fxbais1 directory to the fxbais# (where # is the instance number)cp -r fxbais1 fxbais#

5. For each instance of the interface (where # is the interface number)

a. Change into the interface directorycd $PIHOME/interfaces/fxbais#

b. Rename the executable to the instance namemv fxbais fxbais#

c. Create instances of the start and stop scriptscp fxbais.sh_new fxbais#.shcp fxastop fxastop#

d. Edit the fxbais#.sh script

i. Change the PROG_NAME variable definition at the start of the script from fxbais to fxbais#

ii. Edit the command-line parameters near the end of the script as required for this instance of the interface.Note: If some instances of the interface are using the same -id= argument (but different -ps=) then add the argument -logps so that it is possible to see which interface generated the messages in the log files.

e. Edit the fxastop# script

i. Change the PROG_NAME variable definition at the start of the script from fxbais to fxbais#

f. Add the interface name to the apiprocs file so that the interface status will be shown by the apiverify utility.echo fxbais# >>$PIHOME/bin/apiprocs

g. Create a fxbais.ini by copying the fxbais.ini_new file. Edit the fxbais.ini file to set the number in the section name is the same as the -id= argument of the interface in the directory.

6. Start the PI API processes and verify that the processes have started$PIHOME/bin/pistart$PIHOME/bin/apiverify

7. Start each of the instances manually, check that the interface is running correctly and then stopcd $PIHOME/interfaces/fxbais#fxbais#.shtail -60f $PIHOME/dat/pimesslogfilefxastop#

8. Once the interface is successfully running, configure the interface to start as one of the PI API processes as described in the section “Starting / Stopping the Interface on UNIX”.

9. Configure the PI API buffering as described in section “Buffering”.

34

Page 42: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installing Multiple Instances of the Interface

10. Finally, edit Foxboro startup script to start the PI API and the interface processes automatically on a reboot of the Foxboro station, as described in the section “Starting / Stopping the Interface on UNIX”.

Foxboro I/A 51 and 70 Series Interface to the PI System 35

Page 43: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

FoxAPI Test ProgramThe PI Foxboro Interface relies on the services provided by the FoxAPI. To verify that the FoxAPI is currently functional, use the foxtst program supplied by Foxboro.

On Solaris, run this program via a command such asLBUG01# /opt/fox/ais/bin/foxtst

On Windows, use a command such asD:\opt\fox\ais\bin\foxtst.exe

For example, to use the FoxAPI uread() function to read the current value for the I/A object CMPD:BLKA.BI0004, do the following (inputs are in bold below):

Foxboro Fox API Test Program

Menu (1) Fox API Test Program Hostid = 80fe6962 System Type = 51

Test Program Quick Tests Sub Menus-1 Exit 10-FoxAPI Status 100 -(Menu 1) Main Menu 0-Repeat Last 11-Block Info 200 -(Menu 2) Block Info 1-Help 12-Objects 300 -(Menu 3) Objects 2-Menu On/Off 13-CDX 400 -(Menu 4) CDX 3-Echo On/Off 14-File 500 -(Menu 5) File 3-Echo On/Off 15-Historian 600 -(Menu 6) Historian 4-Save Settings 16-FoxHistory 700 -(Menu 7) FoxHistory 5-an_error 17-Counters 800 -(Menu 8) Counters 18-Trouble Shooting 900 -(Menu 9) Trouble Shooting 19-OM 1000-(Menu 10) OM Functions 1100-(Menu 11) Old Functions

function[ 0]: 300

Menu (3) Object Access Hostid = 80fe6962 System Type = 51Test Program Functions Functions Functions-1 Main Menu 10-scopen 30-getidx 40-uread 1-Help 11-sqopen 31-getmidx 41-uwrite 2-Menu On/Off 12-bread 32-readval 42-sread 3-Echo On/Off 13-bwrite 33-mreaidx 43-swrite 4-Save Settings 14-qread 34-readnam 44-an_nam2val 5-Save Set Info 35-readsta 45-wrtval 16-clsset 36-mreawidx 46-an_write_valstat 17-get_set_name 37-all_read 18-get_set_num 19-put_set_name 20-gsinfo 21-getnam

Foxboro I/A 51 and 70 Series Interface to the PI System 37

Page 44: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

22-gsnent

function[ 0]: 40

---- uread ----compound [ point1 ]: CMPDblock [ . ]: BLKAparameter [ . ]: BI0004value type [ 3 ]: 3multiples [ 1 ]: ok to add? [ ]: Yend of set? [ N ]: Y

num entries [ 1 ]: reterr = 0 - ( Success )

entry name error value status----- ---- ----- ----- ------ 1 CMPD:BLKA.BI0004 0 1.24 0023x ActOffUns_OkFlt

In the above example, the value of the I/A object CMPD:BLKA.BI0004 as returned by the FoxAPI uread() function is 1.24.

Here is another example:

At the program’s main menu, type:300When prompted, type:30When prompted, enter the compound, block, and parameter names, e.g.,function[ 0]: 30---- getidx ----compound [ UC01_LEAD:SINE.MEAS ]: READblock [ . ]: P_SINKparameter [ . ]: VAL_2The program will respond with something like:name index---- -----READ:P_SINK.VAL_2 1

The number in the index column is the FoxAPI index for the object.

At the prompt, type:35The result should resemble:function[ 30]: 35---- readsta ----index [ 1 ]:index status

Foxboro I/A 51 and 70 Series Interface to the PI System 38

Page 45: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Installing Multiple Instances of the Interface

----- ------1. 0022x ActOffUns_OkInt

Because the foxtst program and PI Foxboro both use the same underlying FoxAPI functions, foxtst provides an easy way to verify values that are read by the PI Foxboro Interface and subsequently sent to PI Server. Similarly, if foxtst experiences problems with reading a particular I/A object, then the PI Foxboro Interface likewise will have difficulties.

Because the interface uses mreaidx() to read the values for buffered inputs, using getidx() and mreaidx() within the foxtst is the recommended method of checking points that do not appear to be updating correctly within PI.

Foxboro I/A 51 and 70 Series Interface to the PI System 39

Page 46: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Digital StatesFor more information regarding Digital States, refer to the PI Server documentation.

Digital State SetsPI digital states are discrete values represented by strings. These strings are organized in PI as digital state sets. Each digital state set is a user-defined list of strings, enumerated from 0 to n to represent different values of discrete data. For more information about PI digital tags and editing digital state sets, see the PI Server manuals.

An interface point that contains discrete data can be stored in PI as a digital tag. A Digital tag associates discrete data with a digital state set, as specified by the user.

System Digital State SetSimilar to digital state sets is the system digital state set. This set is used for all tags, regardless of type to indicate the state of a tag at a particular time. For example, if the interface receives bad data from an interface point, it writes the system digital state bad input to PI instead of a value. The system digital state set has many unused states that can be used by the interface and other PI clients. Digital States 193-320 are reserved for OSIsoft applications.

Foxboro I/A 51 and 70 Series Interface to the PI System 41

Page 47: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PointSource The PointSource is a unique, single or multi-character string that is used to identify the PI point as a point that belongs to a particular interface. For example, the string Boiler1 may be used to identify points that belong to the MyInt Interface. To implement this, the PointSource attribute would be set to Boiler1 for every PI Point that is configured for the MyInt Interface. Then, if -ps=Boiler1 is used on the startup command-line of the MyInt Interface, the Interface will search the PI Point Database upon startup for every PI point that is configured with a PointSource of Boiler1. 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 parameter.

Case-sensitivity for PointSource AttributeThe PointSource character that is supplied with the -ps command-line parameter is not case sensitive. That is, -ps=P and -ps=p are equivalent.

Reserved Point SourcesSeveral subsystems and applications that ships with PI are associated with default PointSource characters. The Totalizer Subsystem uses the PointSource character T, the Alarm Subsystem uses G and @, Random uses R, RampSoak uses 9, and the Performance Equations Subsystem uses C. Do not use these PointSource characters or change the default point source characters for these applications. Also, if a PointSource character is not explicitly defined when creating a PI point; the point is assigned a default PointSource character of Lab (PI 3). Therefore, it would be confusing to use Lab as the PointSource character for an interface.

Note: Do not use a point source character that is already associated with another interface program. However it is acceptable to use the same point source for multiple instances of an interface.

Foxboro I/A 51 and 70 Series Interface to the PI System 43

Page 48: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PI Point ConfigurationThe 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.

Point AttributesUse the point attributes below to define the PI Point configuration for the Interface, including specifically what data to transfer.

TagThe Tag attribute (or tagname) is the name for a point. There is a one-to-one correspondence between the name of a point and the point itself. Because of this relationship, PI documentation uses the terms “tag” and “point” interchangeably.

Follow these rules for naming PI points:

The name must be unique on the PI Server.

The first character must be alphanumeric, the underscore (_), or the percent sign (%).

Control characters such as linefeeds or tabs are illegal.

The following characters also are illegal: * ’ ? ; { } [ ] | \ ` ‘ “

LengthDepending on the version of the PI API and the PI Server, this Interface supports tags whose length is at most 255 or 1023 characters. The following table indicates the maximum length of this attribute for all the different combinations of PI API and PI Server versions.

PI API PI Server Maximum Length

1.6.0.2 or higher 3.4.370.x or higher 1023

1.6.0.2 or higher Below 3.4.370.x 255

Below 1.6.0.2 3.4.370.x or higher 255

Below 1.6.0.2 Below 3.4.370.x 255

If the PI Server version is earlier than 3.4.370.x or the PI API version is earlier than 1.6.0.2, and you want to use a maximum tag length of 1023, you need to enable the PI SDK. See Appendix B for information.

Foxboro I/A 51 and 70 Series Interface to the PI System 45

Page 49: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PointSourceThe PointSource is a unique, single or multi-character string 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 parameter and the “PointSource” section.

PointTypeTypically, Foxboro point types do not need to correspond to PI point types. For example, short integer values from the I/A can be sent to floating point or digital PI tags. Similarly, floating-point values from the I/A can be sent to integer or digital PI tags, although the values will be truncated.

PI Foxboro Interface supports the following PI 3 point types: Digital Int16 Int32 Float16 Float32 Float64 String

For more information on the individual point types, see PI Server Manuals.

The I/A point types and data ranges are listed in a table under the description of the Location3 point attribute (described later).

For input tags, PI Foxboro converts the I/A value to the destination PI point type and value. However, please note that the point type of the PI tag limits the value that can be stored. That is, if the PI tag is of type Int16 or Integer (PI 2), the Interface can store numbers in the range 0 to 32,767 only.

For a PI input digital tag, the I/A value is sent as a positive offset into the specified PI digital set.

For output tags, PI Foxboro converts the PI tag’s value to the destination I/A point type and value.

Location1Location1 attribute associates a point with a particular copy of PI Foxboro. Location1 is a positive integer from 100 to 9900, inclusive. Its value is 100 times the -id= argument used in the startup command file (described later).

For example, if -id=1, set Location1 to 100.

Any remainder of Location1/100 is not used.

Location2The Location2 attribute determines whether the Interface adds the point to a FoxAPI data set and retrieves “buffered” values from the FoxAPI. Buffered values are those updated by the FoxAPI in the system-shared memory. Unbuffered access to I/A objects makes requests to the Foxboro CP for each data retrieval call. OSIsoft recommends the use of buffered access to reduce the load on the Foxboro system.

Foxboro I/A 51 and 70 Series Interface to the PI System 46

Page 50: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Profile Points

The value of Location2 is the PI list number. Set the value of Location2 to a positive number to indicate that PI Foxboro should use buffered access to retrieve I/A data. For tags with a common value of Location2, the Interface groups these tags into a list for use with the FoxAPI scopen() call. This FoxAPI function returns a unique data set number, which may be different than the Location2 value.

Tags for read values must be in a PI list that is separate from those tags for write values. To help optimize the network traffic it is helpful to group tags referencing I/A objects from different Foxboro CP modules into different PI lists.

Some customers have experienced performance problems when there are many (~250) tags in a PI List. OSIsoft recommends keeping the size of a PI List within this number. However, large numbers of small lists will take the interface a long time to open, so a compromise is needed.

To indicate that the Interface should use unbuffered access to I/A objects, set Location2 to 0. Access to I/A string data is always unbuffered. The interface will reject PI tags that are configured for buffered access (Location2<>0) which have an I/A string data type (Location3=4 or -4).

In summary,

I/A Data Access Method Location2

Unbuffered 0 (see note below)

Buffered >0 (PI list number)

Note: Using unbuffered access can negatively impact the performance of the interface, and should be used sparingly. Under normal operations, unbuffered access does not typically cause problems. But if the unbuffered I/A objects become unavailable (station rebooted, network problems, etc), when the interface attempts to access those objects, it will stop scanning the other tags until the FoxAPI calls time out. This will make the interface ‘flat line’ during this period. To minimize the impact of this, the interface will disable the regular scanning of any bad unbuffered tags found, but will periodically attempt to re-read them.

Upon processing a PI list (i.e., points with a common positive Location2), the Interface enters this list into the FoxAPI shared memory as a data set named PILISTxxLyyy. The first two digits (xx) refer to the interface number as defined by the -id= startup parameter. The next 3 digits (yyy) refer to the Location2 number.

For example, for points with Location2 equal to 5 and processed by a copy of the Interface running with -id=1, the FoxAPI data set named PILIST01L5 is created.

Location3The Location3 attribute indicates the I/A data type and direction of data transfer. For the transfer of data from the I/A to PI (input), Location3 is positive. Otherwise, it is negative.

A special case is used when Location3 equals zero (0). In this case, instead of storing the value of the I/A object, it will use the I/A FoxAPI status. In this way, the object status

Foxboro I/A 51 and 70 Series Interface to the PI System 47

Page 51: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PI Point Configuration

can be stored in the PI database. The status is a bit mapped integer. The definitions of the bits are listed in Appendix D.

Location3 I/A Type I/A Data Range

1 1, char ‘0’ to ‘9’

2 2, short integer -32768 to 32767

3 3, float 1.175E-38 to 3.402E+38

4 4, string up to 256 bytes

5 5, Boolean 0 and 1

6 6, long integer -2,147,483,648 to 2,147,483,647

8 8, short integer 0 to 255

9 9, packed boolean 0 to 65535

10 10, long packed boolean 0 to 4,294,967,295

0 FoxAPI object status

Examples

Location3 I/A Type Data Transfer

2 short integer I/A to PI

-3 float PI to I/A

However, regardless of the Location3 value, PI Foxboro checks with the FoxAPI to determine the correct data type of the I/A object. The Interface writes to the PI Message Log occurrences of point type mismatches and uses the correct type internally. The user should then correct the value of Location3.

For output points (transfer of data from PI to the I/A), remember to configure an appropriate output source point in the SourceTag attribute of the output PI point.

Because access to I/A string objects must use unbuffered access, the interface will reject PI tags that are configured for buffered access (Location2<>0) which have an I/A string data type (Location3=4 or -4).

Location4

Scan-based InputsFor interfaces that support scan-based collection of data, Location4 defines the scan class for the PI point. The scan class determines the frequency at which input points are scanned for new values. For more information, see the description of the -f parameter in the Startup Command File section.

Trigger-based Inputs, Unsolicited Inputs, and Output PointsLocation 4 should be set to zero for these points.

48

Page 52: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Profile Points

Location5The Location5 attribute is normally 0. If it is non-zero, it is used to total a PI Foxboro list’s I/A object change counts. Please refer to Appendix A: Error Messages and Troubleshooting for details.

InstrumentTag

LengthDepending on the version of the PI API and the PI Server, this Interface supports an InstrumentTag attribute whose length is at most 32 or 1023 characters. The following table indicates the maximum length of this attribute for all the different combinations of PI API and PI Server versions.

PI API PI Server Maximum Length

1.6.0.2 or higher 3.4.370.x or higher 1023

1.6.0.2 or higher Below 3.4.370.x 32

Below 1.6.0.2 3.4.370.x or higher 32

Below 1.6.0.2 Below 3.4.370.x 32

If the PI Server version is earlier than 3.4.370.x or the PI API version is earlier than 1.6.0.2, and you want to use a maximum InstrumentTag length of 1023, you need to enable the PI SDK. See Appendix B for information.

This is the Foxboro tag name (also called the I/A object) used for reading/writing from/to the I/A. It may contain up to 32 characters in the compound:block.parameter or alias formats. The full Foxboro name with the proper case should be used.

If this field is empty, the ExDesc attribute (see below) determines the I/A object. If both the InstrumentTag and ExDesc attributes contain an I/A object, then PI Foxboro uses the I/A object specified in the InstrumentTag.

ExDescThis is the Extended Descriptor field. It can be used to define a number of various actions for the point. It can define the Foxboro tag to access, define bit mapped operations on a value, define profile points, trigger the reading of the point when another PI point changes, or it can define points to monitor performance of the interface itself.

Anything after an exclamation mark (!) is ignored and can be as a comment.

LengthDepending on the version of the PI API and the PI Server, this Interface supports an Extended Descriptor attribute whose length is at most 32 or 1023 characters. The following table indicates the maximum length of this attribute for all the different combinations of PI API and PI Server versions.

PI API PI Server Maximum Length

1.6.0.2 or higher 3.4.370.x or higher 1023

Foxboro I/A 51 and 70 Series Interface to the PI System 49

Page 53: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PI Point Configuration

1.6.0.2 or higher Below 3.4.370.x 80

Below 1.6.0.2 3.4.370.x or higher 80

Below 1.6.0.2 Below 3.4.370.x 80

If the PI Server version is earlier than 3.4.370.x or the PI API version is earlier than 1.6.0.2, and you want to use a maximum InstrumentTag length of 1023, you need to enable the PI SDK. See Appendix B for information.

Foxboro Tag (I/A Object)For backward compatibility, the ExDesc can be used to define the Foxboro tag name (I/A object) that the point will be accessing, in the same way that the InstrumentTag attribute does. This was required because with older versions of the software, the InstrumentTag was limited to 32 characters and this was not long enough for some object names.

However, with the current versions of the interface, the InstrumentTag can now handle all I/A object names, and so it is recommended that the InstrumentTag should be used.

Bit Processing Keywords

BTM= KeywordBTM=x,y,z... is an optional field for bit masking values retrieved from I/A integer types. The bit mask is x,y,z... where x is the bit location in the source whose value is put in the low order bit (0) in the target. Then y is the bit location in the source whose value is put in the next bit (1) in the target. Up to 31 bits can be put in the target and unspecified target bits are set to 0.

To define the bit positions to be used, the interface supports using either the bit number, from 0 to 31 (0=LSB and 31=MSB) or using the Foxboro notation of B1 to B32 (B1=MSB and B32=LSB).

MS

B LS

B

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

B1

B2

B3

B4

B5

B6

B7

B8

B9

B10

B11

B12

B13

B14

B15

B16

B17

B18

B19

B20

B21

B22

B23

B24

B25

B26

B27

B28

B29

B30

B31

B32

The command also supports inverting specific bits by starting the bit position with a tilde (~) character.

An example is BTM=31,0,7,8.

This specification puts

bit 31 of the source to bit 0 of the target

bit 0 of the source to bit 1 of the target

bit 7 of the source to bit 2 of the target

bit 8 of the source to bit 3 of the target

The resulting value then sent to the PI tag.

50

Page 54: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Profile Points

Another example is BTM=B23,B1,~B7,B8.

This specification puts

bit 9 of the source to bit 0 of the target

bit 31 of the source to bit 1 of the target

inverted bit 25 of the source to bit 2 of the target

bit 24 of the source to bit 3 of the target

The resulting value then sent to the PI tag.

PRI_BITS= KeywordPRI_BITS=x,y,z… (priority bits) is an optional field that checks the list of specified bits and returns the offset of the first matching bit. If there are no matching bits then it will return 0. This can be used to convert a bitmapped status into a simple digital point.

The x,y,z bit positions are specified in the same way as the BTM bit positions above. It also supports the inverting of bits using the tilde (~) character.

For example, to get the controller status of a PID block as a digital state, configure the PI point as a digital that will read the .BLKSTA parameter from the block. Because BLKSTA is a long packed Boolean, use Location3=10. Then use the following

PRI_BITS=B25,~B21,B2,B22

This will return the following states. Define a digital state set to match.

State Controller Status

0 Auto - none of the checked bits match

1 On Hold - Hold bit B25 is set

2 Manual - Manual/Auto bit is NOT set (bit is set when in auto)

3 Supervisory - Supervisory control bit B2 is set

4 Remote - Local/Remote bit B22 is set

Another example is to use the AIN ALMSTA parameter to convert the alarms into a single PI digital point (instead of having one digital point for each possible alarm). Use the following

PRI_BITS=B10,B4,B7,B8,B15,B16,B3,B2

This will return the following state values. Define a digital state set to match.

State Alarm Status

0 No Alarms

1 Bad I/O

2 Out-of-Range

3 High-High Absolute

4 Low-Low Absolute

Foxboro I/A 51 and 70 Series Interface to the PI System 51

Page 55: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PI Point Configuration

5 High Absolute

6 Low Absolute

7 Inhibited

8 Unacknowledged

Use the Foxboro ICC Block manuals (B0193AX) for more information on the meanings of the bits in the various long packed 52oolean parameters available in the different block types.

Profile PointsPROFILE=Profile_info is an optional field for reading profile points if the Foxboro profile library (libprofplot.so) is available. See the section “Profile Points” for more information on reading profile points.

Note: Profile points are not supported by the Windows version of the interface. The profile library is only available on Solaris based Foxboro machines.

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 Counters Points.”

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.

Conditions can be placed on trigger events. Event conditions are specified in the extended descriptor as follows:Event=’trigger_tag_name’ event_condition

The trigger tag name must be in single quotes. For example,Event=’Sinuoid’ Anychange

will trigger on any event to the PI Tag sinusoid as long as the next event is different than the last event. The initial event is read from the snapshot.

52

Page 56: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Profile Points

The keywords in the following table can be used to specify trigger conditions.

Event Condition

Description

Anychange Trigger on any change as long as the value of the current event is different than the value of the previous event. System digital states also trigger events. For example, an event will be triggered on a value change from 0 to “Bad Input,” and an event will be triggered on a value change from “Bad Input” to 0.

Increment Trigger on any increase in value. System digital states do not trigger events. For example, an event will be triggered on a value change from 0 to 1, but an event will not be triggered on a value change from “Pt Created” to 0. Likewise, an event will not be triggered on a value change from 0 to “Bad Input.”

Decrement Trigger on any decrease in value. System digital states do not trigger events. For example, an event will be triggered on a value change from 1 to 0, but an event will not be triggered on a value change from “Pt Created” to 0. Likewise, an event will not be triggered on a value change from 0 to “Bad Input.”

Nonzero Trigger on any non-zero value. Events are not triggered when a system digital state is written to the trigger tag. For example, an event is triggered on a value change from “Pt Created” to 1, but an event is not triggered on a value change from 1 to “Bad Input.”

Obsolete Keywords Care must be taken when upgrading from previous versions of the interface as the keywords TRG=, SOURCE=, SRC=, RTN= and MSG=are no longer supported by the interface.

If the interface loads a point with one of the above keywords, the interface will refuse to load the point, and log an error message. The functionality of these keywords is supported using other methods within the interface.

Obsolete Keyword Replacement

TRG= EVENT=

SOURCE= SourceTag attribute

SRC= SourceTag attribute

RTN= Output point holds result or output.SourceTag attribute point contains value to be written

MSG= String PI point

UserInt1

Handling a Bad StatusThe UserInt1 attribute, in conjunction with the BadStatusIndication key of the fxbais.ini file, tells the Interface how to proceed if it receives a value for an I/A

Foxboro I/A 51 and 70 Series Interface to the PI System 53

Page 57: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PI Point Configuration

object that has its bad bit (bit 8) set. Please see the Configuration File section of this manual for more information.

If the value of BadStatusIndication is 0, then the Interface looks at an individual tag’s UserInt1 point attribute field for information on how to proceed.

UserInt1 Value written to PI

1 Bad Input

2 I/A value, with PI questionable bit set (PI 3 only)

3 I/A value

The default value for BadStatusIndication is 1, and so the Interface writes Bad Input when the I/A object’s bad bit is set, and the values of UserInt1 are not used.

Point-Specific Debug MessagesThe UserInt1 field also causes the Interface to print point-specific debugging messages. If bit 12 of UserInt1 is set (add 4096 to the value), then the interface will output detailed debug messages to the message log files. If bit 13 of UserInt1 is set (add 8192 to the value), then the interface will output changes to the IA status of the object to the message log files. Please refer to “Appendix A: Error and Informational Messages” for details.

Scan 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, a message is written to the pipc.log and the tag is not loaded by the interface. There is one exception to the previous statement.

If any PI Point is removed from the interface while the interface is running (including setting the scan attribute to 0), SCAN OFF will be written to the PI Point regardless of the value of the Scan attribute. Two examples of actions that would remove a PI Point from an interface are to change the point source or set the scan attribute to 0. If an interface specific attribute is changed that causes the tag to be rejected by the interface, SCAN OFF will be written to the PI point.

ShutdownThe 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 parameter is specified.

SHUTDOWN events can be disabled from being written to PI when PI is restarted by setting the Shutdown attribute to 0 for each point. Alternatively, the default behavior of

54

Page 58: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Profile Points

the PI Shutdown Subsystem can be changed 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 and PIBufSS

It is undesirable to write shutdown events when buffering is being used. Bufserv and PIBufSS are utility programs that provide 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 shutdown, Bufserv or PIBufSS will continue to collect data for the interface, making it undesirable to write SHUTDOWN events to the PI points for this interface. Disabling Shutdown is recommended when sending data to a Highly Available PI Server Collective. Refer to the Bufserv or PIBufSS manuals for additional information.

Output Points Output points control the flow of data from the PI Server to any destination that is external to the PI Server, such as a PLC or a third-party database. For example, to write a value to a register in a PLC, use an output point. Each interface has its own rules for determining whether a given point is an input point or an output point. There is no de facto PI point attribute that distinguishes a point as an input point or an output point.

The PI fxbais interface uses a negative value of Location3 to indicate that a point is an output point.

Outputs are triggered for UniInt-based interfaces. That is, outputs are not scheduled to occur on a periodic basis. There are two mechanisms for triggering an output.

As of UniInt 3.3.4, event conditions can be placed on triggered outputs. The conditions are specified using the same event condition keywords in the extended descriptor as described under “Trigger-Based Inputs.”

Trigger Method 1 (Recommended)For trigger method 1, a separate trigger point must be configured. The output point must have the same point source as the interface. The trigger point can be associated with any point source, including the point source of the interface. Also, the point type of the trigger point does not need to be the same as the point type of the output point.

The output point is associated with the trigger point by setting the SourceTag attribute of the output point equal to the tag name of the trigger point. An output 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 value that was sent to the Snapshot to trigger an output, but the timestamp of the new value must be more recent than the previous value. If no error is indicated, then the value that was sent to the trigger point is also written to the output point. If the output is unsuccessful, then an appropriate digital state that is indicative of the failure is usually written to the output point. If an error is not indicated, the output still may not have succeeded because the interface may not be able to tell with certainty that an output has failed.

Foxboro I/A 51 and 70 Series Interface to the PI System 55

Page 59: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PI Point Configuration

Trigger Method 2For trigger method 2, a separate trigger point is not configured. To trigger an output, write a new value to the Snapshot of the output point itself. The new value does not need to be different than the previous value to trigger an output, but the timestamp of the new value must be more recent than the previous value.

Trigger method 2 may be easier to configure than trigger method 1, but trigger method 2 has a significant disadvantage. If the output is unsuccessful, there is no tag to receive a digital state that is indicative of the failure, which is very important for troubleshooting.

Point Configuration ExamplesThe interface distribution contains point configuration examples in a comma-delimited file (examples_pts.csv) for use with Microsoft Excel and the PI-SMT TagConfigurator add-in.

The following table summarizes the various point configurations and the values for the InstrumentTag, Sourcetag, and the Location attributes.

Loc2 Loc3 Loc4 Loc5 InstrumentTag SourceTag

Buffered Inputs > 0 > 0 > 0 0 I/A object -

Buffered Outputs

> 0 < 0 >= 0* 0 I/A object PI value to be written

Unbuffered Inputs

0 > 0 > 0 0 I/A object -

Unbuffered Outputs

0 < 0 0 0 I/A object PI value to be written

*For Buffered Outputs, a positive Location4 value is needed to set a update rate for the FoxAPI write lists. However, the Interface does not use this value and the output event will trigger the interface to write to the FoxAPI. If Location4 = 0 then the FoxAPI update rate will default to 10 seconds.

Profile PointsIf the Foxboro profile library (libprofplot.so) is available, PI points may be configured so that PI Foxboro reads I/A profile data points. Three types of profile data points are available:

profile trigger pointsprofile array position pointsprofile discrete pointsThe point attribute fields are the same as above, except for the Exdesc and Location2 fields. The Interface ignores the value in the Location2 field because the reading of I/A profile points is always unbuffered.

Retrieval of profile points is not available on Windows NT.

56

Page 60: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Profile Points

Profile Trigger For profile trigger points, the Extended Descriptor field contains the following:PROFILE=SCAN

The instrument tag field should refer to an I/A object whose value is a timestamp. Although the value of the referenced I/A object is a timestamp, the Interface records into the profile trigger tag this I/A object’s change in value. (At startup, the Interface records a value of 0 for the initial value of the profile trigger tag.) It is the change in value of the I/A object that triggers the reading of profile array position points or profile discrete points.

The timestamp associated with the profile trigger tag is the value of the referenced I/A object. The point type of a profile trigger must be numeric. That is, it cannot be digital, string, or blob.

Profile Array Position For profile array position points, the Extended Descriptor field contains the following:

PROFILE=### EVENT=PITrigTag1

The above specification indicates that when the profile trigger tag PITrigTag1 changes value, the Interface reads the value in the profile array position ###. Here, ### is a numeric entry.

The Interface uses the FoxAPI function Praryrdel() to obtain the values for profile array positions points. The timestamp associated profile array position points is the value of the I/A object referenced by the profile trigger tag.

Profile DiscreteFor profile discrete points, the Extended Descriptor field contains the following:

PROFILE=DISCRETE EVENT=PITrigTag2

This specification indicates that when the profile trigger tag PITrigTag2 changes value, the Interface reads the value of the I/A object referenced in the instrument tag field of this profile discrete tag.

The Interface uses the FoxAPI function uread() to obtain the values for profile discrete points. The timestamp associated profile array position points is the value of the I/A object referenced by the profile trigger tag.

Foxboro I/A 51 and 70 Series Interface to the PI System 57

Page 61: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

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

Notes for Windows For Windows, command file names have a .bat extension. The Windows continuation character (^) allows for the use of multiple lines for the startup command. The maximum length of each line is 1024 characters (1 kilobyte). The number of parameters is unlimited, and the maximum length of each parameter is 1024 characters.

The PI Interface Configuration Utility (PI ICU) provides a tool for configuring the Interface startup command file.

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 for use of 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.

The PI Interface Configuration Utility (PI ICU) is not available on UNIX platforms. Therefore, the startup scripts and configuration files must be edited manually. See the section “Command-line Parameters” and section “for details.

Configuring the Interface with PI ICU

Note: PI ICU requires PI 3.3 or greater.

The PI Interface Configuration Utility provides a graphical user interface for configuring PI interfaces. If the interface is configured by the PI ICU, the batch file of the interface (fxbais.bat) will be maintained by the PI ICU and all configuration changes will be kept in that file and the module database. The procedure below describes the necessary steps for using PI ICU to configure the PI Foxboro I/A Interface.

From the PI ICU menu, select Interface, then NewWindows Interface Instance from EXE..., and then Browse to the fxbais.exe executable file. Then, enter values for Point Source and Interface ID#. A window such as the following results:

Foxboro I/A 51 and 70 Series Interface to the PI System 59

Page 62: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

“Interface name as displayed in the ICU (optional)” will have PI- pre-pended to this name and it will be the display name in the services menu.

Click on Add.

The following display should appear:

Note that in this example the Host PI System is a collective called “mkellyD630”. To configure the interface to communicate with a remote PI Server, select ‘Interface => Connections…’ item from PI ICU menu and select the default server. If the remote node is not present in the list of servers, it can be added.

Once the interface is added to PI ICU, near the top of the main PI ICU screen, the Interface Type should be fxbais. If not, use the drop-down box to change the Interface Type to be fxbais.

Click on Apply to enable the PI ICU to manage this copy of the fxbais Interface.

Foxboro I/A 51 and 70 Series Interface to the PI System 60

Page 63: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Sample fxbais.sh file

The next step is to make selections in the interface-specific tab (i.e. “fxbais”) that allow the user to enter values for the startup parameters that are particular to the PI fxbais Interface.

Foxboro I/A 51 and 70 Series Interface to the PI System 61

Page 64: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Startup Command File

Since the PI fxbais Interface is a UniInt-based interface, in some cases the user will need to make appropriate selections in the UniInt page. This page allows the user to access UniInt features through the PI ICU and to make changes to the behavior of the interface.

To set up the interface as a Windows Service, use the Service page. This page allows configuration of the interface to run as a service as well as to starting and stopping of the interface. The interface can also be run interactively from the PI ICU. To do that go to menu, select the Interface item and then Start Interactive.

For more detailed information on how to use the above-mentioned and other PI ICU pages and selections, please refer to the PI Interface Configuration Utility User Manual. The next section describes the selections that are available from the fxbais page. Once selections have been made on the PI ICU GUI, press the Apply button in order for PI ICU to make these changes to the interface’s startup file.

Fxbais Interface pageSince the startup file of the PI fxbais Interface is maintained automatically by the PI ICU, use the fxbais page to configure the startup parameters and do not make changes in the file manually. The following is the description of interface configuration parameters used in the PI ICU Control and corresponding manual parameters.

62

Page 65: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Sample fxbais.sh file

Configuration

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

Additional I/O Rate Counter NumbersBecause it is a UniInt-based interface, PI Foxboro supports the standard I/O Rate point. This I/O Rate point measures the number of events per minute that the Interface sends to PI Server. However, PI Foxboro also allows the user to keep track of

the number of buffered outputs per minute that it sends to the I/A, (-ecout=#)

the number of unbuffered inputs per minute that it sends to PI Server, and (-ecuinp=#)

the number of unbuffered outputs per minute that it sends to the I/A. (-ecuout=#)

To enable these additional I/O Rate counters, select the appropriate check box (e.g., buffered outputs). Then, enter an I/O Rate counter number in the text box next to the check box. This number must be between 2 and 34, or between 51 and 200, inclusive.

Please note that the PI Foxboro ICU control merely supplies the appropriate command line parameters to the startup command file. In order to fully enable these additional I/O Rate points, the user must also

create these I/O Rate point on the PI Server, and

edit the IORates.dat file to reference these I/O Rate points with the I/O Rate counter numbers.

FailoverThe PI Foxboro Interface may be run in a failover configuration. If a copy of the Interface is configured as the Primary node, it is responsible for collecting data whenever it is running. If a copy of the Interface is configured as the Secondary node, it collects data only after it detects that the Primary node is not currently running.

Foxboro I/A 51 and 70 Series Interface to the PI System 63

Page 66: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Startup Command File

There are many additional parameters that need to be configured in order for Failover to work. These parameters are entered by editing the fxbais.ini configuration file.

Appendix B describes Failover in more detail. (-failover=mode where mode=primary or secondary)

Bad Status Digital States

Bad Bit (bit 8) SetEnabling this parameter allows the user to choose a different digital state to send to a PI tag when its value has the bad bit set. Usually the interface will send “Bad Input” to the corresponding PI tag. (-DOUBTFUL=digitalstate)

Connection Status Bit (5,6,7)Enabling this parameter allows the user to choose a different digital state to send to a PI tag when its connection status bits (5,6,7) are set to something other than “being scanned”(1). Usually the interface will send “I/O Timeout” to the corresponding PI tag. (-NO_CONNECT=digitalstate)

FoxAPI Process NameEnabling this parameter allows the user to enter the process name of the FOXAPI process that the interface will verify that it is running before attempting to connect to the FOXAPI. (-foxapiname=name).

By default, the interface will use “foxapi.exe” on Windows platforms and “foxapi ompoll” on Solaris platforms with a local FoxAPI and no checking at all on netFoxAPI machines.

Under normal conditions, it is not necessary to define the FoxAPI process name. It should only be used if the FoxAPI is using a non-standard process name.

OutputsTo enable the PI Foxboro Interface to write data to the Foxboro, check the enable outputs box. (-write)

Configuration file

Edit fxbais.iniThis button allows the user to edit the fxbais.ini file from the ICU Control using Notepad.

Additional ParametersThe Additional Parameters text box allows entry of additional startup parameters which are currently not supported by this version of the ICU Control.

64

Page 67: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Sample fxbais.sh file

Debug SettingsTo troubleshoot anomalous behavior of the Interface, one or more debugging parameters may be enabled. These parameters tell the Interface to print informational messages to the pipc.log (Windows) or pimesslogfile (Solaris) message log file (described later).

These debugging parameters should not be used during the normal operation of the Interface.

Opening Data SetsEnabling this parameter tells the Interface to print information regarding the return status of the FoxAPI scopen() function. The Interface uses scopen() when it encounters PI points whose Location2 value is positive. (-fdb=11)

Setup of Profile Library TagsEnabling this parameter tells the Interface to print information when there is a point configured as a profile trigger point. (-fdb=12)

Reading Profile Library TagsEnabling this parameter tells the Interface to print information regarding the profile values read via the FoxAPI function Praryrdel().(-fdb=13)

PI Server Time OffsetEnabling this parameter tells the Interface to print information regarding time offset between the computer running the Interface and the computer running PI Server. The Interface prints this information every 10 minutes. (-fdb=15)

Point LoadingEnabling this parameter tells the Interface to print detailed information regarding points that it has either loaded or not loaded. (-fdb=16)

Foxboro I/A 51 and 70 Series Interface to the PI System 65

Page 68: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Startup Command File

ShutdownEnabling this parameter tells the Interface to print information regarding shutdown signals received. In addition, the Interface displays a message when it tells the FoxAPI to close a data set. (-fdb=17)

Close All Data SetsUnlike other debugging parameters, this one modifies the behavior of the Interface. Enabling this parameter tells the Interface to close all FoxAPI data sets, even those that it did not open. (-fdb=18)

Buffered OutputsEnabling this parameter tells the Interface to print a message when a buffered output fails. (-fdb=19)

Outputs in GeneralEnabling this parameter tells the Interface to print information regarding outputs. Enable this parameter if there are problems with using PI Foxboro to send data from PI to the I/A. (-fdb=21)

Detailed Data Set OpeningEnabling this parameter tells the Interface to print detailed information regarding the return status of the FoxAPI scopen() function. The Interface uses scopen() when it encounters PI points whose Location2 value is positive. (-fdb=24)

Log message for dev_hibernate()Enabling this parameter tells the Interface to print a message when the dev_hibernate() function is entered and exited. Typically, this function will be called several times a second and so can quickly fill the log files and should be used with caution. To reduce the frequency that dev_hibernate() is called, the HibernateDelay parameter in the fxbais.ini file can be increased. (-fdb=25)

Log message for dev_service_input_list()Enabling this parameter tells the Interface to print a message when the dev_service_input_list() function is entered and exited. This function is called when each of the scan classes needs to be processes and so can quickly fill the log files and should be used with caution. (-fdb=26)

Detailed info on each FoxAPI call made by Int.Enabling this parameter tells the Interface to print detailed information about each call made to the FoxAPI. This will generate a lot of messages and will quickly fill the log files and should be used with caution. (-fdb=27)

Log “Out of Service” and “Return to Service”Enabling this parameter tells the Interface to log the “Out of Service” and “Return to Service” messages for each of the I/A objects as they change status. By default, the interface will not log these messages as they can fill the log files quickly when I/A

66

Page 69: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Sample fxbais.sh file

compounds are turned off and on. For troubleshooting of bad inputs, it may be necessary to log this status information. (-fdb=28)

Command-line ParametersParameter Description

-doubtful=digstate

Optional; seldom used

When the Interface receives a value for an I/A object that has its bad bit (bit 8) or out-of-service bit (bit 11) set, it usually writes the Bad Input digital state to the corresponding PI tag. (See the discussion on BadStatusIndication above.) To write another digital state, use the -doubtful parameter and specify another digital state. For example,

-doubtful=”Invalid Data”

Notice quotation marks are used if the digital state contains a space.

-ec=#

Optional

The first instance of the -ec parameter on the command-line is used to specify a counter number, #, for an I/O Rate point. If the # is not specified, then the default event counter is 1. Also, if the -ec parameter 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=#explicitly defined will write to the same I/O Rate point. This means either explicitly defining an event counter other than 1 for each copy of the interface or not associating 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.”

-ecout=#

Optional

The -ecout parameter specifies the I/O Rate counter number for measuring the rate of buffered outputs from PI to the I/A. The value of x should be between 2 and 34, inclusive, or 51 and 200, inclusive.

This I/O Rate counter can NOT be configured using the ICU under Windows. Please use the methods described in the section “Configuring I/O Rate Points Manually”.

-ecuinp=#

Optional

The -ecuinp parameter specifies the I/O Rate counter number for measuring the rate of unbuffered inputs from the I/A to PI. The value of x should be between 2 and 34, inclusive, or 51 and 200, inclusive.

This I/O Rate counter can NOT be configured using the ICU under Windows. Please use the methods described in the section “Configuring I/O Rate Points Manually”.

-ecuout=#

Optional

The -ecuout parameter specifies the I/O Rate counter number for measuring the rate of unbuffered outputs from PI to the I/A. The value of x should be between 2 and 34, inclusive, or 51 and 200, inclusive.

This I/O Rate counter can NOT be configured using the ICU under Windows. Please use the methods described in the section “Configuring I/O Rate Points Manually”.

-f=SS.##or-f=SS.##,SS.##

The -f parameter defines the time period between scans in terms of hours (HH), minutes (MM), seconds (SS) and sub-seconds (##). The scans can be scheduled to occur at discrete moments in time with an

Foxboro I/A 51 and 70 Series Interface to the PI System 67

Page 70: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Startup Command File

Parameter Description

or -f=HH:MM:SS.##or-f=HH:MM:SS.##,hh:mm:ss.##

Required for reading scan-based inputs

optional time offset specified in terms of hours (hh), minutes (mm), seconds (ss) and sub-seconds (##). If HH and MM are omitted, then the time period that is specified is assumed to be in seconds.

Each instance of the -f parameter 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 parameter on 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:07or, equivalently:-f=60,5 -f=7The 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 means that if the interface was started at 05:06:06, the first scan would be at 05:07:05, the second scan would be at 05:08:05, 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 “Performance Summaries” in the UniInt Interface User Manual.doc for more information on skipped or missed scans.

Sub-second Scan Classes

Sub-second scan classes can be defined 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

Note: Although the interface supports subsecond scan classes, because of limitations in the FoxAPI, 0.5 seconds is the fastest that an object can updated from the I/A system, so scan rates faster than 0.5 seconds will cause duplicate values to be sent to PI and is not recommended.

68

Page 71: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Sample fxbais.sh file

Parameter Description

Wall Clock Scheduling

Scan classes that strictly adhere to wall clock scheduling are now possible. This feature is available for interfaces that run on Windows and/or UNIX. Previously, wall clock scheduling was possible, but not across daylight saving time. For example, -f=24:00:00,08:00:00 corresponds to 1 scan a day starting at 8 AM. However, after a Daylight Saving 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 saving time), 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.

-failover=x

Optional

Specify -failover=primary or -failover=secondary to run the Interface in a failover configuration. There are many additional parameters that need to be configured in order for Failover to work. Enter these parameters by editing the fxbais.ini configuration file. Appendix B describes Failover in more detail.

-fdb=#,#,#,…

Optional

To troubleshoot anomalous behavior of the Interface, enable one or more debugging parameters via -fdb. These parameters tell the Interface to print informational messages to the pipc.log (Windows) or pimesslogfile (Solaris) message log file (described later).

The following are a list of the debug flags that can be set.

11 - Additional messages when opening lists of tags

12 - Setup of tags used with the libprofplot.so library

13 - Reading of data using libprofplot.so function calls

15 - Time offset between the PI Server and the Interface

16 - Verbose messages during point loading

17 - Verbose messages during Interface shutdown

18 - Extra attempts to locate and close data sets. Unlike other debugging values, this one affects the behavior of the Interface. If -fdb=18 is specified, the Interface will close all data sets, even those that it did not open.

19 - Messages for buffered outputs

20 - Messages for unbuffered outputs

21 - Messages for outputs in general

24 - Detailed error status after an scopen() call

25 - Log messages when interface enters and leaves dev_hibernate()

26 - Log messages when interface enters and leaves dev_service_input_list()

27 - Detailed information on each FoxAPI call made by the interface

28 - Log “Out of service” and “Return to Service” status messages

For example, -fdb=16 will cause additional messages to be logged

Foxboro I/A 51 and 70 Series Interface to the PI System 69

Page 72: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Startup Command File

Parameter Description

when a point is loaded by the interface.

-foxapiname=name

Optional

Defines the name of the FoxAPI process that the interface will verify is running before attempting to connect to the FoxAPI. If the setting is blank then the interface will skip the check.

For Windows, the default is “foxapi.exe”. For Solaris with a local FoxAPI, then default is “foxapi ompoll”. For Solaris with the Networked FoxAPI, the default is blank and no check is made.

Under normally conditions, there should be no need to set the -foxapiname= argument. It would only be required if the FoxAPI is running with a non-standard name.

-foxserver=host

Required if netFoxAPI is used

The -foxserver parameter specifies the name of the netFoxAPI server machine. If the netFoxAPI is not used, do not specify this parameter.

-host=XXXXXX:port

Required for Windows and UNIX

The -host parameter is used to specify the PI Home node. Host is 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. It is recommended to explicitly define the host and port on the command-line with the -host parameter.

Examples:The interface is running on a PI Interface Node, the domain name of the PI home node is Marvin, and the IP address of Marvin is 206.79.198.30. Valid -host parameters would be:-host=marvin -host=marvin:5450 -host=206.79.198.30-host=206.79.198.30:5450

-id=x

Highly Recommended

The -id parameter is used to specify the interface identifier.

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 Appendix A: Error and Informational Messages for more information.

UniInt always uses the -id parameter in the fashion described above. This interface also uses the -id parameter to identify a particular interface copy number that corresponds to an integer value that is assigned to one of the Location code point attributes, most frequently Location1. For this interface, use only numeric characters in the identifier. For example,

-id=1

70

Page 73: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Sample fxbais.sh file

Parameter Description

-no_connect=digstate

Optional; seldom used

When the Interface receives a value for an I/A object that has its object connection status bits (bits 5, 6, or 7) set to something other than “being scanned” (1), it writes the IO Timeout digital state to the corresponding PI tag. To write a different digital state, use the -no_connect parameter and specify another digital state. For example,

-no_connect=”Not Connect”

Notice quotation marks are used if the digital state contains a space.

-ps=x

Required

The -ps parameter specifies the point source for the interface. X is not case sensitive and can be any multiple character string. For example, -ps=P and -ps=p are equivalent.

The point source that is assigned with the -ps parameter corresponds to the PointSource attribute of individual PI Points. The interface will attempt to load only those PI points with the appropriate point source.

-sio

Optional

The -sio parameter stands for “suppress initial outputs.” The parameter applies only for interfaces that support outputs. If the -sio parameter 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 parameter 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 parameter is specified, outputs will only be written when they are explicitly triggered.

Foxboro I/A 51 and 70 Series Interface to the PI System 71

Page 74: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Startup Command File

Parameter Description

-stopstator-stopstat=digstate

Default:-stopstat=”Intf Shut”

Optional

If the -stopstat parameter is present on the startup command line, then the digital state Intf Shut will be written to each PI Point when the interface is stopped.

If -stopstat=digstate is present on the command line, then the digital state, digstate, will be written to each PI Point when the interface is stopped. For a PI 3 Server, digstate must be in the system digital state 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.

Note: The -stopstat parameter is disabled if the interface is running in a failover configuration and the interface is the no standby when it is stopped. Therefore, the digital state, digstate, will not be written to each PI Point when the interface is stopped. This prevents the digital state being written to PI Points while a redundant system is also writing data to the same PI Points.

Examples:-stopstat=-stopstat=shutdown-stopstat=”Intf Shut”

The entire digstate value should be enclosed within double quotes when there is a space in digstate.

-write

Optional

The -write parameter enables the Interface to send data from PI to the I/A. If the -write parameter is omitted; the Interface does not load output points.

Sample fxbais.bat fileOn Windows, the following is an example startup command file:REM ========================================================================REMREM fxbais.batREM REM Startup file for Foxboro I/A 51 and 70 Series Interface to the PI System.REMREM =========================================================================REMREM OSIsoft strongly recommends using PI ICU to modify startup files.REMREM Sample command lineREM.\fxbais -host=XXXXXX:5450 -ps=fxbais -id=1 -stopstat=”Intf Shut” ^ -f=2,0 -f=2,1 -f=10REMREM End of fxbais.bat file

72

Page 75: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Sample fxbais.sh file

Sample fxbais.sh fileOn Solaris, the file fxbais.sh_new should be used as a template. Most of the fxbais.sh script file should be left unchanged from the template except for the command-line near the end of the script, where the fxbais executable is actually started. This is where the site specific parameters are given. The variable PROG_NAME, which defines the name of the executable, is defined near the top of the script as fxbais by default, and does not normally need to be changed.

Local FoxAPI (running the interface on a Foxboro I/A AP or AW)The following is an example command for the Interface using local FoxAPI:./$PROG_NAME -ps=F -id=1 -stopstat -q -f=4 -f=6 -ec=2 \

$WORKDIR/${PROG_NAME}.out 2>&1 &

netFoxAPI (Running the Interface on a Non-I/A Solaris Machine)The variable PROG_NAME should be defined as fxbaisnet, and the command line must include the parameter –foxserver=

For example:./$PROG_NAME -ps=F -id=1 –foxserver=AP5101 -stopstat -q -f=2,0 \ -f=2,1 -ec=2 $WORKDIR/${PROG_NAME}.out 2>&1 &

On Solaris, the following is a sample fxbais.sh file.

#!/bin/sh#!/bin/sh# “@(#)fxbais.sh 2.0 15-Jun-2009”## PI-Foxboro I/A 51 Series Interface to the PI System### ICopyright OSIsoft, Inc. San Leandro, California 1998-2006## Revision# 1.0 18-Mar-98 cah Original# 1.1 16-Dec-98 cah Added new command line options.# 1.2 30-Apr-99 cah Generalized for multiple interface copies with# a numeric argument to this script.# 1.3 10-Feb-00 cah removed /sn by default;# 08-Aug-02 et changed ISRUNNING to ignore results from go_pistart# 1.4 09-Mar-04 kjm code tidy# 1.5 21-Jul-04 kjm fix problem with detecting process already running# and check whether process was started# 1.6 13-Sep-05 kjm add -foxapiname parameter in comments# 2.0 15-Jun-09 kjm tidy script#

## If you are running FoxNet API, edit PROG_NAME=fxbaisnet## If you are running mulitple instances then there should be multiple copies# of this script, one for each instance of the interface and edit PROG_NAME

Foxboro I/A 51 and 70 Series Interface to the PI System 73

Page 76: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Startup Command File

# to match the interface process name# i.e. PROG_NAME=fxbais1#PROG_NAME=fxbais

## log message function#LogMessage(){ if [ -x $PIHOME/bin/shootq ]; then $PIHOME/bin/shootq “fxbais.sh> $1” fi echo $1}

## verify process started function#VerifyStart(){ sleep 2 ISRUNNING=`ps -ef | grep “$PROG_NAME “ | grep -v grep | grep -v $PROG_NAME.sh | grep -v go_pistart` if [ -z “$ISRUNNING” ]; then LogMessage “ERROR > Interface ($PROG_NAME process) failed to start” fi} ## Verify the PIHOME Environment Variable#if [ ${PIHOME:-notdefined} = “notdefined” ]; then echo “ERROR > The PIHOME environment variable has not been defined” exit 1fi

## abort startup if the interface is already running#ISRUNNING=`ps -ef | grep “$PROG_NAME “ | grep -v grep | grep -v $PROG_NAME.sh | grep -v go_pistart`if [ -n “$ISRUNNING” ]; then LogMessage “ERROR > Interface ($PROG_NAME process) already running” exit 1fi

## define work directory#WORKDIR=$PIHOME/datecho “Output file is in $WORKDIR”

# if output file exists then rename as .old file

74

Page 77: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Sample fxbais.sh file

#if [ -f $WORKDIR/${PROG_NAME}.out ]; then echo “Renamed ${PROG_NAME}.out as ${PROG_NAME}.old” /bin/mv “$WORKDIR/${PROG_NAME}.out” “$WORKDIR/${PROG_NAME}.old”fi

## log message that we are starting the interface #LogMessage “Starting $PROG_NAME interface”

# ====================# Required Parameters:# ====================## -host=XXXXXX:port Piserver hostname and port id (545 or 5450)# -ps=? Point source character. # -id=# Interface number (used in location1 definition)# -f=#:#:#,#:#:# Scan class frequency and offset.## ==============================# Optional Interface Parameters:# ==============================# # -ec=# Event counter for buffered inputs.# -ecout=# Event counter for buffered outputs.# -ecuinp=# Event counter for unbuffered inputs.# -ecuout=# Event counter for unbuffered outputs.# -doubtful=digitalstate Digital state used when object is bad.# -failover=mode Interface failover mode (Primary or Secondary).# -fdb=#,#,#,... Interface specific debugging options.# -foxapiname=procname FoxAPI process that the interface will check.# -foxserver=hostname netFoxAPI server name [Required for NetFoxAPI].# -no_connect=digitalstate Digital state used when object is not connected.# -write Enable outputs to Foxboro I/A.## ==============================# Recommended Uniint Parameters:# ==============================## -q Queue input data before a putsnapshot call. # -stopstat=”Intf Shut” written to PI on normal shutdown. ## ===========================# Optional Uniint Parameters:# ===========================## -sn Snapshots, not exceptions on data received by interface.# (Interface does exceptions, not FoxAPI)# -sio Suppress initial output of current snapshot value in source# tag during point database loading.# -perf=# Hours between scan performance summary.##--- Edit the following line ---./$PROG_NAME -host=XXXXXX:5450 -ps=F -id=1 -stopstat=”Intf Shut” \

Foxboro I/A 51 and 70 Series Interface to the PI System 75

Page 78: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Startup Command File

-f=2,0 -f=2,1 -f=10 \ > $WORKDIR/${PROG_NAME}.out 2>&1 &

VerifyStartexit 0# end

76

Page 79: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

fxbais.ini Configuration FileThe behavior of PI Foxboro may be further customized by creating a configuration file called fxbais.ini. This file is not needed for normal interface operation. Use this file only if special behavior is needed for the Interface.

This fxbais.ini file resides in the same directory as the interface executable (fxbais / fxbais.exe / fxbaisnet). The contents of fxbais.ini should have the following format:[fxbais-1]; comment lines begin with a semi-colon; lines in this file have the format; key=value;; BadStatusIndication=1; FirstSetReopen=60; SetReopen=24; EditSetReopen=35; HibernateDelay=100; DebugFlags=11,12 ;; The following keys are used for failover;; failover_peer=casaba; fail_time=4; watchdog=PI_COMM:PI_WATCHDOG.LI01; failover_status=fx:coll

The [fxbais-1] section indicates that the entries below it pertain to the copy of PI Foxboro running with -id=1. (For a copy of PI Foxboro running with -id=2, put in a section called [fxbais-2], and so on.)

The following sections describe the meaning of the different keys and their values. Details on the failover variables are in section “Appendix B: Failover Support”.

BadStatusIndicationThe BadStatusIndication key tells the Interface how to proceed if it receives a value for an I/A object that has its bad bit (bit 8) set. The following table describes the behavior:

BadStatusIndication Value written to PI

0 Action controlled on a tag-by-tag basis, using the value of PI tag UserInt1 attribute.

1 Bad Input

2 I/A value, with PI questionable bit set (PI 3 only)

3 I/A value

Foxboro I/A 51 and 70 Series Interface to the PI System 77

Page 80: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

If the value of BadStatusIndication is 0, then the Interface looks at an individual tag’s UserInt1 point attribute field for information on how to proceed.

UserInt1 Value written to PI

0 or 1 Bad Input

2 I/A value, with PI questionable bit set (PI 3 only)

3 I/A value

The default value for BadStatusIndication is 1. That is, the Interface writes Bad Input when the I/A object’s bad bit (bit 8) or out-of-service bit (bit 11) is set, and the value of UserInt1 attribute is not used.

FirstSetReopen / SetReopenWhen an attempt by PI Foxboro to open a FoxAPI data set fails, the Interface will try to reopen this data set after FirstSetReopen seconds and again every SetReopen hours. Fractional values for SetReopen are allowed. To prevent the reopening of a set, enter a value of 0 for either FirstSetReopen or SetReopen. The default value is 0 (disabled) for both entries.

EditSetReopenIf a tag that is part of a FoxAPI data set is edited, the Interface waits EditSetReopen seconds before closing and reopening the set. The default value of EditSetReopen is 35 seconds.

HibernateDelayAfter it has finished opening all its data sets, the Interface waits HibernateDelay milliseconds before checking the I/A for new values. The default value of HibernateDelay is 100 milliseconds.

DebugFlagsContains a list of comma separated values used to enable different types of debug messages within the interface. This is the same as the -fdb= command-line arguments.

The recognized debug values are:

11 - Additional messages when opening lists of tags

12 - Setup of tags used with the libprofplot.so library

13 - Reading of data using libprofplot.so function calls

15 - Time offset between the PI Server and the Interface

16 - Verbose messages during point loading

17 - Verbose messages during Interface shutdown

18 - Extra attempts to locate and close data sets. Unlike other debugging values, this one affects the behavior of the Interface. If -fdb=18 is specified, the Interface will close all data sets, even those that it did not open.

19 - Messages for buffered outputs

Foxboro I/A 51 and 70 Series Interface to the PI System 78

Page 81: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

fxbais.ini Configuration File

20 - Messages for unbuffered outputs

21 - Messages for outputs in general

24 - Detailed error status after an scopen() call

25 - Log messages when interface enters and leaves dev_hibernate()

26 - Log messages when interface enters and leaves dev_service_input_list()

27 - Detailed information on each FoxAPI call made by the interface

28 - Log “Out of service” and “Return to Service” status messages

Foxboro I/A 51 and 70 Series Interface to the PI System 79

Page 82: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Node ClockThe PI server time zone should always be set to the local time zone. Internally, the PI server uses UTC time for the timestamps, and for that to be correct then the local time zone must be set correctly.

The time zone settings on the Foxboro Aws can vary depending on the configuration. On all older systems, the time zone was always set to GMT, and the system clock was adjusted so that the apparent time on the system matched the actual local time. On newer systems, they can be configured to use either the GMT time zone, or the actual local time zone.

If the Foxboro Aws are using the GMT time zone setting, when the interface attempts to get the UTC time from the system clock on the Foxboro Aws, it will return the wrong value. It will be wrong by the difference between the GMT time and the local time, and by clock drift. To get around this problem, the interface will periodically read the UTC time from the PI server and calculate the difference between the actual UTC time on the PI server and the apparent UTC time on the Foxboro Aws. This difference is then applied to the time retrieved when the values from the FoxAPI are read, and the resulting adjusted time is used when the events are sent to PI.

The interface will update the offset every 10 minutes, or when it has detected a step change in the system clock of the Foxboro AW.

This means that the interface does not need to be configured for any specific time zone setting. It will automatically adjust to whatever time zone or system clock settings are using on the Foxboro AW. It also means that the interface is able to handle daylight savings transitions without the need change or restart anything, provided the current releases of the PI API and the interface are being used.

There were issues with some of the older versions of the PI API, where if the system clock was moved backwards, the interface would stop scanning until the system clock caught up to its previous time. For example, if the clock was put back by 1 hour, the interface would stop scanning for 1 hour. This problem was resolved in PI API version 1.3.9.8 (2004), but we would recommend using PI API 1.6.1.7 or later.

Foxboro I/A 51 and 70 Series Interface to the PI System 81

Page 83: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Security

Windows and UNIX 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 “Managing Security” of the PI Server System Management Guide.

If the interface cannot write data to the PI 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.

PI Server v3.3 and Higher

Security configuration using piconfigFor PI Server v3.3 and higher, the following example demonstrates how to edit the PI Trust table:C:\PI\adm> piconfig@table pitrust@mode create@istr Trust,IPAddr,NetMask,PIUsera_trust_name,192.168.100.11,255.255.255.255,piadmin@quit

For the above,

Trust: An arbitrary name for the trust table entry; in the above example,

a_trust_name

IPAddr: the IP Address of the computer running the Interface; in the above example,

192.168.100.11

NetMask: the network mask; 255.255.255.255 specifies an exact match with IPAddr

PIUser: the PI user the Interface to be entrusted as; piadmin is usually an appropriate user

Security Configuring using Trust EditorThe Trust Editor plug-in for PI System Management Tools 3.x may also be used to edit the PI Trust table.

See the PI System Management chapter in the PI Server manual for more details on security configuration.

Foxboro I/A 51 and 70 Series Interface to the PI System 83

Page 84: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

PI Server v3.2For PI Server v3.2, the following example demonstrates how to edit the PI Proxy table:C:\PI\adm> piconfig@table pi_gen,piproxy@mode create@istr host,proxyaccountpiapimachine,piadmin@quitIn place of piapimachine, put the name of the PI Interface node as it is seen by PI Server.

Foxboro I/A 51 and 70 Series Interface to the PI System 84

Page 85: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Starting / Stopping the Interface on Windows This section describes starting and stopping the interface once it has been installed as a service. See the UniInt Interface User Manual to run the interface interactively.

Starting Interface as a ServiceIf the interface was installed a service, it can be started from PI ICU, the services control panel or with the command:fxbais.exe -start

To start the interface service with PI ICU, use the button on the PI ICU toolbar.

A message will inform the user of the status of the interface service. Even if the message indicates that the service has started successfully, double check through the Services control panel applet. Services may terminate immediately after startup for a variety of reasons, and one typical reason is that the service is not able to find the command-line parameters in the associated .bat file. Verify that the root name of the .bat file and the .exe file are the same, and that the .bat file and the .exe file are in the same directory. Further troubleshooting of services might require consulting the pipc.log file, Windows Event Viewer, or other sources of log messages. See the section “Appendix A: Error and Informational Messages,” for additional information.

Stopping Interface Running as a ServiceIf the interface was installed a service, it can be stopped at any time from PI ICU, the services control panel or with the command:fxbais.exe -stopThe service can be removed by:fxbais.exe -remove

To stop the interface service with PI ICU, use the button on the PI ICU toolbar.

Foxboro I/A 51 and 70 Series Interface to the PI System 85

Page 86: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Starting / Stopping the Interface on UNIX This section describes starting and stopping the interface as a background process. See the UniInt Interface User Manual to run the interface as a foreground process.

Interface Startup ScriptAs part of the interface installation, an interface startup script fxbais.sh was created. To manually start the interface

1. Ensure that the PI API processes are runningapiverifyNAME PID TIME %CPU VSZbufserv 2260 00:00:00 0.0 5480bufserv 2261 00:00:00 0.0 7672bufserv 2263 00:00:00 0.0 7672WARNING: multiple instances of bufserv are runningmqmgr 2252 00:00:00 0.0 4356mqsrv 2246 00:00:00 0.0 4360ioshmsrv 2269 00:00:00 0.0 4360iorates 2275 00:00:00 0.0 8640WARNING: fxbais is NOT running

The above is configured for buffering to 2 replicated PI servers, which is why there are 3 bufserv processes running. When buffering is configured there should be n+1 bufserv processes. Ignore the WARNING in the apiverify output.

2. Change to the interface directorycd $PIHOME/interfaces/fxbais

3. Run the interface startup scriptfxbais.shOutput file is “/opt/piapi/dat/fxbais.out”Renamed existing “fxbais.out” as “fxbais.old”Starting interface “fxbais”

This should start the interface as a background process. The stdout and stderr messages will be redirected to the $PIHOME/dat/fxbais.out file. The interface messages will also be logged into the $PIHOME/dat/pimesslogfile file.

Interface Stop ScriptIn the interface directory, there is a standard script that can be used to stop the interface when it is running in the background. This script is called fxastop. It will look for a running process with the name fxbais and send it a terminate signal.

When running multiple instances of the interface, the script should be copied to fxastop# (where # is the instance number) and edited so that each copy will only kill the required interface.

Foxboro I/A 51 and 70 Series Interface to the PI System 87

Page 87: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Starting / Stopping the Interface on UNIX

Automatic startup and shutdownTo simplify the management of the system, the interface is normally configured so that it will automatically start and stop when the other PI processes are started and stopped. This is done with the $PIHOME/bin/sitestart and $PIHOME/bin/sitestop scripts. The pistart and pistop scripts use these scripts for any site-specific commands and are typically used to start and stop the interfaces.

Note: Before configuring the sitestart and sitestop scripts, ensure that the interfaces are properly configured and have been manually started and stopped without any problems.

To have the interface automatically start when the pistart script is run, append contents of the add2start file to the sitestart script with the following commandcat $PIHOME/interfaces/fxbais/add2start >>$PIHOME/bin/sitestart

It will have the sitestart script check to see if the interface files are present and if so, it will start the interface. If the file is not found then the script will output an error message.

To have the interface stopped when the pistop script is run, append the contents of the add2stop file to the end of the sitestop script with the following commandcat $PIHOME/interfaces/fxbais/add2start >>$PIHOME/bin/sitestart

This will have the sitestop script check to see if the interface stop script called fxastop is present and if so it will run that script. If the script is not present, it will output an error message.

Automatic startup on a rebootTo have the PI API processes and the interface automatically start on a reboot, the standard Foxboro user_add.dat file is used.

Note: Automatically startup on a reboot should be the final step in the installation and configuration of the interface. All the above start and stop scripts listed above should be fully tested before configuring automatic startup.

Note: If buffering is to be used on the interface node (and it is strongly recommended), this should also be configured and tested before the automatic startup is added.

To add the PI API and interface to the list of applications to be started use the following procedure

1. Copy the go_pistart script from the interface directory to $PIHOME/bin directory cp $PIHOME/interfaces/fxbais/go_pistart $PIHOME/bin

2. Append the full path of the go_pistart file to the /etc/fox/user_apps.dat file.echo $PIHOME/bin/go_pistart >>/etc/fox/user_apps.dat

Note: By default, the /etc/fox/user_apps.dat file does not exist on a most AW51 stations. The above command will create the file if it does not already exist.

Note: The /etc/fox/user_apps.dat file is not a script. It is an input file used by the foxapps script. Because of this, it can only contain a list of scripts or programs that

88

Page 88: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

foxapps will run. You can not define environment variables or other such things within the user_apps.dat file.

Terminating Background ProcessesNormally, the fxbais_stop script can be used to stop the interface process. However, if the script is not working, or you wish to stop a process with a different name, use the following instructions.

First, obtain the process id (PID) of the background job. This is done as follows. First execute the command:ps -ef | grep fxbaiswhich produces output similar to:root 2527 1 0 09:24 pts/0 00:00:00 ./fxbais …The second column is the pid of the process. That is, 2527 is the PID of the fxbais interface in the example above.

The process is then stopped by:kill 2527The 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 but it will not allow the interface to close its FoxAPI lists. If the interface is stopped with a kill -9 then the FoxAPI processes should also be stopped and restarted with the aisstop and aisstart scripts, to ensure that the lists are closed.

Anomalous Background Job TerminationOn 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. This is because the shell is passing the terminate signal to the background processes started by that instance of the shell.

A way of insuring that background processes are not accidentally terminated is to use a shell that does not propagate the terminate signal to background processes. If the ksh, bash or csh shells are used then the Ctrl-C from the foreground will not terminate processes in the background.

For this reason, it is highly recommended to always use a csh when interacting with the PI API or the interface. On the older Foxboro systems, the default shell for root is the csh, so by logging in as root is all that is required. On the newer Solaris 10 systems, the default root shell is the Bourne shell. When logging on as root on Solaris 10, we strongly advise using manually starting a csh before interacting with the PI API or the interface.

Foxboro I/A 51 and 70 Series Interface to the PI System 89

Page 89: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Starting / Stopping the Interface on UNIX

Starting a VT100.local window to get a command-line prompt, it will start a Bourne shell. Therefore, it is advisable to use the command cmdtool csh & to start a new window which has explicitly started a csh shell.

90

Page 90: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

BufferingBuffering refers to an Interface Node’s ability to temporarily store the data that interfaces collect and to forward these data to the appropriate PI Servers. OSIsoft strongly recommends that you enable buffering on your Interface Nodes. Otherwise, if the Interface Node stops communicating with the PI Server, you lose the data that your interfaces collect.

The PI SDK installation kit installs two buffering applications: the PI Buffer Subsystem (PIBufss) and the PI API Buffer Server (Bufserv). PIBufss and Bufserv are mutually exclusive; that is, on a particular computer, you can run only one of them at any given time.

If you have PI Servers that are part of a PI Collective, PIBufss supports n-way buffering. N-way buffering refers to the ability of a buffering application to send the same data to each of the PI Servers in a PI Collective. (Bufserv also supports n-way buffering, but OSIsoft recommends that you run PIBufss if it is available for the platform.)

Which Buffering Application to UseYou should use PIBufss whenever possible because it offers better throughput than Bufserv. In addition, if the interfaces on an Interface Node are sending data to a PI Collective, PIBufss guarantees identical data in the archive records of all the PI Servers that are part of that collective.

You can use PIBufss only under the following conditions:

the PI Server version is at least 3.4.375.x; and

the Interface Node is running one of the following- Windows 2000 SP4- Windows XP with at least SP2- Windows Server 2003 with at least SP1 (x86, x64)- Windows Server 2008 (x86, x64)- Windows Vista with at least SP1Because of this limitation, PIBufss cannot be used on AW51 stations or AW70 stations running versions of I/A older than I/A 8.2.PIBufss is NOT available on the Solaris platforms.

all of the interfaces running on the Interface Node send data to the same PI Server or to the same PI Collective.

If any of the following scenarios apply, you must use Bufserv:

the PI Server version is earlier than 3.4.375.x; or

the Interface node runs multiple interfaces, and these interfaces send data to multiple PI Servers that are not part of a single PI Collective.

If an Interface Node runs multiple interfaces, and these interfaces send data to two or more PI Collectives, then neither PIBufss nor Bufserv is appropriate. The reason is that PIBufss and Bufserv can buffer data only to a single collective. If you need to buffer to more than one PI Collective, you need to use two or more Interface Nodes to run your interfaces.

Foxboro I/A 51 and 70 Series Interface to the PI System 91

Page 91: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

It is technically possible to run Bufserv on the PI Server Node. However, OSIsoft does not recommend this configuration.

How Buffering WorksA complete technical description of PIBufss and Bufserv is beyond the scope of this document. However, the following paragraphs provide some insights on how buffering works.

When an Interface Node has Buffering enabled, the buffering application (PIBufss or Bufserv) connects to the PI Server. It also creates shared memory storage.

When an interface program makes a PI API function call that writes data to the PI Server (for example, pisn_sendexceptionqx()), the PI API checks whether buffering is enabled. If it is, these data writing functions do not send the interface data to the PI Server. Instead, they write the data to the shared memory storage that the buffering application created.

The buffering application (either Bufserv or PIBufss) in turn

reads the data in shared memory, and

if a connection to the PI Server exists, sends the data to the PI Server; or

if there is no connection to the PI Server, continues to store the data in shared memory (if shared memory storage is available) or writes the data to disk (if shared memory storage is full).

When the buffering application re-establishes connection to the PI Server, it writes to the PI Server the interface data contained in both shared memory storage and disk.

(Before sending data to the PI Server, PIBufss performs further tasks such data validation and data compression, but the description of these tasks is beyond the scope of this document.)

When PIBufss writes interface data to disk, it writes to multiple files. The names of these buffering files are PIBUFQ_*.DAT.

When Bufserv writes interface data to disk, it writes to a single file. The name of its buffering file is APIBUF.DAT.

As a previous paragraph indicates, PIBufss and Bufserv create shared memory storage at startup. These memory buffers must be large enough to accommodate the data that an interface collects during a single scan. Otherwise, the interface may fail to write all its collected data to the memory buffers, resulting in data loss. The buffering configuration section of this chapter provides guidelines for sizing these memory buffers.

When buffering is enabled, it affects the entire Interface Node. That is, you do not have a scenario whereby the buffering application buffers data for one interface running on an Interface Node but not for another interface running on the same Interface Node.

Buffering and PI Server SecurityAfter you enable buffering, it is the buffering application—and not the interface program—that writes data to the PI Server. If the PI Server’s trust table contains a trust entry that allows all applications on an Interface Node to write data, then the buffering application is able write data to the PI Server.

Foxboro I/A 51 and 70 Series Interface to the PI System 92

Page 92: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Configuring PI API Buffer Server (BufServ) Manually

However, if the PI Server contains an interface-specific PI Trust entry that allows a particular interface program to write data, you must have a PI Trust entry specific to buffering. The following are the appropriate entries for the Application Name field of a PI Trust entry:

Buffering Application Application Name field for PI Trust

PI Buffer Subsystem PIBufss.exe

PI API Buffer Server APIBE (if the PI API is using 4 character process names)

APIBUF (if the PI API is using 8 character process names)

To use a process name greater than 4 characters in length for a trust application name, use the LONGAPPNAME=1 in the PIClient.ini file.

Enabling Buffering on an Interface Node with the ICUThe ICU allows you to select either PIBufss or Bufserv as the buffering application for your Interface Node. Run the ICU and select Tools > Buffering.

Choose Buffer Type

To select PIBufss as the buffering application, choose Enable buffering with PI Buffer Subsystem.

To select Bufserv as the buffering application, choose Enable buffering with API Buffer Server.

If a warning message such as the following appears, click Yes.

Foxboro I/A 51 and 70 Series Interface to the PI System 93

Page 93: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Buffering

Buffering SettingsThere are a number of settings that affect the operation of PIBufSS and Bufserv. The Buffering Settings section allows you to set these parameters. If you do not enter values for these parameters, PIBufSS and Bufserv use default values.

PIBufssFor PIBufSS, the paragraphs below describe the settings that may require user intervention. Please contact OSIsoft Technical Support for assistance in further optimizing these and all remaining settings.

Primary and Secondary Memory Buffer Size (Bytes)This is a key parameter for buffering performance. The sum of these two memory buffer sizes must be large enough to accommodate the data that an interface collects during a single scan. A typical event with a Float32 point type requires about 25 bytes. If an interface writes data to 5,000 points, it can potentially send 125,000 bytes (25 * 5000) of data in one scan. As a result, the size of each memory buffer should be 62,500 bytes.

The default value of these memory buffers is 32,768 bytes.

94

Page 94: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Configuring PI API Buffer Server (BufServ) Manually

Send rate (milliseconds)Send rate is the time in milliseconds that PIBufss waits between sending up to the Maximum transfer objects (described below) to the PI Server. The default value is 100. The valid range is 0 to 2,000,000.

Maximum transfer objectsMaximum transfer objects is the maximum number of events that PIBufss sends between each Send rate pause. The default value is 500. The valid range is 1 to 2,000,000.

Event Queue File Size (Mbytes)This is the size of the event queue files. PIBufss stores the buffered data to these files. The default value is 32. The range is 8 to 131072 (8 to 128 Gbytes). Please see the section entitled, “Queue File Sizing” in the pibufss.chm file for details on how to appropriately size the event queue files.

Event Queue PathThis is the location of the event queue file. The default value is [PIHOME]\DAT.

For optimal performance and reliability, OSIsoft recommends that you place the PIBufss event queue files on a different drive/controller from the system drive and the drive with the Windows paging file. (By default, these two drives are the same.)

Foxboro I/A 51 and 70 Series Interface to the PI System 95

Page 95: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Buffering

BufservFor Bufserv, the paragraphs below describe the settings that may require user intervention. Please contact OSIsoft Technical Support for assistance in further optimizing these and all remaining settings.

Maximum buffer file size (KB)This is the maximum size of the buffer file ([PIHOME]\DAT\APIBUF.DAT). When Bufserv cannot communicate with the PI Server, it writes and appends data to this file. When the buffer file reaches this maximum size, Bufserv discards data.

The default value is 2,000,000 KB, which is about 2 GB. The range is from 1 to 2,000,000.

Primary and Secondary Memory Buffer Size (Bytes)This is a key parameter for buffering performance. The sum of these two memory buffer sizes must be large enough to accommodate the data that an interface collects during a single scan. A typical event with a Float32 point type requires about 25 bytes. If an interface writes data to 5,000 points, it can potentially send 125,000 bytes (25 * 5000) of data in one scan. As a result, the size of each memory buffer should be 62,500 bytes.

The default value of these memory buffers is 32,768 bytes.

Send rate (milliseconds)Send rate is the time in milliseconds that Bufserv waits between sending up to the Maximum transfer objects (described below) to the PI Server. The default value is 100. The valid range is 0 to 2,000,000.

96

Page 96: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Configuring PI API Buffer Server (BufServ) Manually

Maximum transfer objectsMax transfer objects is the maximum number of events that Bufserv sends between each Send rate pause. The default value is 500. The valid range is 1 to 2,000,000.

Buffered ServersThe Buffered Servers section allows you to define the PI Servers or PI Collective that the buffering application writes data.

PIBufssPIBufss buffers data only to a single PI Server or a PI Collective. Select the PI Server or the PI Collective from the Buffering to collective/server drop down list box.

The following screen shows that PIBufss is configured to write data to a standalone PI Server named starlight. Notice that the Replicate data to all collective member nodes check box is disabled because this PI Server is not part of a collective. (PIBufss automatically detects whether a PI Server is part of a collective.)

The following screen shows that PIBufss is configured to write data to a PI Collective named admiral. By default, PIBufss replicates data to all collective members. That is, it provides n-way buffering.

You can override this option by not checking the Replicate data to all collective member nodes check box. Then, uncheck (or check) the PI Server collective members as desired.

Foxboro I/A 51 and 70 Series Interface to the PI System 97

Page 97: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Buffering

BufservBufserv buffers data to a standalone PI Server, or to multiple standalone PI Servers. (If you want to buffer to multiple PI Servers that are part of a PI Collective, you should use PIBufss.)

If the PI Server to which you want Bufserv to buffer data is not in the Server list, enter its name in the Add a server box and click the Add Server button. This PI Server name must be identical to the API Hostname entry:

98

Page 98: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Configuring PI API Buffer Server (BufServ) Manually

The following screen shows that Bufserv is configured to write to a standalone PI Server named etamp390. You use this configuration when all the interfaces on the Interface Node write data to etamp390.

The following screen shows that Bufserv is configured to write to two standalone PI Servers, one named etamp390 and the other one named starlight. You use this configuration when some of the interfaces on the Interface Node write data to etamp390 and some write to starlight.

Foxboro I/A 51 and 70 Series Interface to the PI System 99

Page 99: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Buffering

Installing Buffering as a ServiceBoth the PIBufss and Bufserv applications run as a Service.

PI Buffer Subsystem ServiceUse the PI Buffer Subsystem Service page to configure PIBufss as a Service. This page also allows you to start and stop the PIBufss service.

PIBufss does not require the logon rights of the local administrator account. It is sufficient to use the LocalSystem account instead. Although the screen below shows asterisks for the LocalSystem password, this account does not have a password.

100

Page 100: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Configuring PI API Buffer Server (BufServ) Manually

API Buffer Server ServiceUse the API Buffer Server Service page to configure Bufserv as a Service. This page also allows you to start and stop the Bufserv Service

Bufserv version 1.6 and later does not require the logon rights of the local administrator account. It is sufficient to use the LocalSystem account instead. Although the screen below shows asterisks for the LocalSystem password, this account does not have a password.

Foxboro I/A 51 and 70 Series Interface to the PI System 101

Page 101: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Buffering

Configuring PI API Buffer Server (BufServ) Manually

The following settings are valid for both Windows and UNIX platforms. However, when running on Windows platforms, OSIsoft highly recommends using the ICU to edit the settings. On UNIX platforms, the ICU is not available and so BufServ must be configured manually.

PI API Buffering is enabled through the use of a configuration file $PIHOME/dat/piclient.ini. Unless this file is modified to explicitly enable buffering, the PI API will not buffer data. Instead, it sends data directly to the PI Server.

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 data to the PI Server.

Configuration of buffering is achieved through entries in the piclient.ini file. The file is found in the dat subdirectory of the PIHOME directory under Windows. 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.

Note: When buffering for multiple PI servers on a Solaris platform, the kernel resource parameters may need to be increased. See section “Kernel Resource Configuration on Solaris” below for more information.

Buffering SettingsThe following settings are available for PI API Buffering configuration:

Keywords Values Default Description

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 PI Server (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)

102

Page 102: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Configuring PI API Buffer Server (BufServ) Manually

Keywords Values Default Description

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 Default Description

PIHOMENODE string none On Unix machines, this keyword specifies the default PI Server.

On Windows the default PI Server is in pilogin.ini

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 that use a 1 hour DST change.

Configuring for PerformanceBy default, the bufserv settings will limit the throughput of bufserv to a theoretical maximum of only 5000 events/sec (possibly only 2000 events/sec in practice). If the event rate is higher than bufserv can send the event to PI then the bufserv will use the buffer files and these will grow until the maximum file size is reached, and events may be lost. If bufserv has to use the buffer files during normal operations (i.e. when the PI server is connected) then the bufserv parameters should be changed.

To allow bufserv to send data at a higher rate, the following settings are recommended for systems that may generate more than 2000 events/second.BUF1SIZE=524288BUF2SIZE=524288SENDRATE=50MAXTRANSFEROBJS=5000

With the above settings, bufserv should be able to transfer at approximately 10,000 events/second continuously when connected to the PI server and still be able to handle spikes in the event rate.

BufServ and n-way bufferingTo enable buffering for a PI server, each PI server must be listed in the [BUFFEREDSERVERLIST] section of the piclient.ini file. Each PI server in the list has a unique keyword, BUFSERVx where x is a number counting from 1 upwards.

Note: Because of possible problems with case-sensitivity, it is recommended that PI server names are always in uppercase.

For example

Foxboro I/A 51 and 70 Series Interface to the PI System 103

Page 103: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Buffering

[BUFFEREDSERVERLIST]BUFSERV1=PI_PLANTBUFSERV2=PI_CORPHQ

The above would enable buffering for two separate (independent) PI servers.

When the PI servers are members of a collective, events sent to one PI server must also be sent to the other members of the collective, so as well be being listed in the [BUFFEREDSERVERLIST], the servers must also be [REPLICATEDSERVERLIST] section. Each PI server in the list has a unique keyword, REPSERVx where x is a number counting from 1 upwards.

For example[BUFFEREDSERVERLIST]BUFSERV1=PISERVER_PRIBUFSERV2=PISERVER_SEC

[REPLICATEDSERVERLIST]REPSERV1=PISERVER_PRIREPSERV2=PISERVER_SEC

Sample piclient.ini fileThe follow are typical samples of the piclient.ini files.

The first sample has buffering enabled for a single PI server named PISERVER. The buffer sizes for both buffer 1 and buffer 2 are set to 1MB each (1048576 bytes). The delay between blocks of events is 100 milliseconds and each block can be up to 5000 events.[PISERVER]PIHOMENODE=PISERVERDSTMISMATCH=3600

[TCP/IP]PORT=5450

[APIBUFFER]BUFFERING=1BUF1SIZE=524288BUF2SIZE=524288SENDRATE=50MAXTRANSFEROBJS=5000

[BUFFEREDSERVERLIST]BUFSERV1=PISERVER#BUFSERV2=srv2

[REPLICATEDSERVERLIST]#REPSERV1=srv1#REPSERV2=srv2

104

Page 104: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Configuring PI API Buffer Server (BufServ) Manually

The second sample has a similar configuration for the buffering, but the events are being sent to 2 PI servers that are members of a collective, so the events sent to one must be replaced to the other.[PISERVER]PIHOMENODE=PISERVERDSTMISMATCH=3600

[TCP/IP]PORT=5450

[APIBUFFER]BUFFERING=1BUF1SIZE=524288BUF2SIZE=524288SENDRATE=50MAXTRANSFEROBJS=5000

[BUFFEREDSERVERLIST]BUFSERV1=PISERVER_PRIBUFSERV2=PISERVER_SEC

[REPLICATEDSERVERLIST]REPSERV1=PISERVER_PRIREPSERV2=PISERVER_SEC

Kernel Resource Configuration on SolarisTo transfer the event data between the PI fxbais interface and the bufserv processes, the processes use shared memory and semaphores. For each buffered server there are 3 blocks of shared memory and 3 semaphores, which are allocated from the resources within the Solaris kernel.

To check the usage of the kernel resources in use, run the ipcs command. This will show message queues, shared memory and semaphores currently in use. It is recommended that the ipcs command is used before the PI API is started to check the number of shared memory segments and semaphores used Solaris and the I/A software.

For example, LTRBUG# ipcsIPC status from <running system> as of Tue Jul 7 16:54:41 2009T ID KEY MODE OWNER GROUPMessage Queues:q 0 0x00007777 -Rrw-rw-rw- root rootq 1 0x464d0004 --rw-rw-rw- root rootShared Memory:m 0 0x46580000 --rw-rw-rw- root rootm 1 0x4658000e --rw-rw-rw- root rootm 2 0x46580003 --rw-rw-rw- root rootm 3 0x46580001 --rw-rw-rw- root root

Foxboro I/A 51 and 70 Series Interface to the PI System 105

Page 105: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Buffering

m 4 0x46580002 --rw-rw-rw- root rootm 5 0x4658000c --r--r--r-- root rootm 6 0x4658000d --rw-rw-r-- root rootm 7 0x52574801 --rw-rw---- root informixm 8 0x46580004 --rw-r--r-- root rootSemaphores:s 0 0x46530002 --ra-ra-ra- root roots 1 0x46530003 --ra-ra-ra- root roots 2 0x46530001 --ra-ra-ra- root roots 3 0x52574801 --ra-ra---- root informixs 4 0x52574802 --ra-ra---- root informixs 5 0x564d0101 --ra-ra-ra- root root

This shows the system using 9 shared memory segments and 6 semaphores.

When using more than a single buffered PI server on Solaris 2.5.1 or Solaris 8, the kernel configuration of the shared memory and semaphores needs to be changed to allow more shared memory and semaphores to be allocated. Changing the kernel settings consists of editing the /etc/system file and the system rebooting the system.

One Solaris 10, the kernel changed the settings dynamically as required and so no configuration is necessary.

Because Foxboro use these resources themselves, the /etc/system file will already contain several shared memory and semaphore settings. For bufserv with multiple buffered servers, some of the settings need to be increased further. It is better to have the settings higher than necessary than too low, because running out of resources will cause fatal errors in the processes and they will be forced to abort. This can be seen with PI API processes missing when checked with apiverify, and error messages will be logged in $PIHOME/dat/pimesslogfile.

There are three parameters that need to be added or edited.

Two parameters need to be added to increase the total number of semaphores supported by the kernel. These parameters are semsys:seminfo_semmap and semsys:seminfo_semmni. The number of semaphores required by the PI API is 3 for each buffered PI server. Therefore, four PI servers would require 12 semaphores. But, Solaris and the Foxboro I/A software also use semaphores. Without the PI API, there are normally 6 semaphores in use. Therefore, Number Semaphores Required = (Default Semaphores (6) + PI Servers * 3) and round up to allow a safety margin

It is recommended that the number of semaphores be set to 20.

The other parameter that may require increasing controls the maximum number of shared memory segments a process can access and is shmsys:shminfo_shmseg. Iorates and the interfaces must be able to access all the shared memory for all the bufserv instances it will write to. Iorates must also access the iorates shared memory segment. If when the PI API processes are started and iorates fails to start with the error “iorates>cntgetshm> error, exit”, this is an indication that the shmseg limit has been reached. Number of Shared Memory Segments Accessed = “Number of Replicated PI Servers” * 3 + 1

To allow 4 replicated servers, that would require 4*3+1 = 13.

106

Page 106: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Configuring PI API Buffer Server (BufServ) Manually

It is recommended that number of shared memory segments accessed be set to 20.

Use the following procedure the modify the kernel settings

1. Change to the /etc directorycd /etc

2. Make a backup copy of the current /etc/system filecp system system.fox_std

3. Edit the system file

a. Find the current section that sets the following semsys and shmsys parameters. It will probably contain the entriesset semsys:seminfo_semmns=255set semsys:seminfo_semmsl=255set shmsys:shminfo_shmseg=10set shmsys:shminfo_shmmax=24000000

b. Edit the parameterset shmsys:shminfo_shmseg=10to set shmsys:shminfo_shmseg=20

c. Add the following parametersset semsys:seminfo_semmap=20set semsys:seminfo_semmni=20

d. After editing, the entries should look the following (modified entries are highlighted)set semsys:seminfo_semmns=255set semsys:seminfo_semmsl=255set shmsys:shminfo_shmseg=20set shmsys:shminfo_shmmax=24000000set semsys:seminfo_semmap=20set semsys:seminfo_semmni=20

4. Save the changes

5. Reboot the station to make the changes activecd \shutdown -y -g0 -i6

The following shows the results from the ipcs command on a Foxboro AW51 with 2 PI servers configured. The highlighted entries are the IPC resources used by the PI API and bufserv. The other entries are used by either standard Solaris applications or the Foxboro software.LTRBUG# ipcsIPC status from <running system> as of Tue Jul 7 16:54:41 2009T ID KEY MODE OWNER GROUPMessage Queues:q 0 0x00007777 -Rrw-rw-rw- root rootq 1 0x464d0004 --rw-rw-rw- root rootq 2 0x00001111 --rw-rw-rw- root otherq 3 0x00002222 --rw-rw-rw- root other

Foxboro I/A 51 and 70 Series Interface to the PI System 107

Page 107: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Buffering

q 4 0x00003333 --rw-rw-rw- root otherq 5 0x00004444 --rw-rw-rw- root otherShared Memory:m 0 0x46580000 --rw-rw-rw- root rootm 1 0x4658000e --rw-rw-rw- root rootm 2 0x46580003 --rw-rw-rw- root rootm 3 0x46580001 --rw-rw-rw- root rootm 4 0x46580002 --rw-rw-rw- root rootm 5 0x4658000c --r--r--r-- root rootm 6 0x4658000d --rw-rw-r-- root rootm 7 0x52574801 --rw-rw---- root informixm 8 0x46580004 --rw-r--r-- root rootm 609 0x0000093d --rw-rw-rw- root otherm 10 0x0000093e --rw-rw-rw- root otherm 11 0x00000839 --rw-rw-rw- root otherm 12 0x0000083a --rw-rw-rw- root otherm 13 0x0000074a --rw-rw-rw- root otherm 14 0x00000646 --rw-rw-rw- root otherm 15 0x00001ed3 --rw-rw-rw- root otherSemaphores:s 0 0x46530002 --ra-ra-ra- root roots 1 0x46530003 --ra-ra-ra- root roots 2 0x46530001 --ra-ra-ra- root roots 3 0x52574801 --ra-ra---- root informixs 4 0x52574802 --ra-ra---- root informixs 5 0x564d0101 --ra-ra-ra- root roots 393222 0x0000093d --ra-ra-ra- root others 7 0x00000839 --ra-ra-ra- root others 8 0x0000093e --ra-ra-ra- root others 9 0x0000074a --ra-ra-ra- root others 10 0x0000083a --ra-ra-ra- root others 11 0x00000646 --ra-ra-ra- root other

When the PI API processes have been stopped, the resources allocated can be cleared using the utilities mqcls, ioshmcls and bufutil -u.

108

Page 108: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Diagnostics ConfigurationThe Interface Point Configuration chapter provides information on building PI points for collecting data from the device. This chapter describes the configuration of points related to interface diagnostics.

The procedure for configuring interface diagnostics is not specific to this Interface. Thus, for simplicity, the instructions and screenshots that follow refer to an interface named ModbusE.

Some of the points that follow refer to a “performance summary interval”. This interval is 8 hours by default. You can change this parameter via the Scan performance summary box in the UniInt – Debug parameter category pane:

Scan Class Performance PointsA Scan Class Performance Point measures the amount of time (in seconds) that this Interface takes to complete a scan. The Interface writes this scan completion time to millisecond resolution. Scan completion times close to 0 indicate that the Interface is performing optimally. Conversely, long scan completion times indicate an increased risk of missed or skipped scans. To prevent missed or skipped scans, you should distribute the data collection points among several scan classes.

You configure one Scan Class Performance Point for each Scan Class in this Interface. From the ICU, select this Interface from the Interface drop-down list and click UniInt-Performance Points in the parameter category pane:

Foxboro I/A 51 and 70 Series Interface to the PI System 109

Page 109: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Right click the row for a particular Scan Class # to bring up the context menu:

You need not restart the Interface for it to write values to the Scan Class Performance Points.

To see the current values (snapshots) of the Scan Class Performance Points, right click and select Refresh Snapshots.

Create / Create ALLTo create a Performance Point, right-click the line belonging to the tag to be created, and select Create. Click Create All to create all the Scan Class Performance Points.

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

Foxboro I/A 51 and 70 Series Interface to the PI System 110

Page 110: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Status Point

Correct / Correct AllIf 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: To correct all points click the Correct All menu item.

The Performance Points are created with the following PI attribute values:

Attribute Details

Tag Tag name that appears in the list box

Point Source Point Source for tags for this interface, as specified on the first tab

Compressing Off

Excmax 0

Descriptor Interface name + “ Scan Class # Performance Point”

RenameRight-click the line belonging to the tag and select “Rename” to rename the Performance Point.

Column descriptions

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

TagnameThe Tagname column holds the Performance Point tag name.

PSThis is the point source used for these performance points and the interface.

Location1This is the value used by the interface for the -id=# point attribute.

Foxboro I/A 51 and 70 Series Interface to the PI System 111

Page 111: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Diagnostics Configuration

ExdescThis is the used to tell the interface that these are performance points and the value is used to corresponds to the -id=# command line parameter if multiple copies of the same interface are running on the Interface node.

SnapshotThe 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. You may have to scroll to the right to see the snapshots.

Configuring Scan Class Performance Points on UNIXPerformance point configuration is the same on all operating system platforms. Performance points are configured as follows.

1. Set the extended descriptor to:PERFORMANCE_POINTor to:PERFORMANCE_POINT=interface_idwhere interface_id corresponds to the identifier that is specified with the -id parameter 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 parameter for a description of scan classes.

3. Set the PointSource attribute to correspond to the -ps parameter on the startup command-line of the interface.

4. Set the PointType attribute to float32.

Performance Counters Points on WindowsWhen running as a Service, this Interface exposes performance data via Windows Performance Counters. Such data include:

the amount of time that the Interface has been running;

the number of points the Interface has added to its point list; and

the rate at which the Interface is collecting data.

OSIsoft’s PI Performance Monitor Interface is capable of reading these performance values and writing them to PI points. Please see the Performance Monitor Interface to the PI System for more information.

If there is no PI Performance Monitor Interface installed as a Service on the same computer running this Interface, you cannot use the ICU to create this Interface’s Performance Counters Points:

112

Page 112: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Status Point

After installing the PI Performance Monitor Interface as a service, select this Interface from the Interface drop-down list, click Performance Counters in the parameter categories pane, and right click on a row containing a Performance Counters Point to bring up the context menu:

Foxboro I/A 51 and 70 Series Interface to the PI System 113

Page 113: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Diagnostics Configuration

Click Create to create the Performance Counters Point for that particular row. Click Create All to create all the Performance Counters Points.

To see the current values (snapshots) of the Performance Counters Points, right click and select Refresh Snapshots.

The PI Performance Monitor Interface – and not this Interface – is responsible for updating the values for the Performance Counters Points. So, make sure that the PI Performance Monitor Interface is running correctly.

Up_timeThe up_time Performance Counters Point indicates the amount of time (in seconds) that this Interface has been running.

Io_ratesThe io_rates Performance Counters Point indicates the rate (in event per second) at which this Interface writes data to its input tags.

Log_file_msg_countThe log_file_msg_count Performance Counters Point indicates the number of messages that the Interface has written to pipc.log.

pts_edited_in_interfaceThe pts_edited_in_interface Performance Counters Point indicates the number of point edits the Interface has detected. The Interface detects edits only for those points whose PointSource attribute matches its Point Source parameter and whose Location1 attribute matches its Interface ID parameter.

Pts_added_to_interfaceThe pts_added_to_interface Performance Counters Point indicates the number of point added the Interface has added to its point list.

Pts_removed_from_interfaceThe pts_removed_from_interface Performance Counters Point indicates the number of point added the Interface has removed from its point list.

Point_countA point_count Performance Counters Point is available for each Scan Class of this Interface. The ICU uses a naming convention such that the tag containing “(Scan Class 1)” (for example, sy.perf.etamp390.E1(Scan Class 1).point_count refers to Scan Class 1, “(Scan Class 2)” refers to Scan Class 2, and so on. The tag containing “_Total” refers to the sum of all Scan Classes.

This point indicates the number of tags per Scan Classes.

Scan_timeA scan_time Performance Counters Point is available for each Scan Class of this Interface. The ICU uses a naming convention such that the tag containing “(Scan Class

114

Page 114: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Status Point

1)” (for example, sy.perf.etamp390.E1(Scan Class 1).scan_time refers to Scan Class 1, “(Scan Class 2)” refers to Scan Class 2, and so on.

The scan_time Performance Counters Point indicates the number of milliseconds the Interface takes to read data from the device and fill in the values for the tags. This point is similar to the [UI_SCINCANTIME] Health Point.

Sched_scans_%missedA sched_scans_%missed Performance Counters Point is available for each Scan Class of this Interface. The ICU uses a naming convention such that the tag containing “(Scan Class 1)” (for example, sy.perf.etamp390.E1(Scan Class 1).sched_scans_%missed refers to Scan Class 1, “(Scan Class 2)” refers to Scan Class 2, and so on. The tag containing “_Total” refers to the sum of all Scan Classes.

The sched_scans_%missed Performance Counters Point indicates the percentage of scans the Interface missed since startup. A missed scan occurs if the Interface performs the scan one second later than scheduled.

Sched_scans_%skippedA sched_scans_%skipped Performance Counters Point is available for each Scan Class of this Interface. The ICU uses a naming convention such that the tag containing “(Scan Class 1)” (for example, sy.perf.etamp390.E1(Scan Class 1).sched_scans_%skipped refers to Scan Class 1, “(Scan Class 2)” refers to Scan Class 2, and so on. The tag containing “_Total” refers to the sum of all Scan Classes.

The sched_scans_%skipped Performance Counters Point indicates the percentage of scans the Interface skipped since startup. A skipped scan is a scan that occurs at least one scan period after its scheduled time.

Sched_scans_this_intervalA sched_scans_this_interval Performance Counters Point is available for each Scan Class of this Interface. The ICU uses a naming convention such that the tag containing “(Scan Class 1)” (for example, sy.perf.etamp390.E1(Scan Class 1).sched_scans_this_interval refers to Scan Class 1, “(Scan Class 2)” refers to Scan Class 2, and so on. The tag containing “_Total” refers to the sum of all Scan Classes.

The sched_scans_this_interval Performance Counters Point indicates the number of scans that the Interface performed per performance summary interval.

Interface Health Monitoring Points

Configuring Interface Health Points with the ICUInterface Health Monitoring Points provide information about the health of this Interface. To use the ICU to configure these points, select this Interface from the Interface drop-down list and click Health Points from the parameter category pane:

Foxboro I/A 51 and 70 Series Interface to the PI System 115

Page 115: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Diagnostics Configuration

Right click the row for a particular Health Point to display the context menu:

Click Create to create the Health Point for that particular row. Click Create All to create all the Health Points.

You need to restart the Interface for it to write values to the [UI_IF_INFO] Health Point only. Other Health Points do not require an interface restart.

To see the current values (snapshots) of the Health Points, right click and select Refresh Snapshots.

For some of the Health Points described subsequently, the Interface updates their values at each performance summary interval (typically, 8 hours).

116

Page 116: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Status Point

Configuring Interface Health Points ManuallyThe interface health points can also be configured manually, using the Tag Configurator in Excel, the SMT point builder or any other tool that enables you to build points on the PI server.

Interface Health Points are similar to normal data points for the interface. The main difference is that the points get the values internally from the interface itself, rather than reading the values from the I/A system. Instead of using the InstrumentTag or the ExDesc attributes to define the I/A object to read, the ExDesc attribute contains a keyword that is used by the interface so that it knows what value the point should be sent. The section below describes the Interface Health Point keywords.

PointSource = -ps argument

Location1 = Interface Id (note: it is NOT the interface ID * 100 that is used for data points)

Note: If interface failover is used, each instance of the interface should have a set of interface health points. To enable to interface to only update its set of points, the UniInt health tag argument (-uht_id=x) should be set and Location3 of the health points set to match the uht_id value.

Interface Health Point Keywords

[UI_HEARTBEAT]The [UI_HEARTBEAT] Health Point indicates whether the Interface is currently running. The value of this point is an integer that increments continuously from 1 to 15. After reaching 15, the value resets to 1.

The fastest scan class frequency determines the frequency at which the Interface updates this point:

Fastest Scan Frequency Update frequency

Less than 1 second 1 second

Between 1 and 60 seconds, inclusive

Scan frequency

More than 60 seconds 60 seconds

If the value of the [UI_HEARTBEAT] Health Point is not changing, then this Interface is in an unresponsive state.

[UI_DEVSTAT]The [UI_DEVSTAT] Health Point provides an indication of the current status of the interface. The possible values for this string point are:

• “1 | Starting” – The Interface remains in this state until it has loaded the PI points and either starts scanning, or if running in failover, it initializes the failover state.

• “2 | Connected/No Data” - the interface is part of a failover pair and currently initializing or changing failover state.

Foxboro I/A 51 and 70 Series Interface to the PI System 117

Page 117: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Diagnostics Configuration

• “Good” – The interface is able to collect data. A value of “Good” does not mean that all tags are receiving good values, but it is a good indication that there are no hardware or network problems. When using failover, a “Good” status can indicate that the interface is active or on standby. The failover status PI points will show the status of the individual instances of the interface.

• “4 | Intf Shutdown” – The Interface has shut down.

[UI_SCINFO]The [UI_SCINFO] Health Point provides scan class information. The value of this point is a string that indicates

the number of scan classes;

the update frequency of the [UI_HEARTBEAT] Health Point; and

the scan class frequencies

An example value for the [UI_SCINFO] Health Point is:3 | 5 | 5 | 60 | 120

The Interface updates the value of this point at startup and at each performance summary interval.

[UI_IORATE]The [UI_IORATE] Health Point indicates the sum of

1. the number of scan-based input values the Interface collects before it performs exception reporting; and

2. the number of event-based input values the Interface collects before it performs exception reporting; and

3. the number of values that the Interface writes to output tags that have a SourceTag.

The Interface updates this point at the same frequency as the [UI_HEARTBEAT] point’s. The value of this [UI_IORATE] Health Point may be zero. A stale timestamp for this point indicates that this Interface has stopped collecting data.

[UI_MSGCOUNT]The [UI_MSGCOUNT] Health Point tracks the number of messages that the Interface has written to the pipc.log file since start-up. In general, a large number for this point indicates that the Interface is encountering problems. You should investigate the cause of these problems by looking in pipc.log.

The Interface updates the value of this point every 60 seconds. While the Interface is running, the value of this point never decreases.

[UI_OUTPUTRATE]After performing an output to the device, this Interface writes the output value to the output tag if the tag has a SourceTag. The [UI_OUTPUTRATE] Health Point tracks the number of these values. If there are no output tags for this Interface, it writes the System Digital State No Result to this Health Point.

118

Page 118: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Status Point

The Interface updates this point at the same frequency as the [UI_HEARTBEAT] point’s. The Interface resets the value of this point to zero at each performance summary interval.

[UI_OUTPUTBVRATE]The [UI_OUTPUTBVRATE] Health Point tracks the number of System Digital State values that the Interface writes to output tags that have a SourceTag. If there are no output tags for this Interface, it writes the System Digital State No Result to this Health Point.

The Interface updates this point at the same frequency as the [UI_HEARTBEAT] point’s. The Interface resets the value of this point to zero at each performance summary interval.

[UI_TRIGGERRATE]The [UI_TRIGGERRATE] Health Point tracks the number of values that the Interface writes to event-based input tags. If there are no event-based input tags for this Interface, it writes the System Digital State No Result to this Health Point.

The Interface updates this point at the same frequency as the [UI_HEARTBEAT] point’s. The Interface resets the value of this point to zero at each performance summary interval.

[UI_TRIGGERBVRATE]The [UI_TRIGGERRATE] Health Point tracks the number of System Digital State values that the Interface writes to event-based input tags. If there are no event-based input tags for this Interface, it writes the System Digital State No Result to this Health Point.

The Interface updates this point at the same frequency as the [UI_HEARTBEAT] point’s. The Interface resets the value of this point to zero at each performance summary interval.

[UI_SCPOINTCOUNT]You can create a [UI_SCPOINTCOUNT] Health Point for each Scan Class in this Interface. The ICU uses a tag naming convention such that the suffix “.sc1” (for example, sy.st.etamp390.E1.Scan Class Point Count.sc1) refers to Scan Class 1, “.sc2” refers to Scan Class 2, and so on.

This Health Point monitors the number of tags in a Scan Class.

The Interface updates a [UI_SCPOINTCOUNT] Health Point when it performs the associated scan.

Although the ICU allows you to create the point with the suffix “.sc0”, this point is not applicable to this Interface.

[UI_SCIORATE]You can create a [UI_SCIORATE] Health Point for each Scan Class in this Interface. The ICU uses a tag naming convention such that the suffix “.sc1” (for example, sy.st.etamp390.E1.Scan Class IO Rate.sc1) refers to Scan Class 1, “.sc2” refers to Scan Class 2, and so on.

Foxboro I/A 51 and 70 Series Interface to the PI System 119

Page 119: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Diagnostics Configuration

A particular Scan Class’s [UI_SCIORATE] point indicates the number of values that the Interface has collected. If the current value of this point is between zero and the corresponding [UI_SCPOINTCOUNT] point, inclusive, then the Interface executed the scan successfully. If a [UI_SCIORATE] point stops updating, then this condition indicates that an error has occurred and the tags for the scan class are no longer receiving new data.

The Interface updates the value of a [UI_SCIORATE] point after the completion of the associated scan.

Although the ICU allows you to create the point with the suffix “.sc0”, this point is not applicable to this Interface.

[UI_SCBVRATE]You can create a [UI_SCBVRATE] Health Point for each Scan Class in this Interface. The ICU uses a tag naming convention such that the suffix “.sc1” (for example, sy.st.etamp390.E1.Scan Class Bad Value Rate.sc1) refers to Scan Class 1, “.sc2” refers to Scan Class 2, and so on.

A particular Scan Class’s [UI_SCBVRATE] point indicates the number System Digital State values that the Interface has collected.

The Interface updates the value of a [UI_SCBVRATE] point after the completion of the associated scan.

Although the ICU allows you to create the point with the suffix “.sc0”, this point is not applicable to this Interface.

[UI_SCSKIPPED]You can create a [UI_SCSKIPPED] Health Point for each Scan Class in this Interface. The ICU uses a tag naming convention such that the suffix “.sc1” (for example, sy.st.etamp390.E1.Scan Class Scans Skipped.sc1) refers to Scan Class 1, “.sc2” refers to Scan Class 2, and so on.

A particular Scan Class’s [UI_SCSKIPPED] point tracks the number of scans that the Interface was not able to perform before the scan time elapsed and before the Interface performed the next scheduled scan.The Interface updates the value of this point each time it skips a scan. The value represents the total number of skipped scans since the previous performance summary interval. The Interface resets the value of this point to zero at each performance summary interval.

Although there is no “Scan Class 0”, the ICU allows you to create the point with the suffix “.sc0”. This point monitors the total skipped scans for all of the Interface’s Scan Classes.

[UI_SCSCANCOUNT]You can create a [UI_SCSCANCOUNT] Health Point for each Scan Class in this Interface. The ICU uses a tag naming convention such that the suffix “.sc1” (for example, sy.st.etamp390.E1.Scan Class Scan Count.sc1) refers to Scan Class 1, “.sc2” refers to Scan Class 2, and so on.

120

Page 120: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Status Point

A particular Scan Class’s [UI_ SCSCANCOUNT] point tracks the number of scans that the Interface has performed.The Interface updates the value of this point at the completion of the associated scan. The Interface resets the value to zero at each performance summary interval.

Although there is no “Scan Class 0”, the ICU allows you to create the point with the suffix “.sc0”. This point indicates the total number of scans the Interface has performed for all of its Scan Classes.

[UI_SCINSCANTIME]You can create a [UI_SCINSCANTIME] Health Point for each Scan Class in this Interface. The ICU uses a tag naming convention such that the suffix “.sc1” (for example, sy.st.etamp390.E1.Scan Class Scan Time.sc1) refers to Scan Class 1, “.sc2” refers to Scan Class 2, and so on.

A particular Scan Class’s [UI_ SCINSCANTIME] point represents the amount of time (in milliseconds) the Interface takes to read data from the device, fill in the values for the tags, and send the values to the PI Server.The Interface updates the value of this point at the completion of the associated scan.

[UI_SCINDEVSCANTIME]You can create a [UI_SCINDEVSCANTIME] Health Point for each Scan Class in this Interface. The ICU uses a tag naming convention such that the suffix “.sc1” (for example, sy.st.etamp390.E1.Scan Class Device Scan Time.sc1) refers to Scan Class 1, “.sc2” refers to Scan Class 2, and so on.

A particular Scan Class’s [UI_ SCINDEVSCANTIME] point represents the amount of time (in milliseconds) the Interface takes to read data from the device and fill in the values for the tags.

The value of a [UI_ SCINDEVSCANTIME] point is a fraction of the corresponding [UI_SCINSCANTIME] point value. You can use these numbers to determine the percentage of time the Interface spends communicating with the device compared with the percentage of time communicating with the PI Server.

If the [UI_SCSKIPPED] value is increasing, the [UI_SCINSCANTIME] points along with the [UI_SCINSCANTIME] points can help identify where the delay is occurring: whether the reason is communication with the device, communication with the PI Server, or elsewhere.

The Interface updates the value of this point at the completion of the associated scan.

Foxboro I/A 51 and 70 Series Interface to the PI System 121

Page 121: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Diagnostics Configuration

I/O Rate PointAn I/O Rate point measures the rate at which the Interface writes data to its input tags. The value of an I/O Rate point represents a 10-minute average of the total number of values per minute that the Interface sends to the PI Server.

When the Interface starts, it writes 0 to the I/O Rate point. After running for ten minutes, the Interface writes the I/O Rate value. The Interface continues to write a value every 10 minutes. When the Interface stops, it writes 0.

The ICU allows you to create one I/O Rate point for each copy of this Interface. Select this Interface from the Interface drop-down list, click IO Rate in the parameter category pane, and check Enable IORates for this Interface.

As the preceding picture shows, the ICU suggests an Event Counter number and a Tagname for the I/O Rate Point. Click the Save button to save the settings and create the I/O Rate point. Click the Apply button to apply the changes to this copy of the Interface.

You need to restart the Interface in order for it to write a value to the newly created I/O Rate point. Restart the Interface by clicking the Restart button:

(The reason you need to restart the Interface is that the PointSource attribute of an I/O Rate point is Lab.)

To confirm that the Interface recognizes the I/O Rate Point, look in the pipc.log for a message such as:PI-ModBus 1> IORATE: tag sy.io.etamp390.ModbusE1 configured.

To see the I/O Rate point’s current value (snapshot), click the Refresh snapshot button:

122

Page 122: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Status Point

Enable IORates for this InterfaceThe Enable IORates for this interface check box enables or disables I/O Rates for the current interface. To disable I/O Rates for the selected interface, uncheck this box. To enable I/O Rates for the selected interface, check this box.

Event CounterThe 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.

TagnameThe tag name listed under the Tagname column is the name of the I/O Rate tag.

Tag StatusThe Tag Status column indicates whether the I/O Rate 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 PI ICU is not able to access the PI Server

In FileThe In File column indicates whether the I/O Rate 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

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

Foxboro I/A 51 and 70 Series Interface to the PI System 123

Page 123: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Diagnostics Configuration

Right Mouse Button Menu Options

CreateCreate the suggested I/O Rate tag with the tag name indicated in the Tagname column.

DeleteDelete the I/O Rate tag listed in the Tagname column.

RenameAllow the user to specify a new name for the I/O Rate tag listed in the Tagname column.

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

SearchAllow the user to search the PI Server for a previously defined I/O Rate tag.

Configuring I/O Rate Tags On UNIXThere are two configuration steps.

1. Configuring the PI Point on the PI Server

2. Configuration on the Interface Node

Configuring PI Point on the PI ServerCreate 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 NodeFor the following examples, assume that the name of the PI tag is fxbais001, and that the name of the I/O Rate on the home node is fxbais001.

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.

124

Page 124: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Status Point

Add a line in the iorates.dat file of the form:

SY.FXBAIS.IORATE, x

where fxbais001is the name of the I/O Rate Tag and x corresponds to the first instance of the -ec=x parameter 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 parameter 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/pistopsh $PIHOME/bin/pistart

Determine that the shared memory server and the I/O Rates Monitor are running with the apiverify script.

Interface Status PointThe PI Interface Status Utility (ISU) alerts you when an interface is not currently writing data to the PI Server. This situation commonly occurs if

the monitored interface is running on an Interface Node, but the Interface Node cannot communicate with the PI Server; or

the monitored interface is not running, but it failed to write at shutdown a System state such as Intf Shut.

The ISU works by periodically looking at the timestamp of a Watchdog Tag. The Watchdog Tag is a tag whose value a monitored interface (such as this Interface) frequently updates. The Watchdog Tag has its excdev, excmin, and excmax point attributes set to 0. So, a non-changing timestamp for the Watchdog Tag indicates that the monitored interface is not writing data.

Please see the Interface Status Interface to the PI System for complete information on using the ISU. PI Interface Status runs only on a PI Server Node.

If you have used the ICU to configure the PI Interface Status Utility on the PI Server Node, the ICU allows you to create the appropriate ISU point. Select this Interface from the Interface drop-down list and click Interface Status in the parameter category pane. Right click on the ISU tag definition window to bring up the context menu:

Foxboro I/A 51 and 70 Series Interface to the PI System 125

Page 125: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Interface Diagnostics Configuration

Click Create to create the ISU tag.

Use the Tag Search button to select a Watchdog Tag. (Recall that the Watchdog Tag is one of the points for which this Interface collects data.)

Select a Scan frequency from the drop-down list box. This Scan frequency is the interval at which the ISU monitors the Watchdog Tag. For optimal performance, choose a Scan frequency that is less frequent than the majority of the scan rates for this Interface’s points. For example, if this Interface scans most of its points every 30 seconds, choose a Scan frequency of 60 seconds. If this Interface scans most of its points every second, choose a Scan frequency of 10 seconds.

If the Tag Status indicates that the ISU tag is Incorrect, right click to enable the context menu and select Correct.

The PI Interface Status Utility – and not this Interface – is responsible for updating the ISU tag. So, make sure that the PI Interface Status Utility is running correctly.

126

Page 126: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix A:Error and Informational Messages

A string FXBIA ID> 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 parameter on the startup command-line.

Message LogsThe location of the message log depends upon the platform on which the interface is running. See the UniInt Interface User Manual for more information.

On Windows, check the pipc.log file for messages. This file is located in the dat subdirectory where the PI API is installed. For example,C:\Program Files\PIPC\dat\pipc.log

On Solaris, check the pimesslogfile for messages. This file is located in a dat subdirectory where the PI API is installed. For example,/opt/piapi/dat/pimesslogfile

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 -fdb is used on the command-line, then various informational messages are written to the log file.

On Solaris, the interface will also send messages to stdout. By default, stdout is redirected by the fxbais.sh script to $PIHOME/dat/fxbais.out. This file may contain messages that were not logged in the pimesslogfile.

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

Error Descriptions on Windows and UNIX On Windows and UNIX, descriptions of system and PI errors can be obtained with the pidiag utility:

Windows: \PI\adm\pidiag –e error_numberUNIX: /PI/adm/pidiag –e error_number

Foxboro I/A 51 and 70 Series Interface to the PI System 127

Page 127: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Descriptions of operating system and PI System errors are obtained with the pidiag program found on the computer running PI Server. This program is located in the adm subdirectory of the directory where PI Server is installed. Use -e command line parameter followed by the error number.

For example,C:\PI\adm> pidiag -e 100[100] Cannot create another system semaphore.

C:\PI\adm> pidiag -e -10401[-10401] No Write Access - Secure Object

Extra Debugging Messages

Interface-level

The Interface can be configured to print out debugging messages by specifying various values in the -fdb command line parameter. Alternatively, the DebugFlags section of the fxbais.ini file may used to specify these values. The available debugging values are:

11 - Additional messages when opening lists of tags

12 - Setup of tags used with the libprofplot.so library

13 - Reading of data using libprofplot.so function calls

15 - Time offset between the PI Server and the Interface

16 - Verbose messages during point loading

17 - Verbose messages during Interface shutdown

18 - Extra attempts to locate and close data sets. Unlike other debugging values, this one affects the behavior of the Interface. If -fdb=18 is specified, the Interface will close all data sets, even those that it did not open.

19 - Messages for buffered outputs

20 - Messages for unbuffered outputs

21 - Messages for outputs in general

24 - Detailed error status after an scopen() call

25 - Log messages when interface enters and leaves dev_hibernate()

26 - Log messages when interface enters and leaves dev_service_input_list()

27 - Detailed information on each FoxAPI call made by the interface

28 - Log “Out of service” and “Return to Service” status messages

Foxboro I/A 51 and 70 Series Interface to the PI System 128

Page 128: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Operational Hints

For example, to tell PI Foxboro to print verbose messages during point loading (debug value 16) and during Interface shutdown (debug value 17), add the following command line parameter to the startup command file (fxbais.sh or fxbais.bat):

fxbais -ps=F -id=1 -fdb=16,17 …Alternatively, edit the fxbais.ini file so that it contains:

[fxbais-1]DebugFlags=16,17PI Foxboro reads the contents of fxbais.ini on startup. On Solaris, the Interface may be configured to re-read this file by first determining the Interface’s process identification number (PID) and then issuing the commandLBUG01# kill -HUP xxxwhere xxx is numeric PID.

Point-levelThe Interface may be configured to print out debugging messages for individual points. To do so, add 4096 to the value of the point’s UserInt1 tag attribute field.

The advantage of point level debugging is that the user does not have to

stop the Interface

add -fdb parameters to the interface startup file

re-start the InterfaceBecause the Interface automatically incorporates PI tag attribute changes, point level debugging can be disabled by setting the point’s UserInt1 attribute field to a value less than 4096.

The following are examples of point level debug messages:

14-Jul-09 13:47:52FXBAIS 1> [mreaidx] Pitag (PITEST01_01:LC001_CTRL.MEAS) idx=92 status=0x223 val=40.925900 istat=0 changeCount=921

14-Jul-09 13:47:52FXBAIS 1> ia_to_pi(): Pitag (PITEST01_01:LC001_CTRL.MEAS) drval= 40.9259 ival=0 istat=0 count=1

14-Jul-09 13:47:52FXBAIS 1> dsil() - Pitag (PITEST01_01:LC001_CTRL.MEAS) t=1247536082.00 istat=0 drval=40.9259 ival=0 sent to UniInt

This message indicates that for the PI point PITEST01_01:LC001_CTRL.MEAS, the call to the FoxAPI function mreaidx() used the FoxAPI index of 92 to get the current value of the object and resulted in a value of 40.925900 and an I/A object status of 0x223 (secured, connected, float). This was converted to a drval=40.9259 and istat=0 for writing to PI. Finally, the timestamp of 1247536082 UTC seconds was used when the event was sent to PI.

14-Jul-09 13:56:11FXBAIS 1> [uread] error=0, status 0x23, val=94.824608; Pitag (PITEST01_02:STATBITS001.RI01) istat=0

Foxboro I/A 51 and 70 Series Interface to the PI System 129

Page 129: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix A:Error and Informational Messages

14-Jul-09 13:56:11FXBAIS 1> dsil() - Pitag (PITEST01_02:STATBITS001.RI01) t=1247536580.00 istat=0 drval=94.8246 ival=0 sent to UniInt

This message indicates that for the PI tag PITEST01_02:STATBITS001.RI01, the call to the FoxAPI function uread() resulted in a value of 94.824608 and an I/A object status of 0x23 (connected, float). The timestamp of 1247536580 UTC seconds was used when the event was sent to PI.

The pidiag -t utility can be used to convert the UTC seconds timestamp into a human readable format. The pidiag utility is installed in the PIHOME/adm directory in Windows, but it is not available on Solaris. The following is an example of the pidiag -t command,pidiag -t 1247536580 U14-Jul-09 13:56:20 NZST - Local: 1247579780 UTC: 1247536580

Note: The trailing U on the pidiag -t command specifies that the timestamp passed is a UTC time and not a local time. Timestamps logged in the interface debug messages will always be in UTC seconds.

List Event Counters and Location5If the event count appears too high or low, the user can determine the source of excess values. There are event counters for the Interface and for the individual buffered lists.

The Interface may be configured to count all inputs (-ec), unbuffered inputs (-ecuinp), buffered outputs (-ecout), and unbuffered outputs (-ecuout). Use of these counters will provide an overview of events generated by each category.

If there are buffered input or output points (i.e., Location2 greater than zero), list event counters may be used. These counters are configured by specifying a non-zero Location5 field and a positive Location2 for a point. Such a point will then contain the number of I/A object change counts. Location2 corresponds to the PI list number. Location5 indicates the frequency in seconds with which the Interface updates this point. (For example, Location5 may be 120 to indicate 2 minutes.) Location4 indicates a scanclass number whose frequency is less than the Location5 value.

Common ProblemsThe following describes some of the common problems that may be encountered during the operation of the PI Foxboro Interface.

Relocation Error in libfoxapi.soA message similar told.so.1: ./fxbais: fatal: relocation error: file /usr/lib/libfoxapi.so: symbol

fh_RTPINdex: referenced symbol not found

indicates that the file /usr/lib/libfoxapi.so is incompatible with the PI Foxboro Interface. The most likely reason is that /usr/lib/libfoxapi.so is FoxAPI version 5.x. On Solaris, FoxAPI v5.x is not compatible with PI Foxboro.

In order to work around this problem, the users must use PI Foxboro with a copy of FoxAPI v4.2.x that is currently on the machine.

130

Page 130: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Operational Hints

First, find all copies of libfoxapi.so using the Solaris find command.

# find / -name libfoxapi.so -print

The results should look something like the following/usr/lib/libfoxapi.so/opt/foxapi42/libfoxapi.so

Then, configure Solaris to use the file /opt/foxapi42/libfoxapi.so when running fxbais. To do so, set the LD_LIBRARY_PATH environment variable to reference the directories where the FoxAPI (libfoxapi.so) and the PI API (libpiapi.so) files are found. For example,

# LD_LIBRARY_PATH=/opt/foxapi42:$PIHOME/lib# export LD_LIBRARY_PATH

Then, re-run the Interface# ./fxbais -ps=F -id=100 -host=XXXXXX:5450 -f=5 …

To make sure that /opt/foxapi42/libfoxapi.so is a valid FoxAPI file, run Foxboro’s foxtst program:

# LD_LIBRARY_PATH=/opt/foxapi42# export LD_LIBRARY_PATH# cd /opt/fox/ais/bin# ./foxtst

Then,

select 300 (for Objects),

select 40 (for uread),

enter a COMPOUND, BLOCK, and PARAMETER.

The FoxAPI should return a value.

Cannot Find libCrun.so.1A message similar told.so.1: ./fxbais: fatal: libCrun.so.1: open failed: No such file or directory

indicates that the file libCrun.so.1 is missing. This file is part of the C++ runtime library used by the Interface. To get this file via download, go to Sun Microsystems patch database athttp://sunsolve.sun.comand search for libCrun.so.1.

libpiapi.so Open FailedA message similar told.so.1: fxbais: fatal: libpiapi.so: open failed: No such file or

directoryindicates that the environment variable LD_LIBRARY_PATH is incorrectly set.

Foxboro I/A 51 and 70 Series Interface to the PI System 131

Page 131: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix A:Error and Informational Messages

The solution to this problem is to make sure that both the PIHOME and LD_LIBRARY_PATH environment variables are defined in the /etc/profile file. (Recall that the /etc/profile file sets up environment variables for all users.)

For example, edit the /.cshrc file such that it contains:LBUG01# setenv PIHOME /opt/piapiLBUG01# setenv LD_LIBRARY_PATH ${PIHOME}/libLog back in with a csh.

To confirm that the PIHOME and LD_LIBRARY_PATH variables contain the appropriate entries, use the echo command to display these environment variables:LBUG01# echo $PIHOMELBUG01# echo $LD_LIBRARY_PATH

Waiting for FoxAPI to StartIf the Interface is started and a message such as “Waiting for FoxAPI process “foxapi.exe” to start…..” under Windows or “Waiting for FoxAPI process “foxapi ompoll” to start…..” under Solaris, these warnings indicate that the FoxAPI software is not running.

After a reboot it may take several minutes for the FoxAPI processes to start. Under Windows, use the Task Manager to see if the process “foxapi.exe” is running. Under Solaris, use the ps -ef command to see whether “foxapi om_poll” is running.

If the FoxAPI process it not running and it is several minutes since the system was rebooted, then it may be necessary to start the FoxAPI processes manually. Under Windows, this can be done by going to the Control Panel, and double-clicking on “Foxboro API” and selecting “Start FoxAPI”. Also ensure that “Check if you want to start FOXAPI at reboot” is selected on.

Under Solaris, go to the /opt/fox/ais/bin directory and run the aisstart script.

Try running Foxboro’s foxtst program located in /opt/fox/ais/bin. If the same warnings persist, stop and restart the FoxAPI software via the aisstart command.

Interface Does Not Restart after RebootIf the Interface does not restart after the AW workstation reboots, check whether the FoxAPI itself has restarted. PI Foxboro cannot start unless the FoxAPI is running. Also verify that the PI API processes have started (pistart script was executed) and that the sitestart script has been updated to start the fxbais.sh script.

Interface Does Not Shut DownNormally, the Interface should be stopped with the script fxastop or stop the entire PI API and the Interface with the script $PIHOME/bin/pistop. If the fxbais program continues to run, terminate it by finding its process number and issuing a kill -9. For example,

LBUG01# ps -ef | grep fxbaisresulting in

132

Page 132: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Operational Hints

piadmin 24776 24774 0 17:13:06 pts/8 0:01 fxbais -ps=FThen,LBUG01# kill -9 24776where 24776 is the process number of the fxbais program.

Note that if the Interface is stopped via kill -9, the Interface does not properly unregister itself from the FoxAPI system. For proper operation, the user must subsequently stop and restart the FoxAPI before restarting the Interface.

If the interface node is rebooted, it is likely that the fxbais interface does not have time to exit cleanly. The shutdown process does not wait for the interface to close the FoxAPI lists. This does not cause any problems because everything is cleared because of the reboot. But, it does mean that the interface may not be able to send the “Intf Shut” system digitals to the PI points or update the interface status and health points.

Warnings “open_action: not found” and “clsset_action : not found”During normal operations, the fxbais interface calls the FoxAPI function scopen() and clsset() to open and close FoxAPI datasets. When these functions are called, internally the FoxAPI attempts to run the scripts open_action and clsset_action. If these scripts do not exist, warning messages are generated.

These messages are harmless, but it is better to correct the problem.

To eliminate these warnings, two scripts called open_action and clsset_action need to be created in the FoxAPI directory. These scripts do not need to do anything, but they need to be present to stop the warnings.

To create the files on Solaris,cd /opt/fox/ais/bintouch open_actionchmod +x open_actiontouch clsset_actionchmod +x clsset_action

To create the files on Windows, from a command promptD:cd \opt\fox\ais\bintouch open_action.battouch clsset_action.bat

Error 212 SeenThe pimesslogfile or pipc.log may show a message such as:

FXBIA- 1> Error 212 …This error 212 is returned by the FoxAPI and indicates a problem caused by a lack of permission/privileges. On Windows, make sure that the fxbais.exe service runs under the Fox user account.

Foxboro I/A 51 and 70 Series Interface to the PI System 133

Page 133: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix A:Error and Informational Messages

On Solaris, this error should occur only if netFoxAPI is used. To fix this problem, make sure the netFoxAPI client machine has permissions to access the netFoxAPI server. See the FoxAPI Installation Guide for more information.

Interface locks up when opening output listsIf the interface attempts to open a list with write access and one of the points within the list is an output parameter then the interface will lock up. The only way to stop the process is with a kill -9. This is a limitation of the FoxAPI. The interface will attempt to check the “secured” status of the write objects when the PI points are loaded, but this will only trap input parameters that are currently secured and will not detect problems with output parameters.

Therefore, care must be taken when configuring buffered output points (from PI) that they will only write to input (unsecured) I/A parameters.

The Interface can only write to an INPUT parameter of a block. For example, the Interface cannot change the value of an .OUT parameter of a PID block since that parameter is the output of these blocks. One can determine whether a parameter is an OUTPUT by examining the documentation for the block.

When writing to variable blocks (BOOL, LONG, PACK, REAL, STRING), the VALUE parameter is an output parameter and cannot be used with buffered outputs. Only unbuffered outputs (Location2=0) points can be used to write to these objects.

But, unbuffered outputs should also be used with care. Although they will not cause the interface to lockup when opening lists, they can cause long delays within the interface if the I/A object is not currently available (miss-configured or a CP is rebooting).

Operational HintsThe following information may be useful during the operation of the PI Foxboro Interface.

Solaris/UnixThe Solaris operating system is case sensitive. Thus, a file namedfxbais.tar.zis not the same asfxbais.tar.ZIf FTP was used to transfer the interface distribution from a PC to the AW workstation, make sure that this file has a capital Z. Otherwise, the user will not be able to run zcat or uncompress on it.

To rename a file, use the mv command. For example,mv fxbais.tar.z fxbais.tar.ZIf a “permission denied” message is encountered while trying to run a script file, make the script file executable. For example,chmod +x a_script_file.sh

134

Page 134: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Operational Hints

C Shell Environment VariablesFoxboro recommends that the FoxAPI be installed, started and stopped as the root user from a csh shell. Therefore, the PI API and fxbais interface should also be installed, started and stopped from the same environment. The following are a few commands that can be used to configure the required environment variables.

To set an environment variable (such as PIHOME)setenv PIHOME /opt/piapiTo add to an existing environment variable (such as LD_LIBRARY_PATH):setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${PIHOME}/libTo remove an environment variable (such as PIHOME):unsetenv PIHOME

Bourne or Korn Shell Environment VariablesUnder the Bourne or Korn, to set an environment variable (such as PIHOME):PIHOME=/opt/piapiexport PIHOMETo add to an existing environment variable (such as LD_LIBRARY_PATH):LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PIHOME/libexport LD_LIBRARY_PATH

To remove an environment variable (such as PIHOME):unset PIHOME

Updates and HotFixes for the FoxAPIFoxboro regularly provides fixes and enhancements to their FoxAPI. Please be the latest updates are installed.

When this manual was written, the current version of the FoxAPI is 4.3.2 (released Nov 2008).

FoxAPI max number objects (0) < 1On Windows I/A version 8.x, if the interface fails to start and logs the message

“FoxAPI max number objects (0) < 1. Abort.” Then install QF1007921. If the problem persists, ensure that the interface is being started by the fox user.

PI Points showing “Bad Input” on startup until the I/A value changedThere was a problem with older versions of the I/A Object Manager that would cause some PI points get a “No Response” status from the FoxAPI when the FoxAPI data sets were opened. This would cause the fxbais interface to see the value as a “Bad Input”. The value status would not be updated until the I/A value changed in the controller and triggered an update of the FoxAPI.

This problems was resolved with the following Foxboro Quickfixes

I/A 6.5.1 Solaris 2.5.1 QF1005118

I/A 6.5.1 Windows NT QF1005127

Foxboro I/A 51 and 70 Series Interface to the PI System 135

Page 135: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix A:Error and Informational Messages

I/A 7.1 Solaris 8 QF1005113

I/A 7.1 Windows XP QF1005128

Reading an Entire MCIN/MCOUT BlockIf desired, all of the inputs of an MCIN or all of the outputs of an MCOUT block may be read into a single PI point. The MCIN block has a parameter of type Long Packed Boolean (10) called PAKCIN. The MCOUT block has a parameter of type Packed Boolean (9) called PAKCRB. These parameters are the packed equivalent of the .CO_x parameters of the MCOUT and the .IN_x parameters of the MCIN blocks.

To read the individual inputs or outputs into separate PI tags, it is more efficient to have the InstrumentTag attribute set to read the packed parameter (PAKCIN or PAKCRB), and use the BTM= parameter in the ExDesc attribute to extract the bit required. This is because the FoxAPI is able to read a single parameter instead of returning up to 32 separate parameters.

Reading I/A Series MessagesThe Interface does not support the reading of I/A Series Messages.

For example, messages such as

Control Station Generated:Process AlarmsSequence of EventsSequence Block

System MonitorOperator Action Journal

are not supported.

FoxAPI Configuration Settings (foxapi.cfg)The FoxAPI has a number of configurations settings that can be used to tune the resources and performance of the FoxAPI. These settings are stored in the text file /opt/fox/ais/bin/foxapi.cfg.

Normally, the FoxAPI and the fxbais interface will work together without requiring any changes to the FoxAPI configuration file foxapi.cfg.

Use the default setting in the foxapi.cfg file if possible.

Note: The FoxAPI Release Notes (B0193UH) refer to “Special Instructions for Existing OSI PI Applications”. These notes only apply to fxbais 2.2.5 or earlier and are not relevant for the current release of the fxbais interface.

maxobjOn startup, the FoxAPI processes allocate resources based on the maxima values specified in the foxapi.cfg file. Most of the maxima values are sufficient for most normal operations.

136

Page 136: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Operational Hints

The exception is maxobj, which is often too small for interfaces collecting large numbers of points. The maxobj is the maximum number of objects that the FoxAPI can maintain connections to, and the default is 6000. When the interface attempts to open lists when the 6000 objects have been used, the call will fail and the interface will not be able to scan the points.

Setting the maxobj to higher values allows the FoxAPI to allocate more shared memory to the lists. Typically, the maxobj should be 1.5 or 2 times the number of points scanned by the interface.

For example, if an interface is scanning 6000 points, use maxobj = 10000This allows addition resources for when points are added or deleted from the interface, and having extra resources allocated within the FoxAPI does not cause any problems.

Also note that it is possible for the resources to be used by points that are no longer being scanned. To allow the FoxAPI to preserve object index values on a restart, the FoxAPI keeps a list of the objects it has accessed in a file called restore_index.dat. The objects within this list will reserve space in the FoxAPI, even if they are no longer in use. Therefore, it is possible for the FoxAPI to run out of resources even when the fxbais interface and other applications are not using maxobj objects.

To free the resources allocated for the restore_index.dat objects,

1. Stop the PI API and fxbais interface$PIHOME/bin/pistop

2. Stop the FoxAPI processes/opt/fox/ais/bin/aisstop

3. Delete the restore_index.dat filerm /opt/fox/ais/bin/resource_index.dat

4. Restart the FoxAPI processes/opt/fox/ais/bin/aisstart

5. Restart the PI API and the fxbais interface$PIHOME/bin/pistart

The restore_index.dat file will be recreated and only objects that are used will be included in the file.

Ctdlay and om_delayIf the interface is seeing large numbers of objects with No Response (0x0103) when the interface is started, the ctdlay parameter can be increased to reduce the load on the underlying systems. This should allow the FoxAPI more time to get the response from the control stations before. Similarly, the om_delay parameter can also be used to increase the delays between opening the OM lists, and so reduce the load on the underlying systems.

Typically values for the ctdlay and om_delay parameters arectdlay = 200

om_delay = 500

But, note that the “No Response” status when the lists are opened on startup will not cause the PI point to show “I/O Timeout”. The interface will only show “I/O Timeout”

Foxboro I/A 51 and 70 Series Interface to the PI System 137

Page 137: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix A:Error and Informational Messages

is the status is still 0x0103 when the interface is scanning the points normally. The status when the lists are opened is not used to flag points as bad.

Fastest_rsrIf the Object Manager (OM) loading on the control stations is too high, the OM can be slowed to reduce the loads. The fastest_rsr parameter controls how often the control station checked the objects in its scan lists to see whether they have exceeded the delta values, and is in 0.5 second units (1=0.5 sec, 2=1 sec etc). The default value is 1 (0.5 seconds). A typical setting for the fastest_rsr parameter isfastest_rsr = 4Increasing fastest_rsr to 4 (2 seconds) can significantly reduce the loads on the control stations, but still giving an acceptable update rate to the interface.

Unfortunately, the fastest_rsr is applied to all connections from the FoxAPI and so it is not possible to have different control stations using different rates.

For more information on the configuration parameters available in the foxapi.cfg file, refer to the FoxAPI User Manual (B193UD).

Time Difference Reported by the InterfaceOn some Foxboro nodes, the time zone may be set to GMT and the system clock adjusted to show the correct local time. Because of this, the system clock (UTC seconds) is not correct when compared to the actual UTC seconds from the PI server.

The interface is able to adjust for this difference when the timestamps are sent to the PI server, but some misleading messages can be logged. For example,

16-Jul-09 14:08:48FXBAIS 1> (UTC time on server node - UTC time on interface node) = -43190 seconds

16-Jul-09 14:08:48FXBAIS 1> Local time on server node - local time on interface node) = 10 seconds

The above messages show the time difference between a Foxboro AW51 and a PI server in New Zealand (GMT+12). The local times are different by 10 seconds (due to clock drift) and the UTC times are difference by nearly 12 hours. This is expected for Foxboro Aws were the time zone is set to GMT.

138

Page 138: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix B: Failover Support

In order to achieve continuous transfer of data between the Foxboro I/A and the PI Server, two copies of the PI Foxboro interface program may be run, each on a different Foxboro AW workstation. Either AW workstation may be an AW50 Series (Solaris) or AW70 Series (Windows) model. However, only the version of the Interface using FoxAPI (not netFoxAPI) supports failover.

In a failover configuration, one copy of the interface is designated as PI Foxboro-Primary and the other as PI Foxboro-Secondary. The Primary program is responsible for data collection during the vast majority of the time.

Foxboro I/A 51 and 70 Series Interface to the PI System 139

Page 139: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

However, should the Primary program terminate, the Secondary program automatically assumes responsibility for transferring data between the I/A and PI.

Foxboro I/A 51 and 70 Series Interface to the PI System 140

Page 140: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Miscellaneous Information on Failover

When the Primary program restarts, the Secondary program automatically stops data collection. The transfer of data between the I/A and PI again becomes the responsibility of the Primary.

Parameters for Operation

PI ICUTo designate that PI Foxboro is running in a failover configuration, change the Failover selection from None to either Primary or Secondary.

Command LineTo designate that PI Foxboro is running in a failover configuration, provide the-failover parameter on the interface command line. Specifically, run the copies of the interface as

$ fxbais -ps=F -id=1 -failover=primary ...

Foxboro I/A 51 and 70 Series Interface to the PI System 141

Page 141: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix B: Failover Support

on one machine and$ fxbais -ps=F -id=1 -failover=secondary ...

on the other.

Initialization FileWhen PI Foxboro encounters the -failover option on the command line, it looks for other failover-related parameters in the initialization file fxbais.ini. In particular, the Interface needs to know

which machine is running the other instance of PI Foxboro

the maximum time that the user can tolerate neither copy of PI Foxboro collecting data

the name of the watchdog object on the I/A (to be described later)

the name of the PI tag that tracks the failover data collection status (also described later)

The following contents of fxbais.ini provide an example of how to specify the above information:[fxbais-1]failover_peer=LBUG02fail_time=2watchdog=PI_COMM:PI_WATCHDOG.LI01failover_status=FX_FAILOVER_PRI

The section [fxbais-1] indicates that the entries below it pertain to the copy of PI Foxboro running with -id=1. If PI Foxboro runs with -id=2, edit the fxbais.ini file and create a section called [fxbais-2].

The value of the entry for failover_peer indicates the name of the workstation that is running the other instance of PI Foxboro. The AW running the present copy of PI Foxboro must be able to communicate to this other (peer) workstation via TCP/IP. To confirm, run the standard ping command.$ ping LBUG02Alternatively, specify an IP address (in dotted-decimal form) for the failover_peer value.[fxbais-1]failover_peer=151.128.8.65Confirm the communication between the two machines via TCP/IP by running ping.$ ping 151.128.8.65The value of the entry for fail_time indicates the maximum time in minutes for the Secondary to wait before assuming data collection. In this example, at most 2 minutes will elapse from the time that the Primary terminates to the time that the Secondary automatically starts data collection. A value of fail_time that is too small (e.g., 1) can cause the Secondary to start data collection even though the Primary is still collecting data. The minimum fail_time will vary depending on the performance of the FoxAPI and the I/A system. Because some FoxAPI calls can take some time to complete

142

Page 142: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Miscellaneous Information on Failover

(opening lists etc) and the interface is not able to check or update the watchdog when it waiting for the FoxAPI, the FoxAPI delays are the limiting factor when setting fail_time.

The value of the watchdog entry is the name of the object residing on the Foxboro I/A.

The value of the failover_status entry is the name of a PI tag that keeps track of the operational state of the failover configuration. Both of these items are described later.

I/O Rate PointsRunning PI Foxboro in a failover configuration requires the existence of two sets of different I/O Rate points. The Primary uses one set while the Secondary uses the other.

The Primary and Secondary copies of PI Foxboro may use the same -ec= command line parameter, but the entries for the PI tag names in the iorates.dat file must be different.

For example, on the Primary machine the iorates.dat file may containsyfxbais.in1,31syfxbais.out1,32and on the Secondary machine, the iorates.dat file may containsyfxbais.in2,31syfxbais.out2,32Note that although both instances the primary and secondary interface would use -ec=31 -ecout=32, because of the different iorates.dat files, the interfaces would write to different PI points, as required.

An alternative configuration would be to use the same iorates.dat file which defined all the iorates points on both machines, but use different -ec= and -ecout= parameters.

For example, both machines could use the iorates.dat filesyfxbais.in1,31syfxbais.out1,32syfxbais.in2,33syfxbais.out2,34And then the primary interface would use -ec=31 -ecout=32 and the secondary would use -ec=33 -ecout=34.

UniInt Health PointsTo use UniInt health points with interface failover, it is necessary to have two sets of health points. One set of health points for the primary interface and another set of health points for the second.

For an interface to be able to identify the points that it will update, the location3 attribute is set to different values for each interface and the Health Tag ID: –uht_id= argument is used to filter the tags loaded by the interface.

Foxboro I/A 51 and 70 Series Interface to the PI System 143

Page 143: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix B: Failover Support

For example, the UniInt health points for the primary interface may have location3=1 and the secondary interface have location3=2. Then the primary interface would be started with -failover=primary –uht_id=1and secondary interface would be started with-failover=secondary –uht_id=2.For details on the data available from the UniInt health points, please refer to the UniInt Interface User Manual.

Design Details

Watchdog Object on I/AThe failover feature of PI Foxboro relies on a watchdog object, which must be created on the I/A before execution of the PI Foxboro programs. This object must be a Long Integer (I/A Type 6).

It is recommended that a CALC block be built (no program steps need to be configured) on the I/A control database, and the LI01 parameters of the block used by the interface as the failover watchdog object.

It provides the main method of communications between the Primary and Secondary programs regarding the responsibility of data transfer between the I/A and PI. At startup, if PI Foxboro cannot access the watchdog object, it exits.

During normal operation (i.e., when the Primary is collecting data), the Primary program periodically writes to this watchdog object. The value written is between 110 and 115, and increases monotonically. When the value reaches 115, it rolls back to 110.

At specific intervals, the Secondary program reads the value of the watchdog object. When it determines that the value of the watchdog object has stopped changing, it sends a message via UDP to the Primary. If it does not get a response from the Primary, it concludes that the Primary program is not running. The Secondary program then starts transferring data between the I/A and PI.

While the Secondary program is collecting data, it writes periodically to the watchdog object a value between 210 and 215. However, before every write, it reads the value of the watchdog object. It checks to see whether this value is 10 (scenario to be described below).

When the Primary program is re-started, it writes a value of 10 to the watchdog object, indicating that it wishes to resume data collection. When the Secondary program sees that the watchdog object has a value of 10, it stops collecting data, and writes a value of 20 to the watchdog object.

144

Page 144: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Miscellaneous Information on Failover

When the Primary sees that the watchdog object has a value of 20, it begins data collection and writes values of 110 through 115. At this point, the default configuration exists - the Primary is collecting data and the Secondary is in standby mode.

Other scenarios are described in a later section.

Meaning of Watchdog I/A Object ValuesWritten by the Primary:

1. Primary wants to start/resume collecting data

110 - 115 Primary is currently collecting data

Written by the Secondary:

20 Primary should go ahead and start/resume collecting data

210 - 215 Secondary is currently collecting data

Prevention of Simultaneous Data CollectionThe Interface has various safeguards to preclude simultaneous data collection by the Primary and the Secondary. If after writing a value of 10 to the watchdog object, the Primary reads this same value back, it then assumes that the Secondary is not collecting data. (Otherwise, it would have read 210-215). However, in order to be certain, the Primary sends a message via UDP to the Secondary to confirm. If the Secondary replies that it is collecting data, the Primary writes a value of 10 again. Otherwise, the Primary begins data collection.

On the Secondary side, if after determining that the value of the watchdog object has stopped changing, the Secondary assumes that the Primary is not running (and hence not collecting data). However, in order to be certain, the Secondary sends a message via UDP to the Primary to confirm. If the Primary replies that it is collecting data, the Secondary remains in standby mode. Otherwise, the Secondary begins data collection.

FoxAPI Functions UsedThe FoxAPI function used in writing a value to the watchdog object is uwrite(). For reading, it is uread(). The periodic time interval for these calls is one-half of the user specified fail_time value. For example, if the failover time is set at 4 minutes, and both programs are running, the Primary program calls uwrite() once every 2 minutes and the Secondary program calls uread() once every 2 minutes.

PI Failover Status PointWithin the fxbais.ini file, one of the mandatory entries is failover_status. This specifies a PI digital point that the interface will write to current failover status of the interface to. Each instance of the interface should have a different failover status point to write to.

For example, if the primary interface was to write its status to a PI point FX_FAILOVER_PRI and the secondary interface was to write to FX_FAILOVER_SEC, then the fxbais.ini on the primary interface node would contain[fxbais-1]failover_status=FX_FAILOVER_PRIand the secondary interface node, fxbais.ini man contain

Foxboro I/A 51 and 70 Series Interface to the PI System 145

Page 145: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix B: Failover Support

[fxbais-1]failover_status=FX_FAILOVER_SEC

The failover status points should be created with the following attributes,

Attribute Details

Tag Tag name that appears in the fxbais.ini failover_status entry

Point Source L (or Lab)

Compressing Off

ExcDev/ExcDevPercent

0.0

PointType Digital

DigitalSet FXBAIS_FAILOVER

Descriptor Interface name + “ Failover Status”

The digital set FXBAIS_FAILOVER should have the following states

Value StateText

Meaning

0 Stopped Interface is not running

1 1Init Primary wants to start data collection

2 1Collect Primary is the most recent program that collected data

3 1Exit After data collection, Primary exited normally

4 2Standby Secondary wants to start data collection

5 2Collect Secondary is the most recent program that collected data

6 2Exit After data collection, Secondary exited normally

At startup, if PI Foxboro cannot access this PI tag, it exits. Therefore, the user must create this failover status tag on the PI Server machine before starting PI Foxboro. The tag may be created with the default PI tag attributes. This PI point can also be used to enable failover debug messages to be logged.

Note: The failover status point may not be updated correctly if the interface was to be aborted without shutting down cleanly, or the AW is rebooted. Therefore, it is possible to have both instances of the failover status point showing that both instances are collecting when this is NOT the case. To determine which copy of the interface is actually collecting data, look at the values of the I/A Watchdog object via a Foxboro console. Values that continuously change from 110 to 115 indicate that the Primary is collecting data. Values that continuously change from 210 to 215 indicate that the Secondary is collecting data.

Failover debug messagesDebug messages can be enabled to log the activity of the I/A watchdog object and the peer-to-peer network messages. The debug messages are enabled by setting the value of the userint1 attribute of the PI failover status point. (0=disabled, 1=primary, 2=secondary, 3=both). This is debug flag is only read at startup.

146

Page 146: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Miscellaneous Information on Failover

Note: The userint1 value of the failover PI point is not related in any way to the BadStatusIndication parameter or the userint1 values of the other PI points used by the interface. The value of the userint1 attribute of the failover PI point is only used to enable failover debug messages.

Digital State Written when Interface StopsThe startup command for PI Foxboro usually contains a parameter specifying the digital state that will be written to its list of tags when the interface stops. For example,

$ fxbais -ps=F -id=1 -stopstat=”Intf Shut” ...In this example, when PI Foxboro stops, it writes the digital state Intf Shut to its list of input tags.

However, for a failover configuration, this behavior of writing a digital state upon exit is not desirable because there is usually another copy of the interface that will assume data collection. Therefore, when running in a failover configuration, a copy of PI Foxboro writes the digital state specified by -stopstat only if it has determined that the other copy of the interface is not running.

Consistency of Startup ParametersEither the Primary or the Secondary may start first. However, the one that does start up before the other determines the common startup parameters. Specifically, if the Secondary starts up first, it makes special note of the following information:

Point source character (-ps=)

Interface number (-id=)

PI Server machine and PI communications port (-host=)

Watchdog I/A object (fxbais.ini watchdog=)

Failover time (fxbais.ini fail_time=)

The Secondary program then opens an UDP socket port. This port is used for communications between the Primary and Secondary programs.

When the Primary program starts, it also makes special note of the following:

Point source character (-ps=)

Interface number (-id=)

PI Server machine and PI communications port (-host=)

Watchdog I/A object (fxbais.ini watchdog=)

Failover time (fxbais.ini fail_time=)

The Primary program sends all of this information (via UDP) to the Secondary. The Secondary confirms that this set of information is identical to its own. If these parameters do not match, the Primary will exit and print out the mismatched parameters in the log file. The Secondary itself will begin data collection within the failover time (scenario to be described below).

Foxboro I/A 51 and 70 Series Interface to the PI System 147

Page 147: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix B: Failover Support

Operational ScenariosIn the following scenarios, “WD=” indicates the value of the watchdog object. “WD=110-115” means a periodic change in the value of the watchdog object from 110 to 111 to 112 to 113 to 114 to 115 to 110 and so on.

1 - Startup, NormalAt startup, neither the Primary nor the Secondary is collecting data.

The Secondary program starts. The Secondary continuously checks for WD=10 and WD=110-115. If WD=10, the Secondary writes WD=20.

Meanwhile, the Primary program starts. It writes WD=10. It then checks for WD=20. Since the Secondary wrote WD=20, the Primary starts data collection and periodically writes WD=110-115.

End Result: Primary is collecting data.

2 - Startup, Primary Can Connect to the PI Server, but Secondary Cannot At startup, neither the Primary nor the Secondary is collecting data.

The Secondary program starts, but cannot connect to the PI Server. It will wait until the connection to the PI server is established and will not respond to requests from the primary interface.

Meanwhile, the Primary program starts. It writes WD=10. It then checks for WD=20. Because the Secondary program is not running, WD=10. The Primary then sends a message to the Secondary via UDP. The Secondary does not respond because it is not running. The Primary starts data collection and periodically writes WD=110-115.

End Result: Primary is collecting data.

3 - Startup, Primary Cannot Connect to the PI Server but Secondary CanAt startup, neither the Primary nor the Secondary is collecting data.

The Secondary program starts. The Secondary continuously checks for WD=10 and WD=110-115. If WD=10, the Secondary writes WD=20.

Meanwhile, the Primary program starts but cannot connect to the PI Server. It is wait until the connection to the PI server is established and will not respond to requests from the secondary interface.

The Secondary sees that the WD is not changing. It then sends a message to the Primary via UDP. The Primary does not respond because it is not running. The Secondary starts data collection and periodically writes WD=210-215.

End Result: Secondary is collecting data.

4 - Primary Currently Collecting Data; Primary FailsThe Primary is collecting data and periodically writes WD=110-115. The Secondary sees that the WD=110-115.

The Primary program stops. The Secondary sees that the WD is not changing. It then sends a message to the Primary via UDP. The Primary does not respond because it is not running. The Secondary starts data collection and periodically writes WD=210-215.

148

Page 148: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Miscellaneous Information on Failover

End Result: Secondary is collecting data.

5 - Secondary Currently Collecting Data; Primary Re-startsThe Secondary is collecting data and periodically writes WD=210-215.

The Primary program starts. It writes WD=10.

Because the Secondary sees that WD=10, it writes WD=20 to indicate it going to standby. It stops collecting data and continually checks for WD=110-115.

Since WD=20, the Primary starts data collection and periodically writes WD=110-115.

End Result: Primary is collecting data.

6 - Primary Currently Collecting Data; Secondary Fails; Secondary Re-startsThe Primary is collecting data and periodically writes WD=110-115.

The Secondary program fails.

The Secondary program re-starts. The Secondary first checks for WD=10. Because WD=110-115, and periodically changes, the Secondary does not collect data. However, it is prepared to do so.

End Result: Primary is collecting data.

7 - Power Outage and Recovery; Primary Re-starts much Earlier than the Secondary

This scenario is the same as the sequence of scenarios 2 and 6.

8 - Power Outage and Recovery; Secondary Re-starts much Earlier than the Primary

This scenario is the same as the sequence of scenarios 3 and 5.

9 - An interface cannot access the Watchdog Object on startupAn inability of an instance of the interface to access the watchdog object indicates a serious problem on either the I/A System or the Foxboro NodeBus. On startup, the interface writes a message to the PI log file and exits. It probably indicates a configuration issue. Ensure that the watchdog object has been properly configured for read and write access (must not be secured).

10 - An interface cannot access the Watchdog Object when runningAn inability of an instance of the interface to access the watchdog object indicates a serious problem on either the I/A System or the Foxboro NodeBus. Since the interface was able to access the object on startup, we know that it was accessible. The cause of the problem likely to be a temporary issue (i.e. station containing the watchdog object is rebooting) and so the interface will log an error message but continue running in its current failover state.

Foxboro I/A 51 and 70 Series Interface to the PI System 149

Page 149: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix B: Failover Support

Failover Installation Checklist

1. Confirm that PI Foxboro runs properly in a non-failover configuration on the two machines. Specifically, on the machine that will be running the copy of the interface that will be designated as the Primary, install and run the interface without the-failover startup parameter. Stop the Interface on the Primary machine. On the Secondary machine, Install and run the interface without the -failover startup parameter. Stop the Interface on the Secondary.

2. Create the watchdog object on the Foxboro I/A. This object must be a Long Integer (I/A Type 6). It is recommended that a CALC block be used (with no calculation steps) and the LI01 parameter used as the watchdog object.

3. Create the PI tag that will track the operational status of the failover configuration.

4. Make sure that two sets of event counter tags exist. The Primary and Secondary copies of PI Foxboro may use the same -ec= command line parameter, but the entries for the PI tag names in the iorates.dat file must be different.

5. Create and/or edit the fxbais.ini file. Change the section name [fxbais-1] if -id=1 is not used in the PI Foxboro interface startup command line. Put in values for the entries failover_peer, fail_time, watchdog, and failover_status.

6. Confirm that the Primary machine can communicate to the Secondary machine via TCP/IP and vice-versa. For example, use the ping command.

7. On the Primary machine, interactively start PI Foxboro with the parameter -failover=primary. Confirm that this copy of the interface properly collects data.

8. Stop the interface on the Primary machine.

9. On the Secondary machine, interactively start PI Foxboro with the parameter -failover=secondary. Confirm that this copy of the interface properly collects data.

10. On the Primary machine, start PI Foxboro with -failover=primary. Confirm that the Primary copy of the interface starts data collection. Confirm that the Secondary copy of the interface goes into standby mode.

11. Stop the interface on the Primary machine. Confirm that the Secondary copy of the interface starts data collection.

12. Restart the interface on the Primary machine. Confirm that the Primary copy of the interface takes over data collection.

13. Permanently install the two copies of PI Foxboro so that they run in the background (Solaris) or as services (Windows).

If multiple copies of the interface are running on the same machine (for example, using different -id= parameters), create entries for failover_port and failover_self_port in the fxbais.ini file. See the next section for details.

150

Page 150: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Miscellaneous Information on Failover

Miscellaneous Information on Failover

Optional Parameters

Wait Time for Response from PeerAt startup, a copy of the PI Foxboro interface configured for failover communicates with its peer via UDP in order to check for common startup parameters. By default, it waits 5 seconds for a response from its peer. To change this wait time, put in a value for the entry check_peer_time in the fxbais.ini file. For example, to increase this wait time to 10 seconds:[fxbais-1]... check_peer_time=10

Socket Port NumbersBy default, a copy of the PI Foxboro interface listens for messages sent by its peer on the socket port numbered 5451. If another application is currently using port 5451, edit the fxbais.ini file on both machines and put in the same value for the entries failover_port and failover_self_port. For example,[fxbais-1]...failover_port=5500failover_self_port=5500Of course, for the above example, port 5500 should not be used by another application on either the Primary or the Secondary machines.

If multiple copies of PI Foxboro are running on the same machine (for example, using different -id= parameters), create entries for failover_port and failover_self_port in the fxbais.ini file to correspond to each copy. For example, if there are two copies (-id=1 and -id=2):[fxbais-1]…failover_port=5451failover_self_port=5451

[fxbais-2]…failover_port=5452failover_self_port=5452

Questions and Answers

Why must two sets of I/O Rate points be created?The Primary and Secondary PI Foxboro Interfaces work together to transfer data between PI and the Foxboro I/A. At any given time, only one of these copies is sending data to PI. However, each copy of PI Foxboro is an independent instance of the Interface.

Foxboro I/A 51 and 70 Series Interface to the PI System 151

Page 151: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix B: Failover Support

Accordingly, every 10 minutes, each writes to the I/O Rate point (as referenced by the -ec= parameter on the command line) a value that represents the data collection rate. While the Secondary is running in standby mode, (and thus not collecting data) it will write a value of 0 to its I/O Rate point. Therefore, two sets of I/O Rate points should be created, one for the Primary and one for the Secondary.

How can I tell which copy is collecting data?Look at the values of the I/A Watchdog object via a Foxboro console. Values that continuously change from 110 to 115 indicate that the Primary is collecting data. Values that continuously change from 210 to 215 indicate that the Secondary is collecting data.

152

Page 152: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix C: Notes on Upgrading from Previous Versions

Required -host= argumentPreviously, if the -host= argument was not specified then the interface would use the default PI server. Because of changes to the PI API/SDK and buffering, this is no longer supported.

The -host= argument must be specified on the command-line.

ExDesc keywords no longer supportedWhen upgrading from previous versions of the interface, some of the PI points may require configuration changes, as some ExDesc keywords are no longer supported. The functionality of these keywords is supported using other methods within the interface.

These keywords are TRG=, SOURCE=, SRC=, RTN= and MSG=.

If the interface loads a point with one of the above keywords, the interface will refuse to load the point, and log an error message.

Obsolete Keyword Functionality Replacement

TRG= Trigger a scan of a point when the specified point received an update.

EVENT=

SOURCE=orSRC=

Specifies the source point for an output from PI to I/A. The value to be written to I/A is read from the source PI point.

SourceTag attribute

RTN= The output point would hold the value to be written from PI to I/A. The PI point specified by RTN= would contain the actual value written to I/A.

Output point holds result of output.SourceTag attribute point contains value to be written

MSG= String values read from the specified I/A object would be written to the PI message log.

Configure a string PI point to store the string values in PI.

PIHOME and LD_LIBRARY variables defined in /.cshrcIt is recommended that the PI API and the fxbais interface are run from the root C shell (csh). To ensure that the environment variables required are always set when required, it is recommended that the definitions are added into the /.cshrc file.

Foxboro I/A 51 and 70 Series Interface to the PI System 153

Page 153: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Also, to simplify the commands, the $PIHOME/bin directory can also be added to the PATH.

For example,setenv PIHOME /opt/piapisetenv LD_LIBRARY_PATH ${PIHOME}/libsetenv PATH ${PATH}:${PIHOME}/bin

The go_pistart script used to start PI API and interface automatically uses the PIHOME and LD_LIBRARY_PATH definitions from the /.cshrc file and so it is important that these environment variables are set. If it is not possible to add the variables to the /.cshrc file, then the go_pistart must be edited to remove the checks of the variables and to explicitly define the variables when it is run.

Install Procedure

WindowsThe following procedure assumes that the existing interface is installed and running as a service.

If the interface was not running as a service, ensure that the scripts used to start the interface as a background process have been removed. The issues with the interface not being able to run as a service have been resolved with updates in the FoxAPI, and so the recommended method is to run the interface as a service.

1. Stop the fxbais interface and PI API servicesnet stop fxbaisnet stop bufserv (or )net stop pibufss (depending on the buffering used)net stop pimsgssnet stop pinetmgr

2. If the PI API is not the current release, it is recommended that the PI SDK/PI API is upgraded. Running the PI SDK installation kit will upgrade the existing versions of the software.

3. Run the fxbais installation kit

4. Use the ICU to check that the command line arguments are set correctly

5. Start the PI API and fxbais interface services.net start pinetmgr net start pimsgssnet start bufserv (or )net start pibufss (depending on the buffering used)net start fxbais

6. Check the logs to ensure that the interface has started correctly and is collected data.

Foxboro I/A 51 and 70 Series Interface to the PI System 154

Page 154: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Install Procedure

SolarisThe following procedure assumes that the PI API and fxbais interface are installed and running, and the PIHOME environment variable is defined.

1. Stop the PI API and the interface processes$PIHOME/bin/pistop

2. If the PI API is not the current release, it is recommended that the PI API is upgraded. Using the PI API installation procedure will update the existing PI API files but will leave the existing configuration unchanged.

3. Extract the fxbais files from the installation kit. The existing site specific files will not be changed.cd $PIHOMEzcat fxbais_x.x.x.x.tar.Z | tar xvf –

4. Rename the existing fxbais.sh script to fxbais.sh_oldcd $PIHOME/interfaces/fxbaismv fxbais.sh fxbais.sh_old

5. Copy the template fxbais.sh_new file to fxbais.shcp fxbais.sh_new fxbais.sh

6. Edit the new fxbais.sh so that the interface command-line arguments are the same as the original fxbais.sh file. The fxbais.sh_new file is used as a template because this script contains logic for checking the configuration and running processes etc, and this logic may have changed in the new release.

7. Restart the PI API and interface processes$PIHOME/bin/pistart

8. Check the logs to ensure that the interface has started correctly and is collecting data.

Foxboro I/A 51 and 70 Series Interface to the PI System 155

Page 155: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix D:FoxAPI Configuration

As of version 4.2.6 of the FoxAPI, three new features were added that causes problems for the versions PI Foxboro interface prior to 2.2.6.x.

The following descriptions are taken from the FoxAPI release notes.

The features are

(QF002437) New method of reporting “Bad” status for pointsFor a point that does not have a value in the FoxAPI database, FoxAPI calls will return a status of 103 hex. This status shows both connect-status = 0 and bad bit = 1. This differs from the older design in which one of several statuses was returned (0, -1, or -2). Application of the new feature is the default.

The new feature may be disabled by putting ia_badstat=0 in foxapi.cfg and restarting FoxAPI.

3. (QF002437) Increased speed in making connections to pointsConnections to points will be made faster. Application of the new feature is the default.

The new feature may be rejected by putting skip_omread=0 in foxapi.cfg and restarting FoxAPI.

4. (QF002437) A point name will always have the same indexThis feature is primarily for support of client applications but is implemented for all FoxAPI applications (local and client). In client applications the problem was that a loss of communication followed by an automatic reestablishment of communication could result in the application having indexes that did not match the intended points. This feature fixes the problem. Once a connection to a point is made and an index is assigned, the index is reserved for that point name. If the point name is removed from the FoxAPI data base and a new connection is made later, the index assigned will be the same as the index assigned the first time. Application of the new feature is the default.

The new feature may be rejected by putting protect_index=0 in foxapi.cfg and restarting FoxAPI.

If fxbais interface version prior to 2.2.6.x is being used, the FoxAPI configuration file “foxapi.cfg” should contain the following options:

ia_badstat=0skip_omread=0protect_index=0

By default, the “foxapi.cfg” file is located in the /opt/fox/ais/bin directory for Solaris, or “d:\opt\fox\ais\bin” for Microsoft Windows.

These options should not be used with the current release of the fxbais interface.

Foxboro I/A 51 and 70 Series Interface to the PI System 157

Page 156: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Appendix E:FoxAPI Status Definition

The Interface reads the status of an I/A object. FoxAPI presents this status as a 32-bit word, with the bits numbered from 0 to 31. Bit 0 is the least significant.

Status Definition for I/A Series Version 4.1 and EarlierBit Number Description

Bits 0 to 4 The object value type

1 character

2 integer

3 float

4 string

5 1 byte boolean

6 long integer

8 short integer

9 packed boolean

10 long packed boolean

Bits 5 to 7 Object Manager connect status

0 No response

1 Being scanned

2 Disconnected

3 Deleted

4 Bad data type or unconnectable compound

6 Non-connectable parameter

Bit 8 The object is BAD (1), disconnected (1), or OK (0).

Bit 9 The parameter is secured (1) or unsecured (0).

Bit 10 The compound is on (1) or off (0).

Bit 11 The block is out of service (1) or in service (0).

Bit 12 The point is a shadow parameter (1) or is not a shadow parameter (0).

Bit 13 Init. Acknowledge (1) / else (0)

Bit 14 Reserved.

Bit 15 There is an error condition upstream (1) or no upstream error detected (0).

Foxboro I/A 51 and 70 Series Interface to the PI System 159

Page 157: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Bit Number Description

Bits 16 to 31 Reserved

Status Definition for I/A Series Version 4.2 and LaterBit Number Description

Bits 0 to 3 The object value type

1 character

2 integer

3 float

4 string

5 1 byte boolean

6 long integer

8 short integer

9 packed boolean

10 long packed boolean

Bit 4 Change (setval) (1) / else (0)

Bits 5 to 7 Object Manager connect status

0 No response

1 Being scanned

2 Disconnected

3 Deleted

4 Bad data type or unconnectable compound

6 Non-connectable parameter

Bit 8 The object is BAD (1), disconnected (1), or OK (0).

Bit 9 The parameter is secured (1) or unsecured (0).

Bit 10 Ack/uncond. Init (1) else (0)

Bit 11 The object is out of service (1) or in service (0).

Bit 12 The point is a shadow parameter (1) or is not a shadow parameter (0).

Bit 13 The parameter is limited high (1) or not (0)

Bit 14 The parameter is limited low (1) or not (0)

Bit 15 There is an error condition upstream (1) or no upstream error detected (0).

Bits 16 to 31 Reserved

Foxboro I/A 51 and 70 Series Interface to the PI System 160

Page 158: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Storing Status Values in PI

For example, a status of 0x23 corresponds to binary

0000 0000 0010 0011The value of bits 0 to 4 is 3. The value type of the object is float.The value of bits 5 to 7 is 1. The object is connected.

Another example is a status of 0x963, or in binary

0000 1001 0110 0011The value of bits 0 to 4 is 3. The value type of the object is float.The value of bits 5 to 7 is 3. The object is deleted.The value of bit 8 is 1. The object is bad.The value of bit 11 is 1. The object is out of service.

Generally, the Interface sends the I/A object’s value to PI only if all three of the following conditions are met:

1. Bits 5-7 indicate a connected status.

2. Bit 8 indicates okay.

3. Bit 11 indicates in service.

Otherwise, the Interface sends Bad Input to PI. However, the condition regarding the bad status from Bit 8 may be ignored. See the description for BadStatusIndication in the section regarding the fxbais.ini file.

Storing Status Values in PIIf Location3 (I/A data type) for a PI point is set to 0 then instead of storing the object value, the interface will store the FoxAPI status instead.

Note that it is not practical to store the entire status into a digital PI point as the digital set would need 65536 state strings to cover all the possible values. But, it is possible to use the BTM= command in ExDesc attribute to select a subset of the status bits, and reduce the number of possible values to a more practical level.

For example, to store just the connection status, extract bits 5 to 7 with the setting BTM=5,6,7 and use a digital set with the 8 possible states “No Resp”, “Scanned”, “Disconnect”, “Deleted”, “Bad Type”, “NA 5”, “Non-Conn”, “NA 7”.

If the Bad and Out-of-Service bits are desired, use BTM=8,11 and a digital set with the 4 states “OK”, “Bad”, “OOS”, “BadOOS”.

If the object status is configured to be stored in a PI string point, then the interface will convert value into a suitable. For example, a real output of a CALC block running in AUTO with the OOS flag set may have a status of 0x0a23. A PI string storing that status would contain the string “0x0a23 OOS Secured Scanned Float”. Note that the format of this string value is not configurable.

If the value is written to floating point or integer PI points then the value can be stored as read from the FoxAPI.

Foxboro I/A 51 and 70 Series Interface to the PI System 161

Page 159: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Revision HistoryDate Author Comments

5-Jul-2002 Etam Added section FoxAPI Version 5

8-Jul-2002 Chrys Format / style changes; added section breaks and headers

22-Oct-2002 Etam v2.2.5; used interface skeleton v1.11

6-Apr-2004 Kmillar v.2.2.6.x; updates for version 2.2.6.x and clarification of UserInt1, I/A string access and PI API/FoxAPI version requirements.

27-Apr-2004 Chrys 2.2.6.23 Rev A: Standardized content

24-May-2004 Kmillar 2.2.6.23 Rev B: Updated PI API version recommendations

5-Nov-2004 Kmillar 2.2.7.35: Updated PI API version recommendation to be the latest version. Added notes on available debug options.

19-Dec-2004 Mkelly Fixed headers and Footer. Added additional item for the ICU Control section of the manual. Updated as necessary for the latest interface skeleton manual.

25-Jan-2005 Kmillar Added comment about not being able to use Foxboro WP machines to run the interface. Converted slashes to dashes for all command-line parameters.

26-Jan-2005 Mkelly Added new screen shot of the ICU control to show two additional command-line parameters added. Sample batch file for Windows missing failover parameter.

18-Nov-2005 Kmillar Added support storing I/A object status (Location3=0) and Appendix E : FoxAPI Status Definition

5-Jan-2006 Janelle Version 2.3.1.44 Rev A: fixed headers and footers, updated How to Contact us page; alphabetized command line parameters; removed first person references; added the service id configuration information; added a sample fxbais.sh file; changed –host from optional to required, for use with the ICU; removed references to PI 2.

30-Jan-2006 Chrys Version 2.3.1.44 Rev B: Removed tracking; format changes

09-Mar-2006 Kmillar Add failover userint1 debug flag

14-Apr-2006 Janelle Version 2.3.2.45 Rev A: removed PI 2 references, updated manual to latest skeleton

Foxboro I/A 51 and 70 Series Interface to the PI System 163

Page 160: Foxboro I/A 51 and 70 Series Interface to the PI Systemcdn.osisoft.com/interfaces/958/PI_FXBAIS_2.3.8.66.doc · Web viewUse the Foxboro ICC Block manuals (B0193AX) for more information

Date Author Comments

5-Jul-2002 Etam Added section FoxAPI Version 5

20-Apr-2006 Mkelly Version 2.3.2.45 Rev B: Fixed headers and footers, updated ICU Control section with new screenshots for latest version of PI ICU, rearrange table for length in tag, ExDesc and InstrumentTag, reformatted sample batch file for both Window and Solaris to prevent wrapping of text.

15-Nov-2006 Prowe Version 2.3.2.45, Rev C; Updated manual to Skeleton v2.5.3, applied template and spell checked document

20-Apr-2007 Kmillar Version 2.3.3.39 Updates for UniInt 4.3.0.36 andPLI#11200OSI8 – clarify use of excdevPLI#13955OSI8 – starting FoxAPI in Appendix DPLI#13497OSI8 – workaround for running on I/A 8.2Added UniInt health points to Failover appendix.

8-Jun-2007 Janelle Version 2.3.3.39 Revision A: update hardware diagram, ICU screen shots

14-Jun-2007 Kmillar Version 2.3.3.39 Revision B: added SetDeviceStatus

26-Aug-2009 Kmillar Version 2.3.8.66 :Update to skeleton 3.0.9Rewrite the installation instructions for SolarisPLI#16604OSI8 – PI API v0 requiredPLI#15930OSI8 – Fix/clarify automatic startupPLI#15759OSI8 – Clarify location3/uht_id usagePLI#16950OSI8 – Clarify –foxapiname argumentPLI#15496OSI8 – Clarify failover watchdog objectPLI#15758OSI8 – Add failover status digital set textPLI#19626 – Clarify output point syntaxPLI#19572 – Clarify iorates for failover

1-Oct-2009 Mkelly Version 2.3.8.66, Revision A; Fixed headers, footers, and Hyperlinks. Reformatted tables, updated TOC.

28-Oct-2009 KMillar Version 2.3.8.66, Revision B; Fixed LD_LIBRARY_PATH definition in PI API installation section.

Foxboro I/A 51 and 70 Series Interface to the PI System 164