PI_Citect

  • Upload
    rzaabs

  • View
    168

  • Download
    1

Embed Size (px)

Citation preview

Citect Interface to the PI System

Version 2.6.2.9 Revision I

How to Contact UsOSIsoft, Inc.777 Davis St., Suite 250 San Leandro, CA 94577 USA

Worldwide Offices OSIsoft AustraliaPerth, Australia Auckland, New Zealand

Telephone(01) 510-297-5800 (main phone) (01) 510-357-8136 (fax) (01) 510-297-5828 (support phone) [email protected] Houston, TX Johnson City, TN Mayfield Heights, OH Phoenix, AZ Savannah, GA Seattle, WA Yardley, PA

OSI Software GmbHAltenstadt, Germany

OSI Software Asia Pte Ltd.Singapore

OSIsoft Canada ULCMontreal, Canada

OSIsoft, Inc. Representative OfficeShanghai, Peoples Republic of China

OSIsoft Japan KKTokyo, Japan

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

Sales Outlets and Distributors Brazil Middle East/North Africa Republic of South Africa Russia/Central Asia South America/Caribbean Southeast Asia South Korea Taiwan

WWW.OSISOFT.COMOSIsoft, Inc. is the owner of the following trademarks and registered trademarks: PI System, PI ProcessBook, Sequencia, Sigmafine, gRecipe, sRecipe, and RLINK. All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Any trademark that appears in this book that is not owned by OSIsoft, Inc. is the property of its owner and use herein in no way indicates an endorsement, recommendation, or warranty of such partys products or any affiliation with such party of any kind. RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 Unpublished rights reserved under the copyright laws of the United States. 1997-2008 OSIsoft, Inc. PI_Citect.doc

Table of ContentsIntroduction....................................................................................................................1 Reference Manuals..................................................................................................................1 Supported Features.................................................................................................................2 Diagram of Hardware Connection............................................................................................5 Principles of Operation.................................................................................................8 Input Points..............................................................................................................................8 Output Points...........................................................................................................................8 Installation Checklist...................................................................................................10 Interface Installation....................................................................................................11 Naming Conventions and Requirements...............................................................................11 Interface Directories...............................................................................................................11 The PIHOME Directory Tree..............................................................................................11 Interface Installation Directory............................................................................................12 Interface Installation Procedure.............................................................................................12 Installing the Citect API DLL files...........................................................................................12 Installing the Interface as an Windows Service.....................................................................13 Installing the Interface Service with PI Interface Configuration Utility................................13 Installing the Interface Service Manually............................................................................16 Communication Test Programs..................................................................................17 Testing the Connection to PI..................................................................................................17 Testing the Connection to Citect............................................................................................17 Connecting to Citect...........................................................................................................17 Reading Points...................................................................................................................18 Writing Points.....................................................................................................................18 Digital States................................................................................................................20 Interface Status Tag...............................................................................................................20 PI Point Configuration.................................................................................................23 Point Attributes.......................................................................................................................23Citect Interface to the PI System

iii

Table of Contents Tag.....................................................................................................................................23 PointSource........................................................................................................................23 PointType...........................................................................................................................23 Location1............................................................................................................................23 Location2............................................................................................................................24 Location3............................................................................................................................24 Location4............................................................................................................................24 Location5............................................................................................................................24 InstrumentTag....................................................................................................................24 ExcDesc.............................................................................................................................25 Scan ..................................................................................................................................25 Zero/Span..........................................................................................................................26 Shutdown...........................................................................................................................26 Output Points.........................................................................................................................27 Trigger Method 1 (Recommended)...................................................................................27 Trigger Method 2................................................................................................................27 Performance Point Configuration...............................................................................28 Configuring Performance Points with PI ICU (Windows).......................................................28 Configuring Performance Points Manually.............................................................................29 I/O Rate Tag Configuration..........................................................................................30 Monitoring I/O Rates on the Interface Node..........................................................................30 Configuring I/O Rate Tags with PI ICU (Windows).................................................................30 Configuring I/O Rate Points Manually....................................................................................32 Configuring the PI Point on the PI Server..........................................................................32 Configuration on the Interface Node..................................................................................32 Startup Command File.................................................................................................34 Configuring the Interface with PI ICU.....................................................................................34 citect Interface Tab.............................................................................................................36 Command-line Parameters....................................................................................................41 Sample PI_Citect.bat File...................................................................................................46 Interface Failover Configuration.................................................................................47 Examples...............................................................................................................................47 Interface Watchdog Configuration and StartService............................................49 Interface Node Clock...................................................................................................50iv

Security.........................................................................................................................51 Windows ...............................................................................................................................51 Starting / Stopping the Interface.................................................................................53 Starting Interface as a Service...............................................................................................53 Stopping Interface Running as a Service...............................................................................53 Buffering.......................................................................................................................54 Configuring Buffering with PI ICU (Windows).........................................................................54 Configuring Buffering Manually..............................................................................................57 Example piclient.ini File..........................................................................................................59 Appendix A: Error and Informational Messages.......................................................60 Message Logs........................................................................................................................60 Interface Messages................................................................................................................60 System Errors and PI Errors..................................................................................................61 Appendix B: Point Builder Utility................................................................................63 Configuration Tab...............................................................................................................64 Digital Sets Tab..................................................................................................................67 Point Builder Tab................................................................................................................71 Revision History...........................................................................................................72

Citect Interface to the PI System

v

IntroductionThe PI Citect Interface provides communication between PI and Citect. It is based on a version of the OSIsoft standard Universal Interface (UniInt), adapted for the Citect environment. Data is transferred between Citect and PI via the Citect application programming interface (CTAPI) and the PI API. The interface runs on Microsoft Windows NT 4.0 (service pack 3) or greater. The interface supports input tags (from Citect to PI) and output tags (from PI to Citect). It counts the events to and from these tags, including exception tests, and sends its totals periodically to PI. Data from Citect is received at cyclic frequencies or by exception in the data. The frequency of the cycles is configured by the user and controlled by the interface. The number of tags that the interface is capable of servicing is limited only by external limitations, for example, the amount of available memory in the computer. Changes that are made to the PI point database are reflected in the interface. This includes the adding, editing and deleting of tags. All error information and some summary information are output to a log file. If the interface is run interactively from an MS-DOS prompt, then the output is displayed on the screen. The amount of summary information that is output is configurable by the user and is minimal by default. For information about configuring information messages, see the /db and /df headings of the Startup Command File. For the interface to be able to connect to the Citect database, the Citect node must have sufficient API licenses available. The number of Citect licenses available is shown in the General window of the Citect Kernel utility. Note that with earlier versions of Citect (before 5.40), Citect included 2 API licenses by default. As of version 5.40, the Citect API licenses (also known as Connection licenses) must be explicitly included. Citect Clusters Starting with Citect version 7.0 all servers need to be assigned to a Citect cluster. When referencing Citect points (see the InstrumentTag attribute), the Citect point name can be prefixed with the cluster name, i.e. .. If only one Citect cluster is defined on site, the use of the Cluster prefix is optional. If multiple clusters are defined in an environment, the cluster prefix must be specified. Each instance of the PI Citect interface can only connect to one Citect Server regardless whether the server is a clustered server or not. To connect to a pair of Citect servers in a Reliable Clustering configuration, two interface instances configured in failover mode are required. Both servers must be located in the same Operational or Ad-Hoc Cluster.

Reference ManualsOSIsoft Citect Interface to the PI System

UniInt Interface User Manual PI Data Archive Manual1

Introduction Vendor Citect Users Guide Version 5 or later Citect Getting Started PI API Installation Instructions PI ICUUserManual.doc

Supported FeaturesFeature Part Number *Platforms APS Connector Point Builder Utility ICU Control PI Point Types Sub-Second Timestamps Sub-Second Scan Classes Automatically Incorporates PI Point Attribute Changes Exception Reporting Outputs from PI Inputs to PI: Scan-Based / Unsolicited / Event Tags Supports Questionable Bit Supports Multi-character PointSource Maximum Point Count *Uses PI SDK PINet String Support * Source of Timestamps History Recovery * Fail over * UniInt-based Disconnected Startup * Set Device Status * Vendor Software Required on PI Interface Node * Vendor Software Required on Foreign Device Vendor Hardware Required * Additional PI Software Included with Interface Serial Based Interface2

Support PI-IN-CI-CITEC-NTI Windows NT4, 2000, XP, 2003 No Yes Yes real, digital, integer, string Yes Yes Yes Yes Yes Scan-based / Event Tags No Yes Unlimited No N/A PI Interface No Yes Yes Yes Yes Yes Yes No Yes No

* See paragraphs below for further explanation. Platforms The Interface is designed to run on the above mentioned Microsoft Windows operating systems and greater. For NT4.0 it requires SP3 or greater. Uses PI SDK The PI SDK and the PI API are bundled together and must be installed on each PI Interface node. This Interface does not specifically make PI SDK calls. Source of Timestamps Timestamps are generated within the interface. If the scan class is sub-second, then subsecond timestamps will be used. UniInt-based UniInt stands for Universal Interface, and it is an OSIsoft-developed template used to create many of our interfaces. UniInt is not a separate product or file, it is solely a template used by our developers, and is integrated into the interface. The purpose of UniInt is to keep a consistent feature set and behavior across as many of our interfaces as possible. It also allows for the very rapid development of new interfaces. UniInt is constantly being upgraded with new options and features. In any UniInt interface, UniInt uses some of the supplied configuration parameters, and some parameters are interfacespecific features of the interface. The UniInt Interface User Manual is a supplement to this manual. Set Device Status The PI Citect Interface is built with UniInt 4.3.0.36. New functionality has been added to support health tags. The Health tag with the point attribute Exdesc = [UI_DEVSTAT], is used to represent the status of the connection to the Citect system. The following events can be written into the tag: a) "1 | Starting" - the interface is starting b) "2 | Connected/No Data" - the interface is part of a failover pair and is not currently active. c) " 3 | 1 device(s) in error | Not connected to Citect" - the interface is unable to connect to the Citect system. d) "Good" - the interface is scanning the Citect system for data. e) 4 | Intf Shutdown interface has shutdown. Please refer to the UniInt Interface User Manual.doc file for more information on how to configure health points. Failover This interface supports an interface-specific failover mechanism. The UniInt-based failover is not supported. Two instances of the interface can run to collect data for the same set of PI tags. Using a command-line parameter, one instance is defined as the primary and the other as the secondary. They both may run on the same machine, or on different machines. They useCitect Interface to the PI System 3

Introduction TCP/IP to coordinate the data collection. Multiple TCP/IP connections between the two interfaces can be used to increase the level of redundancy. When using UniInt health tags with interfaces running in failover, the instances of the interface should be started with the /uht_id=x command-line parameter and the health tags with location3 set to x, so that each instance of the interface will write to a different set of health tags. Vendor Software Required on PI Interface Node The interface requires that the PI API and Citect API be installed on the PI Interface node. The PI API version must be at least 1.2.3.4. The version of Citect API client depends on the version of Citect. Version 2.x of the interface has been built for Version 5.1 or later of Citect. The Citect API consists of a set of DLL files, which should be copied from the Citect machine onto the PI Interface node. Vendor Software Required on Foreign Device The interface requires that Citect API licenses are available on the Citect system. If the Citect system does not have an API license available, the connection request from the interface will be rejected by the Citect node. Additional PI Software A test utility called PI_CitectTest.exe is included with the interface. This can be used to ensure that the machine running the interface can connect successfully to the Citect node and read values from the Citect real-time database.

4

Diagram of Hardware ConnectionThere are several options for how the PI Citect interface is run.

If the Citect host node is not heavily loaded then option 1, where the PI Citect interface and the PI API software are run directly on the Citect node is the recommended approach. It has the advantage of the interface running locally on the Citect node and so eliminates a network connection, but also supports buffering for when there are network or PI server problems.

Citect Interface to the PI System

5

Introduction

Option 2 also supports buffering; nevertheless, access to Citect is required including an additional machine. This configuration is well suited for situations where the Citect node is heavily loaded. It is also useful when several Citect nodes are to be scanned, as several copies of the Citect interface can run on the same PI Interface node.

6

Option 3 is when the interface is run directly on the PI Server. This is simple to install; however, it lacks any buffering and therefore it is not the recommended approach.

Citect Interface to the PI System

7

Principles of OperationWhen the interface starts up, it receives several parameters from the interface startup file. These parameters define the PI Point Source code, interface id, and the set of Scan Class time periods to be available as well as other parameters as described in the section Startup Command File. Log messages are recorded either in the PI log file or the PI application log file. The PI log file is named PI\PILog\pimsg_yymmdd.dat and is renewed daily. The status of the interface is recorded in the PI application log file PIPC\Dat\pipc.log. The interface begins by searching the PI Point Database for all tags configured with the PointSource code specified in the interface startup file. If the interface identifier (/id=) has been specified as a command-line parameter, then the point configuration is checked to ensure the point has the same interface identifier. It then records these tags in dynamic group structures in the computer memory based on logical groupings (e.g. one list per scan class, per point type). When the interface process has completed these initial tasks, it enters a permanent loop in which it processes input and output tags. This loop is repeated until the interface is stopped. The actions taken within this loop are described below.

Input PointsInput tags are serviced by the interface to collect data from Citect and send it to PI. They can either be scan-based or event-based. Scan-based tags are serviced regularly at a predefined time interval. Event-based tags are serviced when a change occurs in a separate PI tag. Scan-based It is possible to configure an input tag to be updated at a regular time interval specified by any one of a set of user-defined scan classes. The interval of each scan class is based from and controlled by the interface. When a scan classs time interval expires, the data for the tags that are configured for that scan class is requested. All tags for a particular scan class are retrieved from Citect at once. For information about defining scan-based input tags, see the description of /f in the Startup Command File section. Event-based An input tag can be configured to send data to PI on an event, based on the exception of the data from a separate PI point. When the value of this separate PI point changes the data for the actual tag is requested from Citect. For information about setting up an exception tag, see the ExDesc heading of the PI Point Configuration section.

Output PointsOutput tags are serviced by the interface to collect data from PI and send it to Citect based on the exception of a separate PI tag (referred to as a source tag). When the value of this source tag changes, it is sent both to Citect and to the output tag. This keeps a record of data that were sent to Citect. For more information about setting up an output tag, see the SourceTag heading in the PI Point Configuration section. If a tag is defined to be an output tag, its settings override any settings that apply to input tags.Citect Interface to the PI System

8

Citect Interface to the PI System

9

Installation ChecklistFor those users who are familiar with running PI data collection interface programs, this checklist helps you get the PI Citect interface running. If you are not familiar with PI interfaces, you should return to this section after reading the rest of the manual in detail. 1. Install the PI Interface Configuration Utility (which installs PI SDK and PI API) 2. Verify that PI API has been installed. 3. Install the interface. 4. Ensure that the Citect API DLL files are installed on the interface node. 5. Ensure that there are sufficient Citect API licenses available on the Citect node. 6. Test the connection between the interface node and the Citect node using the PI_CitectTest.exe connection tester. 7. Define digital states. Cit_Bad_Conn - an indicator of communication problems with the Citect node. If an interface status tag (/itag=) is to be used then a digital set as defined in Interface Status Tag section (page 20) is required. 8. Choose a point source.Configure PI points. Location1 is the input / output parameter (0=input, 1=output). Location2 is the interface identifier. Location3 is not used. Location4 is the scan class. Location5 is not used. ExDesc is optional and used for event driven point scans (EVENT=). InstrumentTag is the Citect point name. 9. Configure the interface using the PI Interface Configuration Utility or edit startup command file. OSIsoft recommends using the PI Interface Configuration Utility. If the interface is NOT running directly on the Citect node then the following parameters must be defined /cihost= name of Citect node /ciuser= name of Citect user used by remote connection /cipass= password for user defined by /ciuser= 10. Configure performance points. 11. Configure I/O rate tag. 12. Setup interface node clock. 13. Setup security. 14. Start the interface without buffering. 15. Verify data. 16. Stop interface, start buffering, start interface.

Citect Interface to the PI System

10

Interface InstallationOSIsoft recommends that interfaces be installed on PI 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) has been installed (see the PI API Installation Instructions manual). With this approach, the PI Server need not compete with interfaces for CPU time. The primary function of the PI Server is to archive data and to service clients that request data. After the interface has been installed and tested, Bufserv should be enabled on the API node (once again, see the PI API Installation Instructions manual). Bufserv is distributed with the PI API. It is a utility program that provides the capability to store and forward events to a PI Server, allowing continuous data collection when communication to the PI Server is lost. Communication will be lost when there are network problems or when the PI Server is shut down for maintenance, upgrades, backups, or unexpected failures. In most cases, interfaces on API nodes should be installed as automatic services. Services keep running after the user logs off. Automatic services automatically restart when the computer is restarted, which is useful in the event of a power failure. The guidelines are different if an interface is installed on the PI Server node. In this case, the typical procedure is to install the PI Server as an automatic service and interfaces as manual services that are launched by site-specific command files when the PI Server is started. Interfaces that are started as manual services are also stopped in conjunction with the PI Server by site-specific command files. This typical scenario assumes that Bufserv is not enabled on the PI Server node. Bufserv can be enabled on the PI Server node so that interfaces on the PI Server node do not need to be started and stopped in conjunction with PI; however, it is not standard practice to enable buffering on the PI Server node. Please see the UniInt Interface User Manual for special procedural information.

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

It is customary for the user to rename the executable and the startup command file when multiple copies of the interface are run. For example, one would typically use PI_Citect1.exe and PI_Citect1.bat for interface number 1, PI_Citect2.exe and PI_Citect2.bat for interface number 2, and so on. When an interface is run as a service, the executable and the command file must have the same root name because the service looks for its command-line parameters in a file that has the same root name.

Interface DirectoriesThe PIHOME Directory TreeThe PIHOME directory tree is defined by the PIHOME entry in the pipc.ini configuration file. This pipc.ini file is an ASCII text file, which is located in the %WinDir% directory. A typical pipc.ini file contains the following lines:[PIPC]Citect Interface to the PI System

11

Interface InstallationPIHOME=c:\pipc

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

Interface Installation DirectoryPlace all copies of the interface into a single directory. The suggested directory is:PIHOME\Interfaces\Citect\

Replace PIHOME with the corresponding entry in the pipc.ini file.

Interface Installation ProcedureThe PI Citect interface setup program uses the services of the Microsoft Windows Installer. Windows Installer is a standard part of Windows 2000 and later. When running on Windows NT 4.0 systems, the PI Citect setup program will install the Windows Installer itself if necessary. To install, run the Citect_x.x.x.x.exe installation kit.

Installing the Citect API DLL filesFor the interface to run, it must be able to locate the Citect API DLL. If the interface is running directly on the Citect node then the interface will be able to find the DLL files if the Citect Bin directory is on the PATH, or the DLL files are copied to either the Windows\System32 directory or to the interface installation directory. The recommended method is to having the Citect Bin directory added to the PATH. This means that there are no duplicate copies of files that can cause problems if the Citect software is updated. If the interface is running on a separate PI interface node and connecting to a remote Citect machine then the DLLs must be copied from the Citect machines Bin directory into the interface installation directory. The DLL files required by the interface are CtApi.dll Ct_ipc.dll CtEng32.dll CtRes32.DLL CtUtil32.dll CiDebugHelp.dll (only on Citect 5.41 or later)

Note : It is important that the version of the DLL files used by the interface are the sameversion as those used by the Citect system itself. If the Citect software is updated then any copies of the DLLs must also be updated.

12

Installing the Interface as an Windows ServiceThe PI Citect interface service can be created, preferably, with the PI Interface Configuration Utility, or can be created manually.

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

Service ConfigurationService name The Service to Add box shows the name of the current interface service. This service name is obtained from the interface executable. ID This is the service id used to distinguish multiple instances of the same interface using the same executable. Display name The Display Name text box shows the current Display Name of the interface service. If there is currently no service for the selected interface, the default Display Name is the service name with a PI- prefix. Users may specify a different Display Name. OSIsoft suggests that the prefix PI- be appended to the beginning of the interface to indicate that the service is part of the OSIsoft suite of products.Citect Interface to the PI System 13

Interface Installation Log on as The Log on as text box shows the current Log on as Windows User Account of the interface service. If the service is configured to use the Local System account, the Log on as text box will show LocalSystem. Users may specify a different Windows User account for the service to use. Password If 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 password If a password is entered in the Password text box, then it must be confirmed in the Confirm Password text box. Dependencies The Installed services list is a list of the services currently installed on this machine. Services upon which this Interface is dependant 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. Often interface services also depend on a vendor program, such as the Fisher-Rosemount chipservice. To remove a service from the list of dependencies, use the the service name will be removed from the Dependencies list. button, and

When the PI Interface is started (as a service), the services listed in the dependency list will be verified as running (or an attempt will be made to start them). If the dependent service(s) cannot be started for any reason, then the PI interface service will not run.Note: Please see the PI Log and Operating System Event Logger for messages that may indicate the cause for any server not running as expected.

- Add Button To add a dependency from the list of Installed services, select the dependency name, and click the Add button. - Remove Button To remove a selected dependency, highlight the service name in the Dependencies list, and click the Remove button. The full name of the service selected in the Installed services list is displayed below the Installed services list box. Create The Create button adds the displayed service with the specified Dependencies and with the specified Startup Type. Remove The Remove button removes the displayed service. If the service is not currently installed, or if the service is currently running, this button will be grayed out.14

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

Generally, interface services are set to start automatically. Create The Create button adds the displayed service with the specified Dependencies and with the specified Startup Type. Remove The Remove button removes the displayed service. If the service is not currently installed, or if the service is currently running, this button will be grayed out.

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

Citect Interface to the PI System

15

Interface Installation

Installing the Interface Service ManuallyOne can get help for installing the interface as a service at any time with the command:PI_Citect.exe help

Change to the directory where the PI_Citect1.exe executable is located. Then, consult the following table to determine the appropriate service installation command.Windows Service Installation Commands on a PI Interface Node or a PI Server node with Bufserv implemented Manual service Automatic service *Automatic service with service id PI_Citect.exe install depend tcpip bufserv PI_Citect.exe install auto depend tcpip bufserv PI_Citect.exe serviceid X install auto depend tcpip bufserv

Windows Service Installation Commands on a PI Interface Node or a PI Server node without Bufserv implemented Manual service Automatic service *Automatic service with service id PI_Citect.exe install depend tcpip PI_Citect.exe install auto depend tcpip PI_Citect.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..

16

Communication Test ProgramsThe interface is supplied with a program, PI_CitectTest.exe that connects only to Citect. This test program connects to Citect in exactly the same way as the interface does. It eliminates PI from the equation during any connection problems that may occur because it makes no reference to the PI system. The program is run from the MS-DOS command prompt and needs no command-line parameters. It begins by initializing a connection to Citect and displaying version information as retrieved from Citect. Before attempting to run the interface, a connection test should be done individually for both the PI API and Citect API client. If a test program is run that makes reference to only one system, any problems that occur with the communication will be specific to the system being connected to; thus problems can be found and corrected more efficiently. Once connection has been established and confirmed using the test programs described below, the connection specifications for both PI and Citect that have been set up will function equally well for the interface.

Testing the Connection to PIPI is supplied with a test program, Apisnap.exe, which makes a connection only to PI, eliminating any potential problems connecting to Citect. For more information about ApiSnap.exe see the PI Server manual.

Testing the Connection to CitectThe interface is supplied with a program, PI_CitectTest.exe that connects only to Citect. This test program connects to Citect in exactly the same way as the interface does. It eliminates PI from the equation during any connection problems that may occur because it makes no reference to the PI system. The program is run from the MS-DOS command prompt and needs no command line parameters. It begins by initializing a connection to Citect and displaying version information as retrieved from Citect.

Connecting to CitectThe program will prompt for a host with which to establish a remote connection to Citect. If the Citect system to be connected to is version 5.20 or greater and is on a remote machine, the remote machine name or IP address must be entered at the prompt. The program will then prompt for a Citect user name and password before it attempts to connect. Following is an example:Citect host: 206.347.209.32 Citect User: ENGINEER Password : ****** Attempting to connect to Citect on 206.347.209.32 ... Connected to Citect Version 5.20 Rev. 00 handle = 7e45f0 Iead or (W)rite: ...

Citect Interface to the PI System

17

Communication Test Programs If the Citect system is on the local machine, it is not necessary to supply a host name. Also, if the version of Citect is earlier than 5.20, remote connections to Citect are not possible. Pressing will bypass remote connections and attempt a connection to the Citect system on the local machine. Following is an example:Citect host: Attempting to connect to Citect on local machine ... Connected to Citect Version 5.20 Rev. 00 handle = 7e45f0 Iead or (W)rite: ...

Note: The test program supplied with version 2.0.x of the interface will not prompt for a host but immediately attempt to connect to the Citect system on the local machine.

Reading PointsAfter connecting to Citect, pressing R (not case-sensitive) will put the test program into read mode. It will ask the user for the name of a Citect point to read and display the value for that point. It will only display the value once and then ask for another Citect point to read. Pressing without entering a point name will cause the program to use the last point that was entered. Following is an example of the test programs output using read mode:... Iead or (W)rite: R Citect point to read LOOP_1_PV = 136.500 Citect point to read LOOP_1_PV = 145.200 Citect point to read LOOP_1_PV = 149.600 Citect point to read LOOP_2_PV = 5.700 Citect point to read LOOP_2_PV = 7.200 Citect point to read LOOP_2_PV = 10.500 Citect point to read

from: LOOP_1_PV from: from: from: LOOP_2_PV from: from: from: ^C

Writing PointsAfter connecting to Citect, pressing W (not case-sensitive) will put the test program into write mode. It will ask the user for the name of a Citect point to write to and ask for a value to write to that point. Pressing without entering a point name will cause the program to use the last point that was entered. Pressing without entering a value will cause the program to write a random number.

18

Following is an example of the test programs output using read mode:... Iead or (W)rite: W Citect point to write to: LOOP_1_SP Value to write: 95.22 Citect point to write to: Value to write: Writing random number: 75.602 Citect point to write to: LOOP_2_SP Value to write: Writing random number: 77.230 Citect point to write to: ^C

Citect Interface to the PI System

19

Digital StatesPI 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 1 to n to represent different values of discrete data. For more information about PI digital tags and editing digital state sets, see the PI Data Archive Manual for Windows NT and Unix manual. A Citect point that contains discrete data can be stored in PI as a digital tag. A Digital tag associates discrete data with a digital state set, as specified by the user. System Digital State Set Similar to digital state sets is the system digital state set. This set is used for all tags, regardless of type to indicate the state of a tag at a particular time. For example, if the interface receives bad data from a Citect point, it writes the system digital state BAD INPUT to PI instead of a value. The system digital state set has many unused states that can be used by the interface and other PI clients. The interface uses two states that are not defined as part of the standard PI system digital state set. They are as follows:Cit_Bad_Conn: This state indicates that the connection to Citect has been lost. It must

be entered precisely as shown.I/F_Stopped: This state indicates that the interface was not running at a particular

time. This state can be entered as any string but must match the /stopstat parameter in the interface startup file. See the /stopstat heading of the Startup Command File section for more information. These two states need to be inserted into unused states in the system digital state set. An unused state is identified by a label ?# where # is the number of the unused state; for example, if state 100 is unused it will have ?100 as its label.

Interface Status TagWhen using the /itag= parameter to specify an interface status PI tag, the interface assumes than the tag will contain a predefined set of digital states. If the tag does not have the states as expected, the value of the PI tag will be meaningless. The following shows the digital state set that should be used for the interface status tag.State 0 1 2 3 4 5 6 Digital State String Intf Running Intf Stopped Intf DCS Error Pri Running Pri Stopped Pri DCS Error Sec Ready Description Standalone, interface running normally Standalone, interface stopped Standalone, unable to communicate with Citect node Primary, interface running and collecting data from Citect Primary, interface stopped Primary, unable to communicate with Citect node Secondary, interface running (waiting) 20

Citect Interface to the PI System

State 7 8 9 10

Digital State String Sec Stopped Sec DCS Error Sec Socket Down Sec Primary Down

Description Secondary, interface stopped Secondary, unable to communicate with Citect node Secondary, TCP/IP sockets error Secondary, interface running and collecting data from Citect as the primary interface has failed.

There should be one status tag for each copy of the interface running. The tags should also have the PointSource attribute set to L.

Citect Interface to the PI System

21

Point SourceThe PointSource is a unique, single or multi-character string that is used to identify the PI point as a point that belongs to a particular interface. For example, the string Boiler1 may be used to identify points that belong to the MyInt Interface. To implement this, the PointSource attribute would be set to Boiler1 for every PI Point that is configured for the MyInt Interface. Then, if /ps=Boiler1 is used on the startup command-line of the MyInt Interface, the Interface will search the PI Point Database upon startup for every PI point that is configured with a PointSource of Boiler1. Before an interface loads a point, the interface usually performs further checks by examining additional PI point attributes to determine whether a particular point is valid for the interface. For additional information, see the /ps parameter. Case-sensitivity for PointSource Attribute The PointSource character that is supplied with the /ps command-line parameter is not case sensitive. That is, /ps=P and /ps=p are equivalent. It is only necessary to be careful with the case of the PointSource during point definition and only if the Interface will be running on a PINet node communicating to a PI Server. Reserved Point Sources Several 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 G and @, Random uses R, RampSoak uses 9, and the Performance Equations Subsystem uses C. Do not use these PointSource characters or change the default point source characters for these applications. Also, if a PointSource character is not explicitly defined when creating a PI point; the point is assigned a default PointSource character of Lab (PI 3). Therefore, it would be confusing to use Lab as the PointSource character for an interface.

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

Citect Interface to the PI System

22

PI Point ConfigurationThe PI point is the basic building block for controlling data flow to and from the PI Data Archive. A single point is configured for each measurement value that needs to be archived. Use the point attributes below to define what data to transfer.

Point AttributesTagA tag is a label or name for a point. Any tag name can be used in accordance to the normal PI point naming conventions. Length The length of the Tag field is limited by the version of the PI API, the version of the PI Server, and sometimes by a specific Interface. The table below explains this in more detail. When the maximum possible lengths differ for the software installed on site, the shortest length applies.

PI API 1.6 or higher 1.6 or higher Below 1.6 Below 1.6

PI Server 3.4.370.x or higher Below 3.4.370.x 3.4.370.x or higher Below 3.4.370.x

Maximum Length 1023 255 255 255

PointSourceThe PointSource is unique name 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 Point Source section.

PointTypeTypically, 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. Float16, float32, float64, int16, int32, digital, and string point types are supported on PI 3 Servers. For more information on the individual point types, see PI Data Archive for NT and UNIX.

Location1This field is used to specify whether a PI tag is an input tag (from Citect to PI) or an output tag (from PI to Citect).Citect Interface to the PI System

23

PI Point Configuration 0 Input tag 1 Output tag

Location2The second location field specifies the interface instance number. In the startup .bat file, there is a parameter for interface ID, /ID=#, where # is any number. The Location2 field for each tag must match that number, or the tag will be ignored.

Location3Location 3 is not used in this interface.

Location4Scan-based Inputs For 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 section called Startup Command File. Trigger-based Inputs and Output Points Location 4 should be set to zero for these points.

Location5Location 5 is not used in this interface.

InstrumentTagLength The length of the InstrumentTag field is limited by the version of the PI API, the version of the PI Server, and sometimes by a specific Interface. The table below explains this in more detail. When the maximum possible lengths differ for the software installed on site, the shortest length applies.

PI API 1.6 or higher 1.6 or higher Below 1.6 Below 1.6

PI Server 3.4.370.x or higher Below 3.4.370.x 3.4.370.x or higher Below 3.4.370.x

Maximum Length 1023 32 32 32

This field contains the full name of Citect point with which it is associated. For input tags, it represents the Citect point that the data is to be collected from. For output tags, it represents the Citect point that data is to be written to. The point name in this field is not case sensitive.

24

ExcDescLength The length of the Extended Descriptor field is limited by the version of the PI API, the version of the PI Server, and sometimes by a specific Interface. The table below explains this in more detail. When the maximum possible lengths differ for the software installed on site, the shortest length applies.

PI API 1.6 or higher 1.6 or higher Below 1.6 Below 1.6

PI Server 3.4.370.x or higher Below 3.4.370.x 3.4.370.x or higher Below 3.4.370.x

Maximum Length 1023 80 80 80

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. Performance Points For UniInt-based interfaces, the extended descriptor is checked for the string PERFORMANCE_POINT. If this character string is found, UniInt treats this point as a performance point. See the section called Performance Point Configuration.

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

PI Point Configuration from the interface, and SCAN OFF will be written to the point. For example, if the PointSource of a PI point that is currently loaded by the interface is changed, the point will be removed from the interface and SCAN OFF will be written to the point. Input tags are serviced by the interface to collect data from Citect and send it to PI. They can either be scan-based or event-based. Scan-based Scan based tags are serviced regularly at a pre-defined time interval. An input tag can be configured to be updated at a regular time interval specified by any one of a set of userdefined scan classes. The interval of each scan class is based from and controlled by the interface. When a scan classs time interval expires, the data for the tags that are configured for that scan class is requested. All tags for a particular scan class are retrieved from Citect at once. For information about defining scan-based input tags, see the description of /f in the Startup Command File section. Event-based Event-based tags are serviced when a change occurs in a separate PI tag. An input tag can be configured to send data to PI on an event, based on the exception of the data from a separate PI point. When the value of this separate PI point changes the data for the actual tag is requested from Citect. For information about setting up an exception tag, see the Trigger-based Inputs heading of the PI Point Configuration section.

Zero/SpanThis field specifies the range of the PI tags zero and span. If the value of a Float16 or Int16 tag is outside of its specified range, either the digital state UnderRange or OverRange will be written to the tag. If the tag is specified as a Float32 or Int32, the input value is written to PI even when it is out of range. This range is also used to determine the compression dead-band width in engineering units when using the CompDevPercent attribute. For more information about the CompDevPercent attribute, see the PI Data Archive for Windows NT and Unix manual.

ShutdownThe shutdown attribute is used only if the server node is a PI 3 system. The Shutdown attribute is 1 (true) by default. The default behavior of the PI Shutdown subsystem is to write the SHUTDOWN digital state to all PI points when PI is started. The timestamp that is used for the SHUTDOWN events is retrieved from a file that is updated by the Snapshot Subsystem. The timestamp is usually updated every 15 minutes, which means that the timestamp for the SHUTDOWN events will be accurate to within 15 minutes in the event of a power failure. For additional information on shutdown events, refer to PI Data Archive for NT and UNIX.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 command-line parameter is specified.

One can disable SHUTDOWN events from being written to PI when PI is restarted by setting the Shutdown attribute to 0 for each point. Alternatively, one can change the default behavior of the PI Shutdown Subsystem to write SHUTDOWN events only for PI points that have their Shutdown attribute set to 0. To change the default behavior, edit the \PI\dat\Shutdown.dat file, as discussed in PI Data Archive for NT and UNIX.26

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

Output PointsOutput points control the flow of data from the PI Data Archive to any destination that is external to the PI Data Archive, such as a PLC or a third-party database. For example, to write a value to a setpoint on the Citect system, one would use an output point. Outputs are triggered for UniInt-based interfaces. That is, outputs are typically not scheduled to occur on a periodic basis. There are two mechanisms for triggering an output.

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 needs to 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 2For trigger method 2, a separate trigger point is not configured. To trigger an output, write a new value to the Snapshot of the output point itself. The new value does not need to be different than the previous value to trigger an output, but the timestamp of the new value must be more recent than the previous value. Trigger method 2 may be easier to configure than trigger method 1, but trigger method 2 has a significant disadvantage. If the output is unsuccessful, there is no tag to receive a digital state that is indicative of the failure, which is very important for troubleshooting.

Citect Interface to the PI System

27

Performance Point ConfigurationOne can configure performance points to monitor the amount of time in seconds that it takes an interface to complete a scan for a particular scan class. The closer the scan time is to 0 seconds, the better the performance. The scan time is recorded to millisecond resolution

Configuring Performance Points with PI ICU (Windows)

Create To create a Performance Point, right click the line belonging to the tag to be created, and select Create. Delete To delete a Performance Point, right click the line belonging to the tag to be deleted, and select Delete. Correct If the Status of a point is marked Incorrect, the point configuration can be automatically corrected by ICU by right clicking on the line belonging to the tag to be corrected, and selecting Correct. The Performance Points are created with the following PI attribute values. If ICU detects that a Performance Point is not defined with the following, it will be marked Incorrect:Attribute Tag Point Source Compressing Excmax Descriptor Details Tag name that appears in the list box Point Source for tags for this interface, as specified on the first tab Off 0 Interface name + Scan Class # Performance Point

Citect Interface to the PI System

28

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

Scan Class The Scan Class column indicates which scan class the Performance Point in the Tagname column belongs to. There will be one scan class in the Scan Class column for each scan class listed in the Scan Classes combo box on the Uniint Parameters tab. Tagname The Tagname column holds the Performance Point tag name. Snapshot The Snapshot column holds the snapshot value of each Performance Point that exists in PI. The Snapshot column is updated when the Performance Points/Counters tab is clicked, and when the interface is first loaded.

Configuring Performance Points ManuallyPerformance point configuration is the same on all operating system platforms. Performance points are configured as follows. 1. Set the extended descriptor to:PERFORMANCE_POINT

or to:PERFORMANCE_POINT=interface_id where interface_id corresponds to the identifier that is specified with the /id parameter on the startup command line of the interface. The character string PERFORMANCE_POINT is case insenstive. The interface_id does not need to be

specified if there is only one copy of an interface that is associated with a particular point source. 2. Set Location4 to correspond to the scan class whose performance is to be monitored. For example, to monitor scan class 2, set Location4 to 2. See the /f parameter for a description of scan classes. 3. Set the PointSource attribute to correspond to the /ps parameter on the startup command line of the interface. 4. Set the PointType attribute to float32.

Citect Interface to the PI System

29

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

Monitoring I/O Rates on the Interface NodeFor Windows and UNIX nodes, the 10-minute rate averages (in events/minute) can be monitored with a client application such as ProcessBook. For Open VMS nodes, the rate (events/minute) can be monitored with the PISysExe:IOMonitor.exe program or with another client program such as Process Book. The IOMonitor program is discussed in PI System Manual I.

Configuring I/O Rate Tags with PI ICU (Windows)The PI Interface Configuration Utility (PI ICU) provides a user interface for creating and managing IORates Tags.

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

Enable IORates for this InterfaceThe Enable IORates for this interface check box enables or disables the I/O Rate point for the Interface. To disable the I/O Rate point, uncheck this box. To enable the I/O Rate point, check this box.

Citect Interface to the PI System

30

Event Counter The Event Counter number correlates a point specified in the IORates.dat file with this Interface. This correlation results from the command line parameter/ec=x

where x is the same number that is assigned to the point named in the IORates.dat file. Tagname The tag name listed under the Tagname column is the name of the I/O Rates point. Tag Status The Tag Status column indicates whether the I/O Rate point currently exists in PI Server. The possible states are: In File The In File column indicates whether the I/O Rates point listed in the Tagname column and the event counter number listed in the Event Counter column are in the IORates.dat file. The possible states are: Yes This status indicates that the I/O Rate point and the event counter number are in the IORates.dat file No This status indicates that the I/O Rate point and the event counter number are not in the IORates.dat file Created This status indicates that the point exists in PI Server Not Created This status indicates that the point does not yet exist in PI Server Deleted This status indicates that the point has just been deleted Unknown This status indicates that the PI ICU is not able to access PI Server

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

Button Menu OptionsCreate Create the suggested I/O Rates point with the tag name indicated in the Tagname column. Delete Delete the I/O Rate point listed in the Tagname column. Reset Change the value in the Tagname text box back to the default value.

Citect Interface to the PI System

31

I/O Rate Tag Configuration Rename Allow the user to specify a new name for the I/O Rate point listed in the Tagname column. Add to File Add the I/O Rate point and the event counter number to the IORates.dat file. Search Allow the user to search the PI Server a previously defined I/O Rate points. Update Snapshot Allow the user to refresh the snapshot value.

Configuring I/O Rate Points ManuallyThere are two configuration steps. 1. Configuring the PI Point on the PI Server 2. Configuration on the Interface Node

Configuring the PI Point on the PI ServerCreate an I/O Rate Point with the following PI point attribute values.Attribute PointSource PointType Compressing ExcDev L float32 0 0 Value

Configuration on the Interface NodeFor the following examples, assume that the name of the PI tag is sycitect01 and that name of the I/O Rate on the home node is sycitect001. 1. Edit/Create a file called iorates.dat in the PIHOME\dat directory. The PIHOME directory is defined either by the PIPCSHARE entry or the PIHOME entry in the pipc.ini file, which is located in the %windir% directory. If both are specified, the PIPCSHARE entry takes precedence. Since the PIHOME directory is typically C:\PIPC, the full name of the iorates.dat file will typically be C:\PIPC\dat\iorates.dat. Add a line in the iorates.dat file of the form:sycitect001, x

where sycitect001 is 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 2 and 34 or between 51 and 200, inclusive. To specify additional rate32

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 parameter on the startup command file of the interface to match the event counter in the iorates.dat file. The interface must be stopped and restarted in order for the I/O Rate to take effect. I/O Rates will not be written to the tag until 10 minutes after the interface is started. .

Citect Interface to the PI System

33

Startup Command FileFor NT, command file names have a .bat extension. The Windows continuation character (^) allows one to use multiple lines for the startup command. The maximum length of each line is 1024 characters (1 kilobyte). The number of parameters is unlimited, and the maximum length of each parameter is 1024 characters.Note: The UniInt Interface User Manual includes details about other command line parameters which may be useful.

Configuring the Interface with PI ICUNote: 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 (PI_Citect.bat) will be maintained by the PI ICU and all configuration changes will be kept in that file. The procedure below describes the necessary steps for using PI ICU to configure the PI Citect Interface. From the PI ICU menu, select Interface, New, and then Browse to the PI_Citect.exe executable file. Then, enter values for Point Source and Interface ID#. A window such as the following results:

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. You should then see a display such as the following:

Citect Interface to the PI System

34

Note that in this example the Host PI System is localhost, which means that the interface will be configured to communicate with the local PI Server. However, if you want the interface to communicate with a remote PI Server, you can do this by selecting Connections item from PI ICU menu and make it your default server. If you do not see the remote node in the list of servers, you can add that in. Once you add the interface to PI ICU, near the top of the main PI ICU screen, the Interface Type should be citect. If not, use the drop-down box to change the Interface Type to be citect. Click on Apply to enable the PI ICU to manage this copy of the PI Citect Interface.

The next step is to make selections in the interface-specific tab (i.e. 35itect) that allow you to enter values for the startup parameters that are particular to the PI Citect Interface.

Citect Interface to the PI System

35

Startup Command File

Since the PI Citect Interface is a UniInt-based interface, in some cases the user will need to make appropriate selections in the UniInt tab. This tab allows the user to access UniInt features through the PI ICU and to make changes to the behavior of the interface. If you want to set up the interface as a Windows Service, you can do that by using the Service tab. This tab allows you to configure the interface to run as a service as well as to start and stop the interface. You can also run the interface 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 tabs and selections, please refer to the PI Interface Configuration Utility User Manual. In the next section we will describe the selections that are available from the 36itect tab. After you have made your selections on the PI ICU GUI, you will need to press the Apply button in order for PI ICU to make these changes to the interfaces startup file.

citect Interface TabSince the startup file of the PI Citect Interface is maintained automatically by the PI ICU, you should use the 36itect tab to configure the startup parameters and 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.

36

Citect ConnectionCitect host machine This parameter specifies the remote Citect machine name. An IP address may also be used instead of the host name. If the interface is to run on the same computer as Citect, then this parameter should not be used. This parameter MUST be used in conjunction with the /ciuser and /cipass command-line parameters. (/CIHOST=hostname). Citect user name This parameter specifies the user name with the remote Citect machine. It is used in conjunction with the /cihost and /cipass parameters. If the /cihost is specified and the /ciuser is not, the interface will fail to initialize. (/CIUSER=username). Citect password This parameter specifies the password for the username within the remote Citect machine as specified by the /ciuser parameter. It is used in conjunction with the /cihost parameters. If /cihost is specified and the /cipass is not, the interface will fail to initialize. (/CIPASS=password). Dont send data to PI This parameter prevents the interface from sending its data to PI. It is used for testing the throughput of Citect and the interface, generating as little interactionCitect Interface to the PI System 37

Startup Command File with PI as possible. If the appropriate event counters are configured, the interface will still count the number of Citect reads and writes and send their averages to the event counter tags in PI. It will not count the number of exceptions. (/NOPIWRITE)

Interface RecoveryOn Lockup The interface is able to detect when the Citect API failed to return. When this lockup occurs, the interface can Abort, Ignore the problem, or Restart. The default is /ONLOCKUP=Abort. If the interface is running under Windows 2000 as a service, the service can be configured to automatically restart on a failure. If /ONLOCKUP=Restart is used, the interface will start an external utility and abort. The utility will wait for the service to stop and then restart it. (This is only required with Windows) Service Name This parameter specifies the name of the service that the restart utility will attempt to start if the interface detects a lockup and the /ONLOCKUP=Restart is used. The default is to use the name of the interface executable filename as the service name. If multiple instances of the service are configured to use the same executable file, then the service name will need to be defined explicitly. (/SERVICENAME=servicename) Restart Utility The parameter specifies the name of the external utility to be started if the interface detects a lockup and the /ONLOCKUP=Restart is used. The default utility name is StartService. The utility must be in the same directory as the interface executable. (/RESTARTUTIL=executablename) Watchdog Timer (sec) This parameter specifies the watchdog timeout period, in seconds. If the watchdog timer is not updated by the interface within this time period, then the interface will carry out the action defined by the /ONLOCKUP=x parameter (Ignore, Abort, Restart) (/WTO=#, default=60)

Citect Debug ParametersAll messages This is the same as specifying all of the debug parameters for /df=. If this parameter is used, all others are effectively redundant. (/DF=A) Verbose messages As for All debug messages, but also includes messages relating to the usage of the Citect API calls. Due to the large amount of data output, care should be taken when using this option. (/DF=V)

38

List creation messages Every tag is added to a list in the CTAPI for retrieval from Citect, A message is reported every time one of these lists is created. (/DF=L) Tag creation A message is reported every time a tag is added to a CTAPI internal point list. The message indicates which list the point was added to. (/DF=T) Input tag data A message is reported that displays the value and status of the first five tags in each scan class and event class. (/DF=I) Output tag data A message is reported that displays the values and status of the first five tags in each output class. (/DF=O) ctListRead() messages A message is reported before and after each call to the ctListRead() Citect API function, which occurs when a scan list is read. (/DF=X) ctListData() messages A message is reported before and after each call to the ctListData() Citect API function, which occurs when the value is read for each tag in a scan list. This option will fill the pipc.log file very quickly and should be used with caution. (/DF=Y)

FailoverEnable failover This check box is used to enable the interface to use failover. Primary node When running redundant interface, this parameter specifies whether this instance will be the primary (P) or secondary (S) node. Only one instance can be specified as Primary. (/IMODE=P or S) Failover Tag The parameter specifies the name of a PI digital tag that will be used to store the status of the interface. The digital tag should have a digital state set as specified in the section Interface Status Tag. (/ITAG=digitaltag) Health Tag ID This value is used when creating UniInt health points for an interface that uses Non-UniInt interface failover. It is used for the Location3 point attribute for UniInt health points. (/UHT_ID=#)

Citect Interface to the PI System

39

Startup Command File Failover nodes and Ports When running redundant interfaces, this parameter give the host name and port number that should be used to establish the communications between the two instances of the interface. If both interface are running on the same machine, then use the host name localhost. The port number can be any unused port on the system. Up to two failover nodes:ports can be specified. (/IHOST=host:port)

Additional ParametersThis section is provided for any additional parameters that the current ICU control does not support.

40

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

Parameter /cihost= Citect_hostname Citect Host Name Optional

Description This parameter specifies the remote Citect machine name. An IP address may also be used instead of a host name. If the interface is to run on the same computer as Citect, then this parameter should not be used. Note: Remote Citect connections are available for use only with version 2.1.x and greater of the interface connecting to Citect version 5.20, service pack B or greater. Note: This parameter MUST be used in conjunction with the /ciuser and /cipass command-line parameters.

/cipass= Citect_password Citect User Password Optional Required if /cihost used /ciuser= Citect_username Citect User Name Optional Required if /cihost used. /db=n UniInt Debug Level

This parameter specifies the password for the user name within the remote Citect machine as specified by the /ciuser parameter. It is used in conjunction with the /cihost parameter. If /cihost is specified and /cipass is not, the interface will fail to initialize. This parameter specifies the user name within the remote Citect machine. It is used in conjunction with the /cihost and /cipass parameters. If /cihost is specified and /ciuser is not, the interface will fail to initialize.

This refers to the debug messages output by the standard OSI universal interface (UniInt) template that the interface is based on. Various levels can be specified which display different types of messages. They are as follows: /db or /db=1 all messages /db=2 initialization /db=3 tag building and updates /db=8 exit handling

/df=xxxx Interface Debug parameters Optional

This parameter defines parameters that cause further information to be reported. These parameters are normally only used during installation or when a problem with the interface occurs. Using them under normal operation of the interface will cause it to slow down. Because this information is also sent to the interface log file Pipc.log, it may quickly grow very large. Each parameter determines what kind of information messages to report during operation of the interface. Each kind of message is specified by a letter of the alphabet (not case sensitive). They are listed below: A (A)ll Debug Messages. The same effect as specifying all of the debug parameters for /df=. If this parameter is used, all others are effectively redundant.

Citect Interface to the PI System

41

Startup Command FileParameter Description V (V)erbose Messages. As for All debug messages, but also includes messages relating to the usage of the Citect API calls. Due to the large amounts of data output, care should be taken when using this option. L (L)ist Creation Messages. Every tag is added to a list in the CTAPI for retrieval from Citect. A message is reported every time one of these lists is created. T (T)ag Creation. A message is reported every time a tag is added to a CTAPI internal point list. The message indicates which list the point was added to. I (I)nput Tag Data. A message is reported that displays the value and status of the first five tags in each scan class and event class. O (O)utput Tag Data. A message is reported that displays the value and status of the first five tags in each output class. X Log ctListRead() calls. A message is reported that displays the value and status of the first five tags in each output class. Y Log ctListData() calls. A message is reported that displays the value and status of the first five tags in each output class. For debug parameters I and O, each line of data takes the following format: () data = , These parameters may be present in any order and may be repeated or omitted. For example, /df=OTLT will cause the interface to report list creation, tag creation and output data information messages. /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 # is not specified, then the default event counter is 1. Also, if the /ec parameter is not specified at all, there is still a default event counter of 1 associated with the interface. If there is an I/O Rate point that is associated with an event counter of 1, each copy of the interface that is running without /ec=# explicitly defined will write to the same I/O Rate point. This means that one should either explicitly define an event counter other than 1 for each copy of the interface or one should not associate any I/O Rate points with event counter 1. Configuration of I/O Rate points is discussed in the section called I/O Rate Tag Configuration. The /f parameter defines the time period between scans in terms of hours (HH), minutes (MM), and seconds (SS). 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), and seconds (ss). 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

/f=SS or /f=SS,SS or /f=HH:MM:SS or /f=HH:MM:SS,hh:m m:ss

42

Parameter Required for reading scan-based inputs

Description classes that can be defined. The first occurrence of the /f parameter on the command line defines the first scan class of the interface, the second occurrence defines the second scan class, and so on. PI Points are associated with a particular scan class via the Location4 PI Point attribute. For example, all PI Points that have Location4 set to 1 will receive input values at the frequency defined by the first scan class. Similarly, all points that have Location4 set to 2 will receive input values at the frequency specified by the second scan class, and so on. Two scan classes are defined in the following example: /f=00:01:00,00:00:05 /f=00:00:07 or, equivalently: /f=60,5 /f=7 The first scan class has a scanning frequency of 1 minute with an offset of 5 seconds, and the second scan class has a scanning frequency of 7 seconds. When an offset is specified, the scans occur at discrete moments in time according to the formula: scan times = (reference time) + n(frequency) + offset where n is an integer and the reference time is midnight on the day that the interface was started. In the above example, frequency is 60 seconds and offset is 5 seconds for the first scan class. This means that if the interface was started at 05:06:06, the first scan would be at 05:06:10, the second scan would be at 05:07:10, and so on. Since no offset is specified for the second scan class, the absolute scan times are undefined. The definition of a scan class does not guarantee that the associated points will be scanned at the given frequency. If the interface is under a large load, then some scans may occur late or be skipped entirely. See the section called Performance Point Configuration for more information on skipped or missed scans. This interface does not support sub-second scan classes. Wall Clock Scheduling Scan classes that strictly adhere to wall clock scheduling are now possible. This feature is available for interfaces that run on Windows and/or UNIX. Previously, wall clock scheduling was possible, but not across daylight savings time. For example, /f=24:00:00,08:00:00 corresponds to 1 scan a day starting at 8 AM. However, after a Daylight Savings Time change, the scan would occur either at 7 AM or 9 AM, depending upon the direction of the time shift. To schedule a scan once a day at 8 AM (even across daylight savings time), one should use /f=24:00:00,00:08:00,L. The ,L at the end of the scan class tells UniInt to use the new wall clock scheduling algorithm.

Citect Interface to the PI System

43

Startup Command FileParameter /host=host:port Required for PI ICU Description The /host parameter is used to specify the PI Home node. Host is the IP address of the PI Sever node or the domain name of the PI Server node. Port is the port number for TCP/IP communication. The port is always 5450 for a PI 3 Server. 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. Defaults: The default port name and server name is specified in the pilogin.ini or piclient.ini file. The piclient.ini file is ignored if a pilogin.ini file is found. Refer to the PI API Installation Instructions manual for more information on the piclient.ini and pilogin.ini files. Examples: The interface is running on an API node, the domain name of the PI 3 home node is Marvin, and the IP address of Marvin is 206.79.198.30. Valid /host parameters would be: /host=marvin /host=marvin:5450 /host=206.79.198.30 /host=206.79.198.30:5450 /id=x Optional Note: Corresponds to location2 point attribute. The /id parameter is used to specify the interface identifier. The interface identifier is a string that is no longer than 9 characters in length. UniInt concatenates this string to the header that is used to identify error messages as belonging to a particular interface. See the section called Error and Informational Messages for more information. UniInt always uses the /id parameter in the fashion described above. This interface also uses the /id parameter to identify a particular interface copy number that corresponds to an integer value that is assigned to the Location2 point attribute. If the /id parameter is a valid integer, then the interface will only process PI tags with the same value in the Location2 attribute. If the /id parameter is not an integer, then the interface will process all PI tags with a matching PointSource and ignore the value of the attribute location2. /ihost=host:port Optional When running redundant interfaces, this parameter gives the host name and port number that should be used to establish the communications between the two instances of the interface. If both interfaces are running on the same machine, then use the host name localhost. The port number can be any unused port on the system. e.g. /ihost=localhost:6789 /imode=x Optional When running redundant interfaces, this parameter specifies whether this instance will be the primary (p) or the secondary (s).

44

Parameter /itag=x Optional

Description This parameter specifies the name of a PI digital tag that will be used to store the status of the interface. The digital tag should have a digital state set as defined in the Interface Status Tag section on page 20. There should be a tag for each copy of the interface running. This parameter prevents the interface from sending its data to PI. It is used for testing the throughput of Citect and the interface, generating as little interaction with PI as possible. If the appropriate event counters are configured, the interface will still count the number of Citect reads and writes and send their averages to the event counter tags in PI. It will not count the number of exceptions. The interface is able to detect when the Citect API has failed to return. When this lockup occurs, the interface can abort, ignore the problem, or restart. The default is /onlockup=abort. If the interface is running under Windows2000 as a service, the service can be configured to automatically restart on a failure. If /onlockup=restart is used, the interface will start an external utility and abort. The utility will wait for the service to s