+ All Categories
Home > Documents > PI Interface for Foxboro I/A 51 Series and PI Interface for...

PI Interface for Foxboro I/A 51 Series and PI Interface for...

Date post: 12-Mar-2018
Category:
Upload: donguyet
View: 253 times
Download: 11 times
Share this document with a friend
231
PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series Version 2.4.0.x Rev C
Transcript
Page 1: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

PI Interface for Foxboro I/A 51 Seriesand PI Interface for Foxboro I/A 70 Series

Version 2.4.0.xRev C

Page 2: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

OSIsoft, LLC777 Davis St., Suite 250San Leandro, CA 94577 USATel: (01) 510-297-5800Fax: (01) 510-357-8136Web: http://www.osisoft.com

OSIsoft Australia • Perth, AustraliaOSIsoft Europe GmbH • Frankfurt, GermanyOSIsoft Asia Pte Ltd. • SingaporeOSIsoft Canada ULC • Montreal & Calgary, CanadaOSIsoft, LLC Representative Office • Shanghai, People’s Republic of ChinaOSIsoft Japan KK • Tokyo, JapanOSIsoft Mexico S. De R.L. De C.V. • Mexico City, MexicoOSIsoft do Brasil Sistemas Ltda. • Sao Paulo, Brazil

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series Copyright: © 1997-2013 OSIsoft, LLC. All 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, LLC.

OSIsoft, the OSIsoft logo and logotype, PI Analytics, PI ProcessBook, PI DataLink, ProcessPoint, PI Asset Framework(PI-AF), IT Monitor, MCN Health Monitor, PI System, PI ActiveView, PI ACE, PI AlarmView, PI BatchView, PI Data Services, PI Manual Logger, PI ProfileView, PI WebParts, ProTRAQ, RLINK, RtAnalytics, RtBaseline, RtPortal, RtPM, RtReports and RtWebParts are all trademarks of OSIsoft, LLC. All other trademarks or trade names used herein are the property of their respective owners.

U.S. GOVERNMENT RIGHTSUse, duplication or disclosure by the U.S. Government is subject to restrictions set forth in the OSIsoft, LLC license agreement and as provided in DFARS 227.7202, DFARS 252.227-7013, FAR 12.212, FAR 52.227, as applicable. OSIsoft, LLC.

Published: 02/2013

Page 3: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Table of Contents

Chapter 1. Introduction...................................................................................................1Reference Manuals............................................................................................2Supported Features...........................................................................................3Diagram of Hardware Connection......................................................................7

Chapter 2. Principles of Operation................................................................................9FoxAPI and AIM*API..........................................................................................9Overview............................................................................................................9Buffered Access.................................................................................................9Unbuffered Access...........................................................................................10Object Status...................................................................................................10Outputs............................................................................................................10

Chapter 3. Installation Checklist..................................................................................13Data Collection Steps.......................................................................................13Interface Diagnostics........................................................................................16Advanced Interface Features...........................................................................16

Chapter 4. Interface Installation on Windows.............................................................17Naming Conventions and Requirements..........................................................17Interface Directories.........................................................................................17

PIHOME Directory Tree.........................................................................17Interface Installation Directory...............................................................18

Interface Installation Procedure.......................................................................18FoxAPI / AIM*API Installation...........................................................................18Interface Installation Procedure.......................................................................19Installing Interface as a Windows Service........................................................21Installing Interface Service with PI Interface Configuration Utility....................21

Service Configuration............................................................................21Clearing and Resetting the FoxAPI / AIM*API Lists.........................................24Changing from FoxAPI to AIM*API..................................................................24Installing Interface Service Manually................................................................26Installing the Interface on Secure I/A Systems.................................................27

Chapter 5. Interface Installation on UNIX....................................................................28Naming Conventions and Requirements..........................................................28Interface Directories.........................................................................................29

PIHOME Directory.................................................................................29Interface Installation Directory...............................................................29

FoxAPI Installation...........................................................................................29PI API Installation Procedure...........................................................................30Interface Installation Procedure.......................................................................33

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 4: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Installing Multiple Instances of the Interface....................................................35Multiple Instances in a Single Directory.................................................35Multiple Instances in a Separate Directories..........................................36

Chapter 1. FoxAPI Test Program.................................................................................39

Chapter 6. Digital States...............................................................................................43

Chapter 7. PointSource.................................................................................................45

Chapter 8. PI Point Configuration................................................................................47Point Attributes.................................................................................................47

Tag........................................................................................................47PointSource...........................................................................................48PointType...............................................................................................48Location1...............................................................................................48Location2...............................................................................................49Location3...............................................................................................50Location4...............................................................................................50Location5...............................................................................................51InstrumentTag........................................................................................51ExcDev / ExcDevPercent.......................................................................51ExDesc..................................................................................................52UserInt1.................................................................................................56Scan......................................................................................................57Shutdown...............................................................................................57

Output Points...................................................................................................57Trigger Method 1 (Recommended)........................................................58Trigger Method 2...................................................................................58

Point Configuration Examples..........................................................................58Profile Points....................................................................................................59

Chapter 9. Startup Command File...............................................................................61Configuring the Interface with PI ICU...............................................................61

fxbais Interface page.............................................................................64Command-line Parameters..............................................................................69Sample fxbais.bat File......................................................................................75Sample fxbais.sh file........................................................................................75fxbais.ini Configuration File..............................................................................78

Chapter 10. Interface Node Clock..............................................................................81

Chapter 11. Security....................................................................................................83Windows and UNIX..........................................................................................83

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

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 5: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Stop Script.........................................................................................88Automatic startup and shutdown......................................................................88Automatic startup on a reboot..........................................................................88Terminating Background Processes................................................................89Anomalous Background Job Termination........................................................89

Chapter 14. Buffering..................................................................................................91Which Buffering Application to Use..................................................................91How Buffering Works.......................................................................................92Buffering and PI Server Security......................................................................92Enabling Buffering on an Interface Node with the ICU.....................................93

Choose Buffer Type...............................................................................93Buffering Settings..................................................................................94Buffered Servers....................................................................................96Installing Buffering as a Service.............................................................99

Configuring PI API Buffer Server (BufServ) Manually....................................102Buffering Settings................................................................................102BufServ and n-way buffering................................................................103Kernel Resource Configuration on Solaris...........................................105

Chapter 15. Interface Diagnostics Configuration...................................................109Scan Class Performance Points....................................................................109Configuring Performance Points on UNIX......................................................112Performance Counters Points On Windows...................................................112

Performance Counters.........................................................................114Performance Counters for both (_Total) and (Scan Class x)...............114Performance Counters for (_Total) only...............................................115Performance Counters for (Scan Class x) only....................................118

Interface Health Monitoring Points.................................................................119Configuring Interface Health Points Manually......................................120Interface Health Point Keywords..........................................................120

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

Configuring PI Point on the PI Server..................................................127Configuration on the Interface Node....................................................127

Interface Status Point.....................................................................................128

Appendix A. Error and Informational Messages....................................................131Message Logs................................................................................................131Messages.......................................................................................................132Extra Debugging Messages...........................................................................132List Event Counters and Location5................................................................134Common Problems........................................................................................134Operational Hints...........................................................................................139

Solaris/Unix..........................................................................................139Updates and HotFixes for the FoxAPI.................................................140Reading an Entire MCIN/MCOUT Block..............................................140Reading I/A Series Messages..............................................................141FoxAPI Configuration Settings (foxapi.cfg)..........................................141Time Difference Reported by the Interface..........................................143

System Errors and PI Errors..........................................................................143

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 6: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Table of Contents

Appendix B. PI SDK Options....................................................................................145

Appendix C. Failover Support..................................................................................147Parameters for Operation...............................................................................149Design Details................................................................................................152Operational Scenarios....................................................................................155Failover Installation Checklist.........................................................................157Miscellaneous Information on Failover...........................................................158

Appendix D. Notes on Upgrading from Previous Versions...................................161Required -host= argument.............................................................................161ExDesc keywords no longer supported..........................................................161PIHOME and LD_LIBRARY variables defined in /.cshrc................................161Install Procedure............................................................................................162

Appendix E. FoxAPI Configuration..........................................................................165

Appendix F. FoxAPI Status Definition.....................................................................167Status Definition for I/A Series Version 4.1 and Earlier..................................167Status Definition for I/A Series Version 4.2 and Later....................................168Storing Status Values in PI............................................................................169

Appendix G. Terminology.........................................................................................171

Appendix H. Technical Support and Resources....................................................175Before You Call or Write for Help.........................................................175Help Desk and Telephone Support......................................................175Search Support....................................................................................176Email-based Technical Support...........................................................176Online Technical Support.....................................................................176Remote Access....................................................................................177On-site Service....................................................................................177Knowledge Center...............................................................................177Upgrades.............................................................................................177OSIsoft Virtual Campus (vCampus).....................................................177

Appendix I. Revision History....................................................................................179

Page 7: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 1. Introduction

The PI Interface for Foxboro I/A 51 Series and the PI Interface for Foxboro I/A 70 Series (fxbais) provide 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 I/A 6.x or later) or Windows (70 Series I/A 8.2 or later) computers.

On Windows, the interface uses either the FoxAPI or the AIM*API to communicate with the I/A system. The interface must run directly on a Foxboro I/A AP or AW machine, where either the FoxAPI or the AIM*API software installed. It is compatible with “Secure” I/A systems as well as standard I/A.

As of I/A 8.8, the FoxAPI is no longer available and is replaced by the AIM*API. These APIs have the same functionality and are source code compatible, but require different executables. The interface setup kit for Windows includes executables for both FoxAPI and AIM*API, and the required executables are selected during the installation. The configuration of the interface and the PI points are the same for both the FoxAPI and AIM*API.

On Solaris, the interface uses the FoxAPI. Normally, the interface runs directly on a AP or AW machine, using the local FoxAPI.

There is also an option to allow the interface to be run on a generic Solaris machine which is not a part of the I/A system, using Foxboro netFoxAPI software. The 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. The fxbaisnet interface (included in the fxbais Solaris install kit) can then be run on the generic machine and access the I/A system. This option is only available on Solaris. The Windows version of the fxbais interface does not support networked access to the FoxAPI or AIM*API.

Note: The value of [PIHOME] variable for the 32-bit interface will depend on whether the interface is being installed on a 32-bit operating system (C:\Program Files\PIPC) or a 64-bit operating system (C:\Program Files (x86)\PIPC).

The value of [PIHOME64] variable for a 64-bit interface will be C:\Program Files\PIPC on the 64-bit operating system.

In this documentation [PIHOME] will be used to represent the value for either [PIHOME] or [PIHOME64]. The value of [PIHOME] is the directory which is the common location for PI client applications.

Note: Throughout this manual there are references to where messages are written by the interface which is the PIPC.log. This interface has been built against a UniInt version (4.5.0.59 and later) which now writes all its messages to the local PI Message log.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 8: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Please note that any place in this manual where it references PIPC.log should now refer to the local PI message log. Please see the document UniInt Interface Message Logging.docx in the %PIHOME%\Interfaces\UniInt directory for more details on how to access these messages.

Reference Manuals

OSIsoft PI Server manuals

PI API Installation Instructions 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)

Supported Operating Systems

Platforms 32-bit application 64-bit application

Windows XP32-bit OS Yes No

64-bit OS Yes (Emulation Mode) No

Windows 2003 Server32-bit OS Yes No

64-bit OS Yes (Emulation Mode) No

Windows Vista32-bit OS No No

64-bit OS No (Emulation Mode) No

Windows 2008 32-bit OS No No

Windows 2008 R2 64-bit OS Yes (Emulation Mode) No

Windows 732-bit OS Yes No

64-bit OS Yes (Emulation Mode) No

Windows 8 32-bit OS No No

64-bit OS No (Emulation Mode) No

Windows 2012 Server 64-bit OS No (Emulation Mode) No

Solaris 2.5.1 / 8 / 10 32-bit OS Yes No

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 9: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Supported Features

Feature Support

Interface Part Number PI-IN-FX-IA-SOL2 (Solaris)PI-IN-FX-IA-NTI (Windows)

Auto Creates PI Points 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 / Event Tags

Supports Questionable Bit Yes

Supports Multi-character PointSource Yes

Maximum Point Count Unlimited for the FoxAPI30,000 buffered points for the AIM*API

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

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 10: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Introduction

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 SDKThe PI SDK and the PI API are bundled together and must be installed on each 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.

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

Page 11: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 Interface for Foxboro I/A 70 Series requires

I/A 8.2 or later on an AW70/AP70 with either

o FoxAPI version 4.x.x, or

o AIM*API version 3.4.x or later

As of fxbais 2.4.0.x, the interface supports I/A running on Windows XP SP2 or later.

The versions of I/A before I/A 8.2 were released on older versions of Windows (NT4, XP and XP SP1). The fxbais 2.4.0.x interface cannot be used with these older versions. However, it is possible to use the older fxbais 2.3.8.66 interface with these older system.

The PI Interface for Foxboro I/A 51 Series (Solaris) requires

I/A 6.x or later on Solaris with FoxAPI version 4.x.x

Or

Generic Solaris SPARC machine with netFoxAPI version 4.x.x

It is highly recommended to use the latest version of the FoxAPI / AIM*API software that is available from Foxboro. The version installed by default older I/A systems may have known issues which have been resolved in the later versions.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 12: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Introduction

Note: The interface does NOT support running on a Windows machine with the netFoxAPI. On Windows platforms, the interface MUST be run directly on an AP/AW70 machine using the local FoxAPI / AIM*API.

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)

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:

o Process Alarms

o Sequence of Events

o Sequence Block

System Monitor

Operator Action Journal

are NOT supported.

Page 13: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Diagram of Hardware Connection

The 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”.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 14: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Introduction

Please note that PI FoxboroNet interface 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 the multiple netFoxAPI servers.

Page 15: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 2. Principles of Operation

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

FoxAPI and AIM*API

As of fxbais version 2.4.x.x, either the FoxAPI or the AIM*API are supported. On Windows platforms, different executables are installed depending on which of the APIs the interface is to use. The APIs have the same functionality and are source code compatible.

When this manual refers to the FoxAPI, it is implied that it is referring to either the FoxAPI or the AIM*API, depending on the executable being used. To check which executable is installed, either check the executable Properties/File Description, or run the executable with the -v argument.

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, FoxAPI control panel can be used.

Overview

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 Access

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 16: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Note: An ExcDev/ExcDevPercent value of zero should be avoided as the Foxboro system will always send an update to the I/A shared memory, regardless of whether the value has changed or not. The loading on the I/A system caused by these unnecessary updates can cause issues.

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 Access

Unbuffered 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 can only be accessed with unbuffered calls. These include all string objects. Care should be taken when using unbuffered access.

Object Status

When 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 F: 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.

Outputs

Outputs 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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 17: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 18: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 3. Installation Checklist

If 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 node regardless of how many interfaces run on that 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. If you are running the interface on an interface node, edit the PI Server’s Trust Table to allow the interface to write data.

3. Run the installation kit for the PI Interface Configuration Utility (ICU) on the interface node if the ICU will be used to configure the interface. This kit runs the PI SDK installation kit, which installs both the PI API and the PI SDK.

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 if necessary.

5. If you are running the interface on an interface node, check the computer’s time zone properties. An improper time zone configuration can cause the PI Server to reject the data that this interface writes.

6. Run the ICU and configure a new instance of this interface. Essential startup parameters for this interface are:

Point Source (/PS=x)Interface ID (/ID=#)PI Server (/Host=host:port) Scan Class (/F=##:##:##,offset)Enable Outputs (optional)

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 19: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

8. Build input tags and, if desired, output tags for this interface. Important point attributes and their purposes 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 pointsLocation3 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.ExDev specifies the delta that the value must change be before the CP will

notify the FoxAPI of the change. Care must be taken when using ExcDev=0 as this can overload an I/A system.

ExDesc can specify the Foxboro I/A object or various other special operations.

InstrumentTag specifies the Foxboro I/A object

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 (either Bufserv or PIBufss). When configuring buffering use the ICU menu item Tools Buffering… Buffering Settings to make a change to the default value (32678) for the Primary and Secondary Memory Buffer Size (Bytes) to 2000000. This will optimize the throughput for buffering and is recommended by OSIsoft.

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. Configure the interface to run as a Service. Confirm that the interface runs properly as a Service.

14. 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 the 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. If you are running the interface on an interface node, 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 20: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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=x)Interface ID (/ID=#)PI Server (/Host=host:port) Scan Class (/F=##:##:##,offset)Enable Outputs (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 pointsLocation3 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.ExDev specifies the delta that the value must change be before the CP will

notify the FoxAPI of the change. Care must be taken when using ExcDev=0 as this can overload an I/A system.

ExDesc can specify the Foxboro I/A object or various other special operations.

InstrumentTag specifies the Foxboro I/A object

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 21: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Installation Checklist

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 the section Interface Installation on UNIX.

Interface Diagnostics

1. Windows Only

a. Configure Scan Class Performance points.

b. Install the PI Performance Monitor Interface (Full Version only) on the interface node.

c. Configure Performance Counter points.

2. Configure UniInt Health Monitoring points

3. Configure the I/O Rate point.

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

5. Configure the Interface Status point.

Advanced Interface Features

1. Configure the interface for disconnected startup. Refer to the UniInt Interface User Manual for more details on UniInt disconnected startup.

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

Page 22: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 4. Interface Installation on Windows

OSIsoft recommends that interfaces be installed on interface nodes instead of directly on the PI Server node. An interface node is any node other than the PI Server node where the PI Application Programming Interface (PI API) is 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 interface node. Buffering refers to either PI API Buffer Server (Bufserv) or the PI Buffer Subsystem (PIBufss). For more information about Buffering see the Buffering chapter of this manual.

In most cases, interfaces on 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 Requirements

In 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 instance 1, fxbais2.exe and fxbais2.bat for instance 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 Tree

32-bit InterfacesThe [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.

For 32-bit operating systems, a typical pipc.ini file contains the following lines:[PIPC]PIHOME=C:\Program Files\PIPC

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 23: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

For 64-bit operating systems, a typical pipc.ini file contains the following lines:[PIPC]PIHOME=C:\Program Files (X86)\PIPC

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

Interface Installation Directory

The interface install kit will automatically install the interface to:PIHOME\Interfaces\fxbais\

PIHOME is defined in the pipc.ini file.

Interface Installation Procedure

The fxbais interface setup program uses the services of the Microsoft Windows Installer. Windows Installer is a standard part of Windows 2000 and later operating systems. To install, run the appropriate installation kit.

fxbais_#.#.#.#_.exe

FoxAPI / AIM*API Installation

Ensure 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 Control Panel can be selected to allow the FoxAPI to start on a reboot and to manually start or stop the FoxAPI process.

As of I/A 8.8, the AIM*API is installed by default in the D:\opt\aim\bin directory. The AIM*API process (apimgr.exe) is installed as a Windows service called the Aim API Manager Service. It can be started and stopped with the Windows Services control panel.

Ensure that the files open_action.bat and clsset_action.bat are present in the API 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 Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 24: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

FoxAPI / AIM*API Configuration

On startup, the FoxAPI or AIM*API reads its configuration from the foxapi.cfg or aimapi.cfg file. These are text files with a list of parameters and values.

For the interface to read from the I/A objects, there must be sufficient resources allocated by the FoxAPI or AIM*API.

The maxobj parameter defines the maximum number of object-connections. The interface requires an object-connect for each buffered pointed loaded. It is recommended to have maxobj significantly higher than the actual number of points to be loaded (1.5 - 2 times more).

For the FoxAPI, the maxobj range is 1000 to unlimited.

For the AIM*API, the maxobj range is 1000 to 30000.

If there are multiple interfaces configured to run, then the API must be configured to handle all the points from all the interfaces on the AW

To change the configuration file,

1) Stop the interface and any other API applications (historians etc.) running on the AW.

2) Stop the API processesFor FoxAPI, use either aisstop or FoxAPI control panelFor AIM*API, use either the AIM*AT control panel, orstop the AimAPI Network Service and the Aim API Manager Service.

3) Edit the foxapi.cfg file in the FoxAPI directory For FoxAPI, D:\opt\fox\ais\binFor AIM*API, D:\opt\aim\bin

4) Restart the API processes

5) Restart the interface and other API applications

Please refer to section FoxAPI/AIM*API Configuration Settings (foxapi.cfg/aimapi.cfg) for more information.

For details on the API parameters, refer to the Invensys I/A manuals

FoxAPI User Manual (B0193UD), Appendix H - Configuration File Parameters

AIM*API User Manual (B0193YN), Appendix J - Configuration File Parameters

Interface Installation Procedure

The 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 or AIM*API 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 25: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

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. Ensure that the FoxAPI (foxapi.exe) and AIM*API processes (apimgr.exe) are NOT running.

6. Delete the restore_index.dat files from the D:\opt\fox\ais\bin and D:\opt\aim\bin directories.Refer to Clearing and Resetting the FoxAPI / AIM*API Lists for more information.

7. Run the OSIsoft prerequisites install kit. The prerequisite install kit used depends on the version of Windows is running on the AW70.

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

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

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

10. Run the fxbais_#.#.#.#.exe install kit to install the interface and the fxbais ICU control. The install kit will prompt to select the feature to install. Select either the FoxAPI or the AIM*API, depending on the requirements.

Page 26: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 27: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

Installing Interface as a Windows Service

The 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 Utility

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

Page 28: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 name to indicate that the service is part of the OSIsoft suite of products.

Log on asThe Log on as text box shows the current “Log on as” Windows User Account of the interface service. Users may specify a different Windows User account for the service to use.

PI-fxbais service using the FoxAPIOn a standard installation, for the fxbais interface to be able to access the FoxAPI, it MUST be configured to use the local “Fox” user.

When running the interface on Secure I/A systems, refer to the “Installing the Interface on Secure I/A Systems” section.

PI-fxbais service using the AIM*APIWhen using AIM*API on I/A 8.8 or later, both the AIM API Manager Service (apimgr) and the fxbais interface should be run as “Local System”.

PasswordIf a Windows User account is entered in the Log on as text box, then a password must be provided in the Password text box, unless the account requires no password.

Confirm passwordIf a password is entered in the Password text box, 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.

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 29: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

PI-fxbais service using the FoxAPIThe FoxAPI process is run as a background process and is NOT a Windows service. Therefore, it is not possible to have the PI-fxbais interface service depend on the FoxAPI process. To work around this issue, when the fxbais interface starts, it will check that the FoxAPI is running before attempting accessing it.

PI-fxbais service using the AIM*APIOn I/A 8.8 or later, the AIM*API process is run as a Windows service called the Aim API Manager Service. Therefore, the AIM*API service (apimgr) should be added to the list of dependencies of the PI-fxbais service. This means that Windows will not allow the PI-fxbais service to run if the apimgr service is not running.

The PI-fxbais service will still check the status of the AIM*API before attempting to access it, as it does for the FoxAPI.

- 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, select 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.

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.

Page 30: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Start or Stop Service

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

Clearing and Resetting the FoxAPI / AIM*API Lists

Steps 5 and 6 of the Interface Installation Procedure are to ensure that when the interface is started for the first time, the FoxAPI or AIM*API does not have conflicting object manager lists when the interface data sets are opened. If this step is not done, it is possible for the interface to crash.

This step is only required when the interface is started for the first time, and is NOT required for a normal start of the interface.

The restore_index.dat files are used by the FoxAPI or AIM*API to map I/A objects to the internal indexes from previous runs of the APIs. This is so that objects will receive the same index if the AW70 is rebooted. When the client applications that are using the indexes are stopped, then there is no requirement for the restore_index.dat files. The files can be removed without any problems. When the interface and other applications are started, they will be recreated by the FoxAPI and AIM*API as required.

To safely remove the restore_index.dat file(s),

1) Stop the interface and any other FoxAPI/AIM*API applications (historians etc) running on the AW. During installation, the reboot with I/A Series OFF will mean that they are already stopped.

2) Stop the FoxAPI processes (aisstop or FoxAPI control panel) and the AIM*API processes (aisstop or AIM*API control panel)

3) Delete the restore_index.dat files from the API bin directories.FoxAPI on AW70 D:\opt\fox\ais\binAIM*API on AW70 D:\opt\aim\bin

4) Restart the FoxAPI processes (aisstop or FoxAPI control panel) and the AIM*API processes (aisstop or AIM*API control panel)

5) Restart the interface and other FoxAPI applications

The restore_index.dat files will be recreated by the FoxAPI and AIM*API as required.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Status of the ICU Service

installed or uninstalled

Status of the Interface Service

Page 31: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

Changing from FoxAPI to AIM*API

If the interface has been installed for one API and the other API is then required, there are two ways of changing the installation. Either uninstall the existing interface, or use the interface .msi file to modify the existing installation.

Uninstall

Use the Windows Control Panel “Add or Remove Programs” or “Programs and Features” to uninstall the “PI Interface for Foxboro IA (fxbais)” program. Do not uninstall any of the other OSIsoft programs. The uninstall will remove the interface files from the system, but the site specific .bat files will remain.

Run the fxbais_x.x.x.x_.exe installation kit. The interface will be marked for installation.

Follow the install prompts and selected the required API type when requested.

Modify

Extract the fxbais_x.x.x.x.msi file from the install kit. This is done by running the install kit and letting the self-extracting executable extract the files to a temporary directory and then exiting the installation. The extracted files should be located in the temporary directory, under an fxbais_x.x.x.x subdirectory.

Double click on the fxbais_x.x.x.x.msi. The setup program will prompt for Modify/Repair or Remove

Select Modify and Next. The setup program will then prompt for required API type.

Select the required API type, then Next and Install.

The installation will replace the existing interface files with the selected ones from the .msi file. The site specific .bat files will remain unchanged.

Page 32: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Installing Interface Service Manually

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

Note: In the following Windows Service Installtation Commands you may use either a slash (/) or dash (-) as the delimiter.

Windows Service Installation Commands on an Interface Node or a PI Server Node with 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 an Interface Node or a PI Server Node without 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 33: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

Installing the Interface on Secure I/A Systems

The fxbais interface will install and run on Secure I/A systems in much the same way as on standard I/A systems. The exception is the “Log on as” settings for the service.

If the fxbais interface service is configured with a user account without sufficient permissions to access the FoxAPI, then when the interface attempts to open a data set, the interface will fail with an error reterr=212.

The fxbais interface does not control the permissions that it is run with. The service will inherit the user credentials from the “Log on as” setting for the interface service. It depends on the FoxAPI or AIM*API having the configuration with the correct permissions to allow the interface to run.

The local “Fox” user can still be used on Secure I/A systems. Within the FoxAPI, the “Fox” user is granted full access.

If a real user account needs to be used, then the user must be granted access using the foxapi.tcp configuration file.

For example, if the fxbais interface was to be run by the domain user “IAManager”, then the /opt/fox/ais/bin/foxapi.tcp file would need to contain[Security_Access]

IAManager=System

Page 34: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 5. Interface Installation on UNIX

One 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 interface node? OSIsoft recommends that the interface be installed on a remote 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 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 interface node, it is also a good idea to install and run Bufserv on the 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 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 Requirements

In 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.sh.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 35: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

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

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

Interface Directories

PIHOME Directory

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

Interface Installation Directory

There are two conventions for the installation directory 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/fxbais3

and so on.

Create the installation directories as necessary.

FoxAPI Installation

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

Page 36: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

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/histlnbc

If 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 Procedure

In 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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 37: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

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.

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/build

sh ./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 Script

Page 38: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Setting 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.aInstalling 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.makNote: 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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 39: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

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

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 Procedure

The 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.4.0.18 (Solaris) UNIINT version @(#)uniint.cxx 4.3.5.4_UNIX API version 1.6.8.22

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

Page 40: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 $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:22

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 41: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

FXBAIS 1> Finished opening lists

25-May-09 15:18:24FXBAIS 1> Starting scans^CFxastop Stopping Foxboro I/A AIS interface (PI part) Can take about 5 sec per interface list to finish.. fxbais (1905) interface successfully stopped.

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 the 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 Interface

To 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 Directory

The 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

Page 42: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 interface

cp fxbais fxbais#cp fxbais.sh_new fxbais#.shcp fxastop fxastop#

b. 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: 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 the 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 43: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Installation on UNIX

Multiple Instances in a Separate Directories

The 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

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

Page 44: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 45: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 1. FoxAPI Test Program

The 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 as

LBUG01# /opt/fox/ais/bin/foxtst

On Windows, use a command such as

D:\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 22-gsnent

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 46: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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:300

When prompted, type:30

When 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 1The 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----- ------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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 47: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 48: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 6. Digital States

For 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 point. A digital point 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 points, regardless of type, to indicate the state of a point at a particular time. For example, if the interface receives bad data from the data source, 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 49: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 7. 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. If the PI API version being used is prior to 1.6.x or the PI Server version is prior to 3.4.370.x, the PointSource is limited to a single character unless the SDK is being used.

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 ship with PI are associated with default PointSource characters. The Totalizer Subsystem uses the PointSource character T, the Alarm Subsystem uses @ for Alarm Tags, G for Group Alarms and Q for SQC Alarm Tags, 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 50: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 8. PI Point Configuration

The PI point is the basic building block for controlling data flow to and from the PI Server. A single point is configured for each measurement value that needs to be archived.

Point Attributes

Use the point attributes below to define the PI point configuration for the interface, including specifically what data to transfer.

This document does not discuss the attributes that configure UniInt or PI Server processing for a PI point. Specifically, UniInt provides exception reporting and the PI Server provides data compression. Exception reporting and compression are very important aspects of data collection and archiving, which are not discussed in this document.

Note: See the UniInt Interface User Manual and PI Server documentation for information on other attributes that are significant to PI point data collection and archiving.

Tag

The Tag attribute (or tag name) 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 Length1.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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 51: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

PI API PI Server Maximum LengthBelow 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.

PointSource

The PointSource attribute contains 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 chapter.

PointType

Typically, device point types do not need to correspond to PI point types. For example, integer values from a device can be sent to floating-point or digital PI tags. Similarly, a floating-point value from the device can be sent to integer or digital PI tags, although the values will be truncated.

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.

Location1

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 52: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Location2

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

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 53: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

PI Point Configuration

Location3

The 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 can be stored in the PI database. The status is a bit mapped integer. The definitions of the bits are listed in Appendix E.

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

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

Page 54: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Location5

The 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 Length1.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.

ExcDev / ExcDevPercent

These attributes specify the exception deviation in engineering units. An event is sent to the PI Server if the PI point value changes by more than the exception deviation.

For buffered points (location2>0), the exception deviation is also used to specify the delta values used with the FoxAPI for the I/A object. The I/A controllers monitor the scanned objects, but will only send an update to the FoxAPI if the value has changed by more than the delta value. In this way, it is possible to filter noise from signals and reduce the load between the controller and the FoxAPI.

If the change in value exceeds the delta and the new value is sent to the FoxAPI, then the change will also be sufficient for the new value to be sent to the PI Server.

Note: An ExcDev/ExcDevPercent value of zero should be avoided as the Foxboro system will always send an update to the I/A shared memory on every scan (by default, is this every 0.5 seconds), regardless of whether the value has changed or not. The loading on the I/A system caused by these unnecessary updates can cause issues.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 55: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

PI Point Configuration

ExDesc

This 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 ExDesc attribute whose length is at most 80 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 Length1.6.0.2 or higher 3.4.370.x or higher 1023

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 ExDesc 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

Page 56: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 57: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

PI Point Configuration

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 Status0 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 Status0 No Alarms

1 Bad I/O

2 Out-of-Range

3 High-High Absolute

4 Low-Low Absolute

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 oolean parameters available in the different block types.

Page 58: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 Scan Class Performance 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='Sinusoid' 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.

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 59: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

PI Point Configuration

Event Condition

Description

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 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 the section Appendix A: Error and Informational Messages for details.

Page 60: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

Shutdown

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

Note: The SHUTDOWN events that are written by the PI Shutdown subsystem are independent of the SHUTDOWN events that are written by the interface when the -stopstat=Shutdown command-line 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 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 PIBufssIt 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 PI Server is down for maintenance, upgrades, backups, and unexpected failures. That is, when the PI Server 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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 61: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

PI Point Configuration

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. The only difference is that the trigger tag is specified with the SourceTag attribute instead of with the “event” or “trig” keywords. Otherwise, the behavior of event conditions described under Trigger-based Inputs is identical for output points.

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.

Trigger Method 2

For 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 Examples

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

Page 62: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 Points

If 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 points

profile array position points

profile discrete points

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

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 63: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

PI Point Configuration

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.

Page 64: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 9. Startup Command File

Command-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 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 fxbais 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 Host PI System, Point Source, and Interface ID#. A window such as the following results:

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 65: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 66: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 67: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 page

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

Configuration

The PI Interface for Foxboro I/A 70 Series - ICU Control 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

Page 68: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

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)

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 69: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Startup Command File

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.

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)

Page 70: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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)

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 71: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Startup Command File

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

Page 72: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Command-line Parameters

Parameter Description

-CacheModeRequired when using disconnected startupDefault: Not Defined

Required for disconnected startup operation. If defined, the -CacheMode startup parameter indicates that the interface will be configured to utilize the disconnected startup feature.

-CachePath=pathOptionalDefault: Not Defined

Used to specify a directory in which to create the point caching files. The directory specified must already exist on the target machine. By default, the files are created in the same location as the interface executable.If the path contains any spaces, enclose the path in quotes.Examples:-CachePath=D:\PIPC\Interfaces\CacheFiles-CachePath=D:/PIPC/Interfaces/CacheFiles-CachePath=D:/PIPC/Interfaces/CacheFiles/

Examples with space in path name:-CachePath="D:\Program Files\PIPC\MyFiles"-CachePath="D:/Program Files/PIPC/MyFiles"-CachePath="D:/Program Files/PIPC/MyFiles/"

-CacheSynch=#OptionalDefault: 250 ms

NOTE: Care must be taken when modifying this parameter. This value must be less than the smallest scan class period defined with the -f parameter. If the value of the -CacheSynch parameter is greater than the scan class value, input scans will be missed while the point cache file is being synchronized.The optional -CacheSynch=# startup parameter specifies the time slice period in milliseconds (ms) allocated by UniInt for synchronizing the interface point cache file with the PI Server. By default, the interface will synchronize the point cache if running in the disconnected startup mode. UniInt allocates a maximum of # ms each pass through the control loop synchronizing the interface point cache until the file is completely synchronized.Synchronization of the point cache file can be disabled by setting the value -CacheSynch=0. The minimum synchronization period when cache synchronization is enabled is 50ms Whereas, the maximum synchronization period is 3000ms (3s). Period values of 1 to 49 will be changed by the interface to the minimum of 50ms and values greater than 3000 will be set to the maximum interval value of 3000ms.Default: 250 msRange: {0, 50 – 3000} time in millisecondsExample: -CacheSynch=50 (use a 50ms interval) -CacheSynch=3000 (use a 3s interval) -CacheSynch=0 (do not synchronize the cache)

-doubtful=digstateOptional; 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 73: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Startup Command File

Parameter Description

-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, every interface that is running without -ec=# explicitly defined will write to the same I/O Rate point. Either explicitly define an event counter other than 1 for each instance of the interface or do not associate any I/O Rate points with event counter 1. Configuration of I/O Rate points is discussed in the section called I/O Rate Point.For interfaces that run on Windows nodes, subsequent instances of the -ec parameter may be used by specific interfaces to keep track of various input or output operations. Subsequent instances of the -ec parameter can be of the form -ec*, where * is any ASCII character sequence. For example, -ecinput=10, -ecoutput=11, and -ec=12 are legitimate choices for the second, third, and fourth event counter strings.

-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.##or-f=HH:MM:SS.##or-f=HH:MM:SS.##,hh:mm:ss.##

Required for reading scan-based inputs

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

Page 74: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Parameter Description

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) + offsetwhere 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 UniInt Interface User Manual.doc for more information on skipped or missed scans.Sub-second Scan ClassesSub-second scan classes can be defined on the command-line, such as-f=0.5 -f=00:00:00.1where 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,0Wall Clock SchedulingScan 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=xOptional

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 75: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Startup Command File

Parameter Description

-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 tags12 - Setup of tags used with the libprofplot.so library13 - Reading of data using libprofplot.so function calls15 - Time offset between the PI Server and the Interface16 - Verbose messages during point loading17 - Verbose messages during Interface shutdown18 - 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 outputs20 - Messages for unbuffered outputs21 - Messages for outputs in general24 - Detailed error status after an scopen() call25 - 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 interface28 - Log “Out of service” and “Return to Service” status messagesFor example, -fdb=16 will cause additional messages to be logged when a point is loaded by the interface.

-foxapiname=nameOptional

Obsolete as of Interface Version 2.4.0.x

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=hostRequired 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.

Page 76: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Parameter Description

-host=host:portRequired for Windows and UNIX

The -host parameter is used to specify the PI Home node. Host is the IP address of the PI Server 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. Nevertheless, if either the host or port is not specified, the interface will attempt to use defaults.

Examples:

The interface is running on a 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=xHighly 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 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 instance 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

-no_connect=digstateOptional; 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=xRequired

The -ps parameter specifies the point source for the interface. X is not case sensitive and can be any <single/multiple> character string. For example, -ps=P and -ps=p are equivalent. The length of X is limited to 100 characters by UniInt. X can contain any character except ‘*’ and ‘?’.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.If the PI API version being used is prior to 1.6.x or the PI Server version is prior to 3.4.370.x, the PointSource is limited to a single character unless the SDK is being used.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 77: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Startup Command File

Parameter Description

-sioOptional

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.

-stopstat=digstateor-stopstat

-stopstat only is equivalent to-stopstat="Intf Shut"

OptionalDefault = no digital state written at shutdown.

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 PI3 Server, digstate must be in the system digital state table. . UniInt will use the first occurrence of digstate found in the table.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 neither -stopstat nor -stopstat=digstate is specified on the command line, then no digital states will be written when the interface is shut down.Examples:-stopstat=shutdown-stopstat="Intf Shut"The entire digstate value must be enclosed within double quotes when there is a space in digstate.

-uht_id=#OptionalRequired if any type of failover other than UniInt Failover Phase 1 or 2 is supported.

The -uht_id=# command-line parameter is used to specify a unique ID for interfaces that are run in a redundant mode without using the UniInt failover mechanism. There are several OSIsoft interfaces that are UniInt based and implement their own version of failover. In order for health tag(s) to be configured to monitor a single copy of the Interface, an additional parameter is required. If the -uht_id=# is specified; only health tags with a Location3 value equal to # will be loaded. The value must be greater than zero.

-writeOptional

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.

Page 78: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Sample fxbais.bat File

On Windows, the following is an example startup command file:REM===========================================================================REMREM fxbais.batREM REM Startup file for PI Interface for Foxboro I/A 70 SeriesREMREM===========================================================================REMREM OSIsoft strongly recommends using PI ICU to modify startup files.REMREM Sample command lineREM.\fxbais /host=XXXXXX:5450 /ps=fxbais /id=1 /f=2,0 /f=2,1 /f=10REMREM End of fxbais.bat

Sample fxbais.sh file

On 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### ©Copyright OSIsoft, Inc. San Leandro, California 1998-2006## Revision# 1.0 18-Mar-98 cah Original

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 79: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Startup Command File

# 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# 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#if [ -f $WORKDIR/${PROG_NAME}.out ]; then

Page 80: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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” \ -f=2,0 -f=2,1 -f=10 \ > $WORKDIR/${PROG_NAME}.out 2>&1 &

VerifyStartexit 0# end

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 81: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Startup Command File

fxbais.ini Configuration File

The 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 C: Failover Support”.

Page 82: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

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 callsPI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 83: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Startup Command File

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

Page 84: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 10. Interface Node Clock

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 85: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 11. 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 Server, it writes a -999 error. See the section Appendix A: Error and Info r mational 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 86: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

See the PI System Management chapter in the PI Server manual for more details on security configuration.

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@quit

In place of piapimachine, put the name of the interface node as it is seen by the PI Server.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 87: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 12. 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 Service

If the interface was installed as 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 Service

If the interface was installed as service, it can be stopped at any time from PI ICU, the Services control panel or with the command:fxbais.exe -stop

The service can be removed by:fxbais.exe -remove

To stop the interface service with PI ICU, use the button on the PI ICU toolbar.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 88: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 13. 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 Script

As 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.sh

Output 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 Script

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 89: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

Automatic startup and shutdown

To 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 reboot

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 90: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 foxapps will run. You cannot define environment variables or other such things within the user_apps.dat file.

Terminating Background Processes

Normally, 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 fxbais

which produces output similar to:root 2527 1 09:55:27 pts/0 00:00:00 ./fxbais …

The second column is the pid of the process. That is, 2527 is the PID of the fxbais1.exe interface in the example above.

The process is then stopped by:kill 2527

The kill command sends the SIGTERM signal to the interface, causing the exit handler to be invoked.

Unless it cannot be avoided, do NOT stop the interface with kill -9 pid. The option -9 causes the SIGKILL signal to be sent to the interface. The exit handler cannot catch this signal. SIGKILL will immediately terminate the process 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 Termination

On some platforms, processes that are started in the background will be terminated if one types “control-c” in the same window that the job was started in. 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 91: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

Page 92: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 14. Buffering

Buffering 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 Use

You 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

all of the interfaces running on the interface node send data to the same PI Server or to the same PI collective; and

the Interface Node is running Windows XP SP2 or higher

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

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.

It is technically possible to run Bufserv on the PI Server Node. However, OSIsoft does not recommend this configuration.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 93: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

How Buffering Works

A 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 as 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 Security

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

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:

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 94: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Buffering Application Application Name field for PI TrustPI 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 ICU

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 95: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Buffering

Buffering Settings

There 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. OSIsoft recommends that these two memory buffer sizes should be increased to the maximum of 2000000 for the best buffering performance.

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.

Page 96: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 97: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Buffering

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. OSIsoft recommends that these two memory buffer sizes should be increased to the maximum of 2000000 for the best buffering performance.

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.

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 Servers

The 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.)

Page 98: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 99: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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:

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.

Page 100: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Installing Buffering as a Service

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 101: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Buffering

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.

Page 102: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 103: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 Settings

The following settings are available for PI API Buffering configuration:

Keywords Values Default DescriptionBUFFERING 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)

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

Page 104: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Keywords Values Default Description(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 buffering

To 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[BUFFEREDSERVERLIST]BUFSERV1=PI_PLANTBUFSERV2=PI_CORPHQ

The above would enable buffering for two separate (independent) PI servers.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 105: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Buffering

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

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=1

Page 106: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

BUF1SIZE=524288BUF2SIZE=524288SENDRATE=50MAXTRANSFEROBJS=5000

[BUFFEREDSERVERLIST]BUFSERV1=PISERVER_PRIBUFSERV2=PISERVER_SEC

[REPLICATEDSERVERLIST]REPSERV1=PISERVER_PRIREPSERV2=PISERVER_SEC

Kernel Resource Configuration on Solaris

To transfer the event data between the 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 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 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 107: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Buffering

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.

It is recommended that number of shared memory segments accessed be set to 20.

Use the following procedure the modify the kernel settings

Change to the /etc directorycd /etc

Make a backup copy of the current /etc/system filecp system system.fox_std

Edit the system file

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

Edit the parameterset shmsys:shminfo_shmseg=10

Page 108: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

to set shmsys:shminfo_shmseg=20

Add the following parametersset semsys:seminfo_semmap=20set semsys:seminfo_semmni=20

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

Save the changes

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 otherq 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 informix

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 109: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Buffering

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

Page 110: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Chapter 15. Interface Diagnostics Configuration

The PI 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.

Note: 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 page:

Scan Class Performance Points

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 111: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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:

Right-click the row for a particular Scan Class # to open the shortcut 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 112: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 Correct All.

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 the Scan Class # column.

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 box on the General page.

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.

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 113: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Diagnostics Configuration

SnapshotThe Snapshot column holds the snapshot value of each Performance Point that exists in PI. The Snapshot column is updated when the Performance Points page is selected, and when the interface is first loaded. You may have to scroll to the right to see the snapshots.

Configuring Performance Points on UNIX

Performance 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_id

where 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 insensitive. 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 Windows

When running as a Service or interactively, this interface exposes performance data via Windows Performance Counters. Such data include items like:

the amount of time that the interface has been running;

the number of points the interface has added to its point list;

the number of tags that are currently updating among others

There are two types or instances of Performance Counters that can be collected and stored in PI Points. The first is (_Total) which is a total for the Performance Counter since the interface instance was started. The other is for individual scan classes (Scan Class x) where x is a particular scan class defined for the interface instance that is being monitored.

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 for more information.

If there is no PI Performance Monitor Interface registered with the ICU in the Module Database for the PI Server the interface is sending its data to, you cannot use the ICU to create any interface instance’s Performance Counters Points:

Page 114: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

After installing the PI Performance Monitor Interface as a service, select this interface instance from the Interface drop-down list, then click Performance Counters in the parameter categories pane, and right-click on the row containing the Performance Counters Point you wish to create. This will open the shortcut menu:

Click Create to create the Performance Counters Point for that particular row. Click Create All to create all the Performance Counters Points listed which have a status of Not Created.

To see the current values (snapshots) of the created Performance Counters Points, right-click on any row and select Refresh Snapshots.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 115: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Diagnostics Configuration

Note: The PI Performance Monitor Interface – and not this interface – is responsible for updating the values for the Performance Counters Points in PI. So, make sure that the PI Performance Monitor Interface is running correctly.

Performance Counters

In the following lists of Performance Counters the naming convention used will be:

“PerformanceCounterName” (.PerformanceCounterPointSuffix)

The tagname created by the ICU for each Performance Counter point is based on the setting found under the Tools Options Naming Conventions Performance Counter Points. The default for this is “sy.perf.[machine].[if service] followed by the Performance Counter Point suffix.

Performance Counters for both (_Total) and (Scan Class x)

“Point Count” (.point_count)A .point_count Performance Counters Point is available for each scan class of this interface as well as an "(_Total)" for the interface instance.

The .point_count Performance Counters Point indicates the number of PI Points per scan class or the total number for the interface instance. This point is similar to the Health Point [UI_SCPOINTCOUNT] for scan classes and [UI_POINTCOUNT] for totals.

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.

“Scheduled Scans: % Missed” (.sched_scans_%missed)A .sched_scans_%missed Performance Counters Point is available for each scan class of this interface as well as an "(_Total)" for the interface instance.

The .sched_scans_%missed Performance Counters Point indicates the percentage of scans the interface missed per scan class or the total number missed for all scan classes since startup. A missed scan occurs if the interface performs the scan one second later than scheduled.

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.

“Scheduled Scans: % Skipped” (.sched_scans_%skipped)A .sched_scans_%skipped Performance Counters Point is available for each scan class of this interface as well as an "(_Total)" for the interface instance.

The .sched_scans_%skipped Performance Counters Point indicates the percentage of scans the interface skipped per scan class or the total number skipped for all scan classes since startup. A skipped scan is a scan that occurs at least one scan period after its scheduled time. This point is similar to the [UI_SCSKIPPED] Health Point.

Page 116: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

“Scheduled Scans: Scan count this interval” (.sched_scans_this_interval)A .sched_scans_this_interval Performance Counters Point is available for each scan class of this interface as well as an "(_Total)" for the interface instance.

The .sched_scans_this_interval Performance Counters Point indicates the number of scans that the interface performed per performance summary interval for the scan class or the total number of scans performed for all scan classes during the summary interval. This point is similar to the [UI_SCSCANCOUNT] Health Point.

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.

Performance Counters for (_Total) only

“Device Actual Connections” (.Device_Actual_Connections)The .Device_Actual_Connections Performance Counters Point stores the actual number of foreign devices currently connected and working properly out of the expected number of foreign device connections to the interface. This value will always be less than or equal to the Device Expected Connections counter.

“Device Expected Connections” (.Device_Expected_Connections)The .Device_Expected_Connections Performance Counters Point stores the total number of foreign device connections for the interface. This is the expected number of foreign device connections configured that should be working properly at runtime. If the interface can only communicate with 1 foreign device then the value of this counter will always be one. If the interface can support multiple foreign device connections then this is the total number of expected working connections configured for this interface.

“Device Status” (.Device_Status)The .Device_Status Performance Counters Point stores communication information about the interface and the connection to the foreign device(s). The value of this counter is based on the expected connections, actual connections and value of the -PercentUp command line option. If the device status is good then the value is ‘0’. If the device status is bad then the value is ‘1’. If the interface only supports connecting to 1 foreign device then the -PercentUp command line value does not change the results of the calculation. If for example the interface can connect to 10 devices and 5 are currently working then the value of the -PercentUp command line parameter is applied to determine the Device Status. If the value of the -PercentUp command line parameter is set to 50 and at least 5 devices are working then the DeviceStatus will remain good (that is, have a value of zero).

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 117: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Diagnostics Configuration

“Failover Status” (.Failover_Status)The .Failover_Status Performance Counters Point stores the failover state of the interface when configured for UniInt failover. The value of the counter will be ‘0’ when the interface is running as the primary interface in the failover configuration. If the interface is running in backup mode then the value of the counter will be '1'.

“Interface up-time (seconds)” (.up_time)The .up_time Performance Counters Point indicates the amount of time (in seconds) that this interface has been running. At startup the value of the counter is zero. The value will continue to increment until it reaches the maximum value for an unsigned integer. Once it reaches this value then it will start back over at zero.

“IO Rate (events/second)” (.io_rates)The .io_rates Performance Counters Point indicates the rate (in event per second) at which this interface writes data to its input tags. (As of UniInt 4.5.0.x and later this performance counters point will no longer be available.)

“Log file message count” (.log_file_msg_count)The .log_file_msg_count Performance Counters Point indicates the number of messages that the interface has written to the log file. This point is similar to the [UI_MSGCOUNT] Health Point.

“PI Status” (PI_Status)The .PI_Status Performance Counters Point stores communication information about the interface and the connection to the PI Server. If the interface is properly communicating with the PI Server then the value of the counter is ‘0’. If the communication to the PI Server goes down for any reason then the value of the counter will be ‘1’. Once the interface is properly communicating with the PI Server again then the value will change back to ‘0’.

“Points added to the interface” (.pts_added_to_interface)The .pts_added_to_interface Performance Counter Point indicates the number of points the interface has added to its point list. This does not include the number of points configured at startup. This is the number of points added to the interface after the interface has finished a successful startup.

“Points edited in the interface”(.pts_edited_in_interface)The .pts_edited_in_interface Performance Counters Point indicates the number of point edits the interface has detected. The interface detects edits for those points whose PointSource attribute matches the -ps= parameter and whose Location1 attribute matches the -id= parameter of the interface.

“Points Good” (.Points_Good)The .Points_Good Performance Counters Point is the number of points that have sent a good current value to PI. A good value is defined as any value that is not a system digital state value. A point can either be Good, In Error, or Stale. The total of Points Good, Points In

Page 118: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Error, and Points State will equal the Point Count. There is one exception to this rule. At startup of an interface, the Stale timeout must elapse before the point will be added to the Stale Counter. Therefore the interface must be up and running for at least 10 minutes for all tags to belong to a particular Counter.

“Points In Error” (.Points_In_Error)The .Points_In_Error Performance Counters Point indicates the number of points that have sent a current value to PI that is a system digital state value. Once a point is in the In Error count it will remain in the In Error count until the point receives a new, good value. Points in Error do not transition to the Stale Counter. Only good points become stale.

“Points removed from the interface” (.pts_removed_from_interface)The .pts_removed_from_interface Performance Counters Point indicates the number of points that have been removed from the interface configuration. A point can be removed from the interface when one of the point attributes is updated and the point is no longer a part of the interface configuration. For example, changing the PointSource, Location1, or Scan attribute can cause the tag to no longer be a part of the interface configuration.

“Points Stale 10(min)” (.Points_Stale_10min)The .Points_Stale_10min Performance Counters Point indicates the number of good points that have not received a new value in the last 10 minutes. If a point is Good, then it will remain in the good list until the Stale timeout elapses. At this time if the point has not received a new value within the Stale Period then the point will move from the Good count to the Stale count. Only points that are Good can become Stale. If the point is in the In Error count then it will remain in the In Error count until the error clears. As stated above, the total count of Points Good, Points In Error, and Points Stale will match the Point Count for the interface.

“Points Stale 30(min)” (.Points_Stale_30min)The .Points_Stale_30min Performance Counters Point indicates the number of points that have not received a new value in the last 30 minutes. For a point to be in the Stale 30 minute count it must also be a part of the Stale 10 minute count.

“Points Stale 60(min)” (.Points_Stale_60min)The .Points_Stale_60min Performance Counters Point indicates the number of points that have not received a new value in the last 60 minutes. For a point to be in the Stale 60 minute count it must also be a part of the Stale 10 minute and 30 minute count.

“Points Stale 240(min)” (.Points_Stale_240min)The .Points_Stale_240min Performance Counters Point indicates the number of points that have not received a new value in the last 240 minutes. For a point to be in the Stale 240 minute count it must also be a part of the Stale 10 minute, 30 minute and 60 minute count.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 119: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Diagnostics Configuration

Performance Counters for (Scan Class x) only

“Device Scan Time (milliseconds)” (.Device_Scan_Time)A .Device_Scan_Time Performance Counter Point is available for each scan class of this interface.

The .Device_Scan_Time Performance Counters Point indicates the number of milliseconds the interface takes to read the data from the foreign device and package the data to send to PI. This counter does not include the amount of time to send the data to PI. This point is similar to the [UI_SCINDEVSCANTIME] Health Point.

The ICU uses a naming convention such that the tag containing “(Scan Class 1)” (for example, "sy.perf.etamp390.E1 (Scan Class 1).device_scan _time") refers to scan class 1, “(Scan Class 2) refers to scan class 2, and so on.

“Scan Time (milliseconds)” (.scan_time)A .scan_time Performance Counter Point is available for each scan class of this interface.

The .scan_time Performance Counter Point indicates the number of milliseconds the interface takes to both read the data from the device and send the data to PI. This point is similar to the [UI_SCINSCANTIME] Health Point.

The ICU uses a naming convention such that the tag containing “(Scan Class 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.

Page 120: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Health Monitoring Points

Interface 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:

Right-click the row for a particular Health Point to display the shortcut menu:

Click Create to create the Health Point for that particular row. Click Create All to create all the Health Points.

To see the current values (snapshots) of the Health Points, right-click and select Refresh Snapshots.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 121: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Diagnostics Configuration

For some of the Health Points described subsequently, the interface updates their values at each performance summary interval (typically, 8 hours).

Configuring Interface Health Points Manually

The 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 frequencyLess 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 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.

Page 122: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

“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

[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. 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 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 log messages.

The interface updates the value of this point every 60 seconds. While the interface is running, the value of this point never decreases.

[UI_POINTCOUNT]The [UI_POINTCOUNT] Health Point counts number of PI tags loaded by the interface. This count includes all input, output, and triggered input tags. This count does NOT include any Interface Health tags or performance points.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 123: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Diagnostics Configuration

The interface updates the value of this point at startup, on change, and at shutdown.

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

The interface updates this point at the same frequency as the [UI_HEARTBEAT] point. 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. 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. The interface resets the value of this point to zero at each performance summary interval.

[UI_TRIGGERBVRATE]The [UI_TRIGGERBVRATE] 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. The interface resets the value of this point to zero at each performance summary interval.

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

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.

Page 124: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 125: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Diagnostics Configuration

[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_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_SCINDEVSCANTIME] 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.

I/O Rate Point

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

Page 126: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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:

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 127: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Diagnostics Configuration

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 in the Tagname box is the name of the I/O Rate tag.

Tag StatusThe Tag Status box 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 box 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 box is updated when the IORate page is selected, and when the interface is first loaded.

Page 128: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Create/SaveCreate the suggested I/O Rate tag with the tag name indicated in the Tagname box. Or Save any changes for the tag name indicated in the Tagname box.

DeleteDelete the I/O Rate tag listed in the Tagname box.

RenameAllow the user to specify a new name for the I/O Rate tag listed in the Tagname box.

Add to FileAdd the tag to the IORates.dat file with the event counter listed in the Event Counter box.

SearchAllow the user to search the PI Server for a previously defined I/O Rate tag.

Configuring I/O Rate Tags On UNIX

There 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 Server

Create an I/O Rate Tag with the following point attribute values.

Attribute ValuePointSource LAB

PointType float32

Compressing 0

ExcDev 0

Configuration on the Interface Node

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

Add a line in the iorates.dat file of the form:fxbais001, 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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 129: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Interface Diagnostics Configuration

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/pistop

nohup sh $PIHOME/bin/pistart

Determine that the shared memory server and the I/O Rates Monitor are running with the commands:ps –ef | grep ioshmsrv

ps –ef | grep iorates

Interface Status Point

The 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 Utility Interface for complete information on using the ISU. PI Interface Status Utility Interface runs only on a PI Server Node.

If you have used the ICU to configure the PI Interface Status Utility Interface 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 open the shortcut menu:

Page 130: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 open the shortcut menu and select Correct.

Note: The PI Interface Status Utility Interface – and not this interface – is responsible for updating the ISU tag. So, make sure that the PI Interface Status Utility Interface is running correctly.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 131: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Appendix A. Error and Informational Messages

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

Message Logs

The location of the message log depends upon the platform on which the interface is running. See the UniInt 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 loads points, messages are sent to the log if there are any problems with the configuration of the points.

If the UniInt -dbUniInt parameter is found in the command-line, then various informational messages are written to the log file.

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 132: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Messages

Extra Debugging Messages

Interface-levelThe 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 be 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

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,17

PI 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 xxx

where xxx is numeric PID.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 133: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 Interface

Because 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:52

FXBAIS 1> [mreaidx] Pitag (PITEST01_01:LC001_CTRL.MEAS) idx=92 status=0x223 val=40.925900 istat=0 changeCount=921

14-Jul-09 13:47:52

FXBAIS 1> ia_to_pi(): Pitag (PITEST01_01:LC001_CTRL.MEAS) drval= 40.9259 ival=0 istat=0 count=1

14-Jul-09 13:47:52

FXBAIS 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:11

FXBAIS 1> [uread] error=0, status 0x23, val=94.824608; Pitag (PITEST01_02:STATBITS001.RI01) istat=0

14-Jul-09 13:56:11

FXBAIS 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 U

14-Jul-09 13:56:20 NZST - Local: 1247579780 UTC: 1247536580

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 134: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Error and Informational Messages

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 Location5

If 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 Problems

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

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

Page 135: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

and search for libCrun.so.1.

libpiapi.so Open FailedA message similar told.so.1: fxbais: fatal: libpiapi.so: open failed: No such file or directory

indicates that the environment variable LD_LIBRARY_PATH is incorrectly set.

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/piapi

LBUG01# setenv LD_LIBRARY_PATH ${PIHOME}/lib

Log 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 $PIHOME

LBUG01# echo $LD_LIBRARY_PATH

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 136: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Error and Informational Messages

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 Crashes When Opening Lists (Data Sets)This can be caused by either the FoxAPI/AIM*API running out of resources, or by conflicting object manager lists.

To ensure that the FoxAPI/AIM*API has sufficient resources, refer to the FoxAPI/AIM*API Configuration Settings (foxapi.cfg/aimapi.cfg) section.

If an interface configuration is changed to load a different set of I/A objects, or the PI points are edited to read from different I/A objects, then the old I/A objects may still be using resources within the FoxAPI. The restore_index.dat file is used by the FoxAPI to store a list of objects accessed. When objects are removed, it is possible for them to remain in the restore_index.dat file and consume resources within the FoxAPI, after they are no longer required. To ensure that the old I/A objects are cleared from the FoxAPI, stop the FoxAPI and remove the restore_index.dat file.

The restore_index.dat file can also cause conflicts in the object manager lists, particularly if both the FoxAPI and the AIM*API are running on the same AW. Stopping the FoxAPI and/or AIM*API, removing the restore_index.dat files and restarting can fix these issues.

To remove the restore_index.dat file(s),

6) Stop the interface and any other FoxAPI/AIM*API applications (historians etc) running on the AW.

7) Stop the FoxAPI processes (aisstop or FoxAPI control panel) and the AIM*API processes (aisstop or AIM*API control panel)

Page 137: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

8) Delete the restore_index.dat files from the AIM bin directories.Solaris /opt/fox/ais/binFoxAPI on AW70 D:\opt\fox\ais\binAIM*API on AW70 D:\opt\aim\bin

9) Restart the FoxAPI processes (aisstop or FoxAPI control panel) and the AIM*API processes (aisstop or AIM*API control panel)

10) Restart the interface and other FoxAPI applications

The restore_index.dat files will be recreated by the FoxAPI and AIM*API as required.

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 fxbais

resulting inpiadmin 24776 24774 0 17:13:06 pts/8 0:01 fxbais -ps=F

Then,LBUG01# kill -9 24776

where 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/bin

touch open_action

chmod +x open_action

touch clsset_action

chmod +x clsset_action

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 138: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Error and Informational Messages

To create the files on Windows, from a command promptD:

cd \opt\fox\ais\bin

touch open_action.ksh

touch clsset_action.ksh

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.

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 (misconfigured or a CP is rebooting).

Operational Hints

The following information may be useful during the operation of the PI Foxboro Interface.

Solaris/Unix

The Solaris operating system is case sensitive. Thus, a file namedfxbais.tar.z

is not the same as

Page 139: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

fxbais.tar.Z

If 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.Z

If 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

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/piapi

To add to an existing environment variable (such as LD_LIBRARY_PATH):setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${PIHOME}/lib

To 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/piapi

export PIHOME

To add to an existing environment variable (such as LD_LIBRARY_PATH):LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PIHOME/lib

export LD_LIBRARY_PATH

To remove an environment variable (such as PIHOME):unset PIHOME

Updates and HotFixes for the FoxAPI

Foxboro 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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 140: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Error and Informational Messages

“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 QF1005118I/A 6.5.1 Windows NT QF1005127I/A 7.1 Solaris 8 QF1005113I/A 7.1 Windows XP QF1005128

Reading an Entire MCIN/MCOUT Block

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

Page 141: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Reading I/A Series Messages

The Interface does not support the reading of I/A Series Messages.

For example, messages such as

Control Station Generated:o Process Alarmso Sequence of Eventso Sequence Block

System Monitor Operator Action Journal

are not supported.

FoxAPI/AIM*API Configuration Settings (foxapi.cfg/aimapi.cfg)

The FoxAPI/AIM*API has a number of configurations settings that can be used to tune the resources and performance of the API. These settings are stored in the text file /opt/fox/ais/bin/foxapi.cfg (UNIX FoxAPI)

D:\opt\fox\ais\bin (Windows FoxAPI)

D:\opt\aim\bin (Windows AIM*API)

Normally, the FoxAPI and the fxbais interface will work together without requiring any changes to the FoxAPI configuration file.

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.

However, depending on the number of points loaded by the interface, or the loading on the I/A system, it may be necessary to edit some of the parameters.

maxobjOn startup, the FoxAPI / AIM*API processes allocate resources based on the maxima values specified in the configuration file. Most of the maxima values are sufficient for most normal operations.

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 API 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 API 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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 142: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Error and Informational Messages

maxobj = 10000

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

maxdsThis defines the maximum number of datasets. The default is 100. The range is 3 to 1000. The number of datasets that the interface will open is the number of unique values in the location2 attribute for the points in the interface. The default 100 datasets is usually sufficient.

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

Page 143: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

Increasing 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 Interface

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

System Errors and PI Errors

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

Error Descriptions on 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_number

UNIX: /PI/adm/pidiag –e error_number

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 144: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Appendix B. PI SDK Options

To access the PI SDK settings for this interface, select this interface from the Interface drop-down list and click UniInt – PI SDK in the parameter category pane.

Disable PI SDKSelect Disable PI SDK to tell the interface not to use the PI SDK. If you want to run the interface in disconnected startup mode, you must choose this option.

The command line equivalent for this option is -pisdk=0.

Use the Interface’s default settingThis selection has no effect on whether the interface uses the PI SDK. However, you must not choose this option if you want to run the interface in disconnected startup mode.

Enable PI SDKSelect Enable PI SDK to tell the interface to use the PI SDK. Choose this option if the PI Server version is earlier than 3.4.370.x or the PI API is earlier than 1.6.0.2, and you want to use extended lengths for the Tag, Descriptor, ExDesc, InstrumentTag, or PointSource point attributes. The maximum lengths for these attributes are:

Attribute Enable the Interface to use the PI SDK

PI Server earlier than 3.4.370.x or PI API earlier than 1.6.0.2, without the use of the PI SDK

Tag 1023 255

Descriptor 1023 26

ExDesc 1023 80

InstrumentTag 1023 32

PointSource 1023 1

However, if you want to run the interface in disconnected startup mode, you must not choose this option.

The command line equivalent for this option is -pisdk=1.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 145: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Appendix C. 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.

However, should the Primary program terminate, the Secondary program automatically assumes responsibility for transferring data between the I/A and PI.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 146: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 147: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

on one machine and

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 148: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Failover Support

$ 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=LBUG02

fail_time=2

watchdog=PI_COMM:PI_WATCHDOG.LI01

failover_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 LBUG02

Alternatively, specify an IP address (in dotted-decimal form) for the failover_peer value.

[fxbais-1]

failover_peer=151.128.8.65

Confirm the communication between the two machines via TCP/IP by running ping.

$ ping 151.128.8.65

The 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 (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.

Page 149: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 contain

syfxbais.in1,31

syfxbais.out1,32

and on the Secondary machine, the iorates.dat file may contain

syfxbais.in2,31

syfxbais.out2,32

Note 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 file

syfxbais.in1,31

syfxbais.out1,32

syfxbais.in2,33

syfxbais.out2,34

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 150: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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=1

and secondary interface would be started with

-failover=secondary –uht_id=2.

The value used must be greater than zero and must match the location3 value for that PI tags.

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.

Page 151: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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_PRI

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 152: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Failover Support

and the secondary interface node, fxbais.ini man contain

[fxbais-1]

failover_status=FX_FAILOVER_SEC

The failover status points should be created with the following attributes,

Attribute DetailsTag 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 State Text Meaning0 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.

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.

Page 153: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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

Operational Scenarios

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 154: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Failover Support

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.

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.

Page 155: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 SecondaryThis scenario is the same as the sequence of scenarios 2 and 6.

8 - Power Outage and Recovery; Secondary Re-starts much Earlier than the PrimaryThis 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.

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 156: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Failover Support

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.

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]

Page 157: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

... 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=5500

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 158: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Appendix D. Notes on Upgrading from Previous Versions

Required -host= argument

Previously, 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 supported

When 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 /.cshrc

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

Also, to simplify the commands, the $PIHOME/bin directory can also be added to the PATH.

For example,

setenv PIHOME /opt/piapi

setenv LD_LIBRARY_PATH ${PIHOME}/libPI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 159: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

setenv 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 services

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

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 160: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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_old

cd $PIHOME/interfaces/fxbaismv fxbais.sh fxbais.sh_old

5. Copy the template fxbais.sh_new file to fxbais.sh

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 161: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Appendix E. 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

1. (QF002437) New method of reporting “Bad” status for points

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

2. (QF002437) Increased speed in making connections to points

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

3. 4. (QF002437) A point name will always have the same index

This 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 versions prior to 2.2.6.x are 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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 162: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Appendix F. 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 Earlier

Bit 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).

Bits 16 to 31 Reserved

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 163: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Status Definition for I/A Series Version 4.2 and Later

Bit 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

For example, a status of 0x23 corresponds to binary

0000 0000 0010 0011

The 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 0011

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 164: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 PI

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

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 165: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Appendix G. Terminology

To 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 Servers however it does not guarantee identical archive records since point compressions attributes 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 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 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 Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 166: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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.

PIHOMEPIHOME refers to the directory that is the common location for PI 32-bit client applications.

A typical PIHOME on a 32-bit operating system is C:\Program Files\PIPC.

A typical PIHOME on a 64-bit operating system is C:\Program Files (x86)\PIPC.

PI 32-bit interfaces reside in a subdirectory of the Interfaces directory under PIHOME.

For example, files for the 32-bit Modbus Ethernet Interface are in

[PIHOME]\PIPC\Interfaces\ModbusE.

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

PIHOME64PIHOME64 is found only on a 64-bit operating system and refers to the directory that is the common location for PI 64-bit client applications.

A typical PIHOME64 is C:\Program Files\PIPC.

PI 64-bit interfaces reside in a subdirectory of the Interfaces directory under PIHOME64.

For example, files for a 64-bit Modbus Ethernet Interface would be found in

C:\Program Files\PIPC\Interfaces\ModbusE.

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

PI Message LogThe PI message log is the file to which OSIsoft interfaces based on UniInt 4.5.0.x and later write informational, debug and error messages. When a PI interface runs, it writes to the local PI message log. This message file can only be viewed using the PIGetMsg utility. See the UniInt Interface Message Logging.docx file for more information on how to access these messages.

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 Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 167: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

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 interface node.

Pipc.logThe pipc.log file is the file to which OSIsoft applications write informational and error messages. When 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.

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.

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 168: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Appendix H. Technical Support and Resources

You can read complete information about technical support options, and access all of the following resources at the OSIsoft Technical Support Web site:

http://techsupport.osisoft.com (http://techsupport.osisoft.com)

Before You Call or Write for Help

When you contact OSIsoft Technical Support, please provide:

Product name, version, and/or build numbers

Computer platform (CPU type, operating system, and version number)

The time that the difficulty started

The log file(s) at that time

Help Desk and Telephone Support

You can contact OSIsoft Technical Support 24 hours a day. Use the numbers in the table below to find the most appropriate number for your area. Dialing any of these numbers will route your call into our global support queue to be answered by engineers stationed around the world.

Office Location Access Number Local Language OptionsSan Leandro, CA, USA 1 510 297 5828 English

Philadelphia, PA, USA 1 215 606 0705 English

Johnson City, TN, USA 1 423 610 3800 English

Montreal, QC, Canada 1 514 493 0663 English, French

Sao Paulo, Brazil 55 11 3053 5040 English, Portuguese

Frankfurt, Germany 49 6047 989 333 English, German

Manama, Bahrain 973 1758 4429 English, Arabic

Singapore 65 6391 181186 021 2327 8686

English, MandarinMandarin

Perth, WA, Australia 61 8 9282 9220 English

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 169: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Support may be provided in languages other than English in certain centers (listed above) based on availability of attendants. If you select a local language option, we will make best efforts to connect you with an available Technical Support Engineer (TSE) with that language skill. If no local language TSE is available to assist you, you will be routed to the first available attendant.

If all available TSEs are busy assisting other customers when you call, you will be prompted to remain on the line to wait for the next available TSE or else leave a voicemail message. If you choose to leave a message, you will not lose your place in the queue. Your voicemail will be treated as a regular phone call and will be directed to the first TSE who becomes available.

If you are calling about an ongoing case, be sure to reference your case number when you call so we can connect you to the engineer currently assigned to your case. If that engineer is not available, another engineer will attempt to assist you.

Search Support

From the OSIsoft Technical Support Web site, click Search Support.

Quickly and easily search the OSIsoft Technical Support Web site’s Support Solutions, Documentation, and Support Bulletins using the advanced MS SharePoint search engine.

Email-based Technical Support

[email protected]

When contacting OSIsoft Technical Support by email, it is helpful to send the following information:

Description of issue: Short description of issue, symptoms, informational or error messages, history of issue

Log files: See the product documentation for information on obtaining logs pertinent to the situation.

Online Technical Support

From the OSIsoft Technical Support Web site, click Contact us > My Support > My Calls.

Using OSIsoft’s Online Technical Support, you can:

Enter a new call directly into OSIsoft’s database (monitored 24 hours a day)

View or edit existing OSIsoft calls that you entered

View any of the calls entered by your organization or site, if enabled

See your licensed software and dates of your Service Reliance Program agreements

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 170: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Remote Access

From the OSIsoft Technical Support Web site, click Contact Us > Remote Support Options.

OSIsoft Support Engineers may remotely access your server in order to provide hands-on troubleshooting and assistance. See the Remote Access page for details on the various methods you can use.

On-site Service

From the OSIsoft Technical Support Web site, click Contact Us > On-site Field Service Visit.

OSIsoft provides on-site service for a fee. Visit our On-site Field Service Visit page for more information.

Knowledge Center

From the OSIsoft Technical Support Web site, click Knowledge Center.

The Knowledge Center provides a searchable library of documentation and technical data, as well as a special collection of resources for system managers. For these options, click Knowledge Center on the Technical Support Web site.

The Search feature allows you to search Support Solutions, Bulletins, Support Pages, Known Issues, Enhancements, and Documentation (including user manuals, release notes, and white papers).

System Manager Resources include tools and instructions that help you manage: Archive sizing, backup scripts, daily health checks, daylight savings time configuration, PI Server security, PI System sizing and configuration, PI trusts for interface nodes, and more.

Upgrades

From the OSIsoft Technical Support Web site, click Contact Us > Obtaining Upgrades.

You are eligible to download or order any available version of a product for which you have an active Service Reliance Program (SRP), formerly known as Tech Support Agreement (TSA). To verify or change your SRP status, contact your Sales Representative or Technical Support (http://techsupport.osisoft.com / ) for assistance.

OSIsoft Virtual Campus (vCampus)

The OSIsoft Virtual Campus (vCampus) Web site offers a community-oriented program that focuses on PI System development and integration. The Web site's annual online subscriptions provide customers with software downloads, resources that include a personal development PI System, online library, technical webinars, online training, and community-oriented features such as blogs and discussion forums.

OSIsoft vCampus is intended to facilitate and encourage communication around PI programming and integration between OSIsoft partners, customers and employees. See the

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 171: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Technical Support and Resources

OSIsoft vCampus Web site, http://vCampus.osisoft.com (http://vCampus.osisoft.com) or contact the OSIsoft vCampus team at [email protected] for more information.

Page 172: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Appendix I. Revision History

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

Page 173: PI Interface for Foxboro I/A 51 Series and PI Interface for ...cdn.osisoft.com/interfaces/3243/PI_FXBAIS_2.4.0.22.docx · Web viewThe interface setup kit for Windows includes executables

Date Author Comments

PI Interface for Foxboro I/A 51 Series and PI Interface for Foxboro I/A 70 Series

05-Jul-2002 ETam Added section FoxAPI Version 5

08-Jul-2002 Chrys Format / style changes; added section breaks and headers

22-Oct-2002 ETam v2.2.5; used interface skeleton v1.11

06-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

05-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

05-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

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.

08-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: Updated to skeleton 3.0.9.Rewrite 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

01-Oct-2009 MKelly Version 2.3.8.66, Revision A; Fixed headers, footers, and Hyperlinks. Reformatted tables, updated TOC.


Recommended