Home > Wonderware InTouch Interface to the PI System

Wonderware InTouch Interface to the PI System

 

 

Introduction 

 

 

 

Interface Installation

 

PointSource

 

PI Point Configuration

 

I/O Rate Tag Configuration

 

Startup Command File

 

Starting / Stopping the Interface on UNIX

 

 

 

Buffering

 

Appendix A Error and Informational Messages

 

 

 
Wonderware InTouch 
Interface to the PI System
 
 

Version 1.4.74.0

Rev E 
 

 

    How to Contact Us

    Phone (510) 297-5800    (main number) 
    (510) 297-5828    (technical support)
    Fax (510) 357-8136
    E-mail techsupport@osisoft.com
    World Wide Web http://www.osisoft.com
    Mail OSIsoft 
    P.O. Box 727 
    San Leandro, CA  94577-0427 
    USA 
     
    OSI Software GmbH  
    Hauptstrae 30  
    D-63674 Altenstadt 1 
    Deutschland
    OSI Software, Ltd 
    P. O. Box 8256 
    Level One, 6-8 Nugent Street 
    Auckland 3, New Zealand 
     
    OSI Software, Asia Pte Ltd 
    152 Beach Road 
    #09-06 Gateway East 
    Singapore, 189721 

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

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

 1997-2004 OSIsoft, Inc. All rights reserved 
777 Davis Street, Suite 250, San Leandro, CA  94577

 

Table of Contents 

 

Introduction

      The PI-Wonderware InTouch interface is designed to integrate the PI System from OSIsoft with the InTouch system from Wonderware. It consists of the OSI Universal Interface core linked with a module, which customizes it for the InTouch environment. The interface is compatible with InTouch versions 6.0b – 9.x.

      This interface transfers data between the InTouch database and the PI archive via the InTouch Database External Access (IDEA) Software Development Kit (SDK). The interface runs on Microsoft NT. Input tags (for sending data from InTouch to PI) as well as output tags (from PI to InTouch) are supported.

Reference Manuals

      OSIsoft
  • UniInt End User Document
  • PI Data Archive Manual
  • PI-API Installation Instructions
      Vendor
  • The Extensibility Toolkit for InTouch User’s Guide

Supported Features

      Feature Support
      Part Number PI-IN-WW-INTCH-NT
      Platforms NTI (4.0 / 2000 / XP)
      APS Connector No
      Point Builder Utility No
      ICU Control Yes
      Automatically Incorporates PI Point Attribute Changes Yes
      Exception Reporting Yes
      Outputs from PI Yes
      Inputs to PI: Scan-based / Unsolicited / Event Tags Scan-based / Event Tags
      Maximum Point Count Unlimited
      Uses PI-SDK No
      PINet to PI 3 String Support N/A
      * Source of Timestamps PI Server
      History Recovery No
      * Failover Yes
      * UniInt-based Yes
      * Vendor Software Required Yes
      Vendor Hardware Required No
      Additional PI Software Included with Interface No
      * Device Point Types Discrete, Integer, Real, and String

      * See paragraphs below for further explanation.

      Source of Timestamps

      When the value of a tag is read from InTouch, the PI server time is used as the event’s timestamp. This timestamp may be adjusted using the /to=n argument. This argument specifies the number of seconds (as a positive or negative number) to adjust the timestamp by. This offset, when specified, applies to all tags and all scans.

      There is also a mechanism for adjusting the timestamp of individual tags. This is typically used when there is a significant delay between the value of a tag actually being scanned in the field and the value being received by InTouch. For example, a tag may be scanned in the field every 15 minutes but takes several minutes to reach InTouch. In this case you would typically want the timestamp in PI to represent the time the tag was scanned in the field rather than when it was written to InTouch. This can be achieved by using a combination of scan class and Location2 settings. See the section on Location2 on page 15 for more information.

      The /tm argument tells the interface to output timestamp messages to the error log file. This is useful for debugging any timestamp manipulation that is configured.

      Failover

      In a typical Wonderware InTouch - PI-InTouch application, there are three components that can fail:

      1. I/O Server (The means by which real-world data is brought into InTouch).
      2. InTouch (The actual MMI product).
      3. PI-InTouch (The interface used to exchange data between InTouch and PI).

      The Failover mechanism built into the PI-InTouch Interface only applies to failure of the I/O Server.

      The failover mechanism in this interface is very simple and works with any number of InTouch hosts. The interface simply examines a specified InTouch point, which holds the name of the active/online I/O Server, and if it is not the current host (also specified), then it does not scan that InTouch node for updated point values.

      To operate using failover simply install and run the interface on the two or more InTouch hosts, making sure to specify the /fp and /fs arguments in the startup command file. The /fp argument (InTouch failover point name) will be identical on each of the hosts, but the /fs argument (local server name for failover) will differ. See the “Command-Line Parameters” section on page 27 for a description of these arguments.

      UniInt-based

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

      The UniInt End User Document is a supplement to this manual.

      Vendor Software Required

      The IDEA SDK (InTouch Database External Access Software Development Kit) must be purchased with InTouch version 6.0b. Subsequent releases have the necessary components embedded.

      Device Point Types

      InTouch uses the following point types: Discrete, Integer, Real, and String. The interface supports the following point types: Digital, Int16, Int32, Float16, Float32, Float64, and String. The interface supports all combinations and makes every effort to convert between types – even strings.

Diagram of Hardware Connection

 

 

Principles of Operation

      The PI-Wonderware InTouch interface is a console-based, UniInt-based, interface.

      The interface starts by first searching the PI tag database for all tags whose PointSource matches the interface’s PointSource as designated at startup. The interface then attempts to make a connection to each of the associated tags within InTouch.

      When the interface process has completed these initial tasks, it enters a permanent loop in which it checks for the expiration of the update period for each scan class, and the expiration of the tag attributes update period. This loop is repeated until the interface is stopped.

      The PI-Wonderware InTouch interface supports scan-based input tags, event-based input tags, and output tags. The interface groups all the event-based tags having a common event tag into a dynamic list for servicing together, so that all event-based tags in the list are updated when their event tag has an exception.

      The manner in which the interface manages the connection to InTouch is determined by the /ws and the /ht flags that are specified in the startup command file. If the /ws flag is not specified, the interface will exit when a connection attempt fails – this includes the initial connection at startup. Otherwise, the value of the /ws argument is the number of seconds to delay between reconnection attempts. This allows the interface to start before InTouch does, in which case a connection will be attempted periodically until successful. Also, if InTouch exits, the interface will continue to operate, attempting a connection periodically until successful.

      The /ht argument tells the interface to hold a tag connection open between scans. If this is not specified, a tag connection is made, the tag is read, and then the tag is disconnected, for each scan. This is obviously an inefficient way to process tags. For the sake of efficiency this argument should be specified except when the system resources are low and the interface becomes unstable. 

 

Installation Checklist

      For those users who are familiar with running PI data collection interface programs, this checklist helps you get the PI-Wonderware InTouch 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 PI-Wonderware InTouch interface.
      4. Choose a point source. If PI 2 home node, create the point source.
      5. Configure PI points.  
        Location1 is the interface number. 
        Location2 is the time offset in seconds. 
        Location3 specifies whether the point is an input point (0) or output point (1). 
        Location4 is the scan class. 
        Location5 is not used. 
        ExDesc specifies whether tags are event-based. 
        InstrumentTag specifies the InTouch point name associated with the PI tag.
      6. Configure performance points.
      7. Configure I/O Rate tag.
      8. Edit startup command file. 
        /id=# defines the connection.
      9. Add the InTouch directory to the System Variable Path.
      10. Set interface node clock.
      11. Set up security.
      12. Start the interface without buffering.
      13. Verify data.
      14. Stop interface, start buffering, start interface.

        

Interface Installation

      OSIsoft recommends that interfaces be installed on PI-API nodes instead of directly on the PI Server node. A PI-API 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 the machine’s resources. The primary function of the PI Server is to archive data and to service clients that request data.

      After the interface has been installed and tested, Bufserv should be enabled on the PI-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 PI-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, but it is not standard practice to enable buffering on the PI Server node. See the UniInt End User Document for special procedural information.

      The WinTouch interface setup program for interface version 1.4.72.0 and later uses the services of the Microsoft Windows Installer. Windows Installer is a standard part of Windows 2000. When running on Windows NT 4.0 systems, the WinTouch setup program will install the Windows Installer itself if necessary. To install, run the WinTouch_x.x.x.exe installation kit.

Naming Conventions and Requirements

      In the installation procedure below, it is assumed that the name of the interface executable is PI_InTouch.exe and that the startup command file is called PI_InTouch.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_InTouch1.exe and PI_InTouch1.bat for interface number 1, PI_InTouch2.exe and PI_InTouch2.bat for interface number 2, and so on. When an interface is run as a service, the executable and the command file must have the same root name because the service looks for its command-line arguments in a file that has the same root name.

Interface Directories

The PIHOME Directory Tree

      The PIHOME directory tree is defined by the PIHOME entry in the pipc.ini configuration file. This pipc.ini file is an ASCII text file, which is located in the WinNT directory. A typical pipc.ini file contains the following lines: 
      [PIPC] 
      PIHOME=c:\pipc 
       
      The above lines define the \pipc directory as the root of the PIHOME directory tree on the C: drive. OSIsoft recommends using \pipc as the root directory name. The PIHOME directory does not need to be on the C: drive.

Interface Installation Directory

      The interface is installed to:

        PIHOME\interfaces\PIInTouch\

      Where PIHOME is the corresponding entry in the pipc.ini file.

Interface Installation Procedure

      The PI-InTouch interface setup program uses the services of the Microsoft Windows Installer. When running on Windows NT 4.0 systems, the PI-InTouch setup program will install the Windows Installer itself if necessary. To install, run the WinTouch_x.x.x.x.exe installation kit.

Installing the Interface as an NT Service

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

Installing the Interface Service with PI-Interface Configuration Utility

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

 

Service Configuration

      Service Name

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

      Display Name

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

      Log on as

      This text box is available only when the service does not yet exist. It allows users to set what user account the interface service will use when they first create the interface service. If this text box is left blank when the service is created, then LocalSystem is used.

      To edit the username after the service has been created, users need to use the Services Applet.

      Password

      This text box is available only when the service does not yet exist. If the username specified in the Log on as text box requires a password, this field is where the password should be typed. If no  password is required, this field can remain blank.

      To edit the password after the service has been created, users need to use the Services Applet.

      Service Startup Type

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

      Interface 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 Interface Dependencies list using the “Add>>” 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.

      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

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

      Remove

      To remove a selected dependency, highlight the service name in the Installed 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 or Remove Interface Service

      Create

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

      Remove

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

Start or Stop Service

      To Start or Stop the interface service, use the Start button and the Stop button on the toolbar at the top of the PI-ICU. 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 Interface Service

 

 

Installing the Interface Service Manually

      If PI-ICU is not used to configure and control the interface service, the following describes the steps to manually configure and control the interface service. One can get help for installing the interface as a service at any time with the command: 
      PI_InTouch.exe –help

      Change to the directory where the PI_InTouch1.exe executable is located. Then, consult the following table to determine the appropriate service installation command.

      InTouch version 7.0 or greater can be installed as a NT service (view) and is recommended to do so. Consult the InTouch Users Manual for information on how to start InTouch as an NT service.

      NT Service Installation Commands on a PI Interface Node or a PI Server Node

      with Bufserv Implemented

      Manual service PI_InTouch.exe –install –depend “tcpip bufserv view”
      Automatic service PI_InTouch.exe –install –auto –depend “tcpip bufserv view  ”
      NT Service Installation Commands on a PI Interface Node or a PI Server Node

      without Bufserv Implemented

      Manual service PI_InTouch.exe –install –depend “tcpip view”
      Automatic service PI_InTouch.exe –install –auto –depend “tcpip view”
 

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

      Note: Interfaces are typically not installed as automatic services when the interface is installed on the PI Server node.

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

        

PointSource

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

      Case-sensitivity for PointSource Attributes

      One does not need to be careful with the case of the PointSource. In all cases, the point source character that is supplied with the /ps command-line argument is not case sensitive. That is, /ps=I and /ps=i are equivalent.

PI 2 Server Nodes

      The following point source characters are reserved on PI 2 systems and cannot be used as the point source character for an interface: C, ?, @, Q, T. Also, if one does not specify a point source character when creating a PI point, the point is assigned a default point source character of L. Therefore, it would be confusing to use L as the point source character for an interface.

      Before a PI point with a given point source can be created, the point source character must be added to the PI 2 point source table. For example, if point source I is not defined in the PI 2 point source table, a point with a point source of I cannot be created. This prevents the user from accidentally creating a point with an incorrect point source character.

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

PI 3 Server Nodes

      No point source table exists on a PI 3 Server, which means that points can be immediately created on PI 3 with any point source character. Several subsystems and applications that ship with PI 3 are associated with default point source characters. The Totalizer Subsystem uses the point source character T, the Alarm Subsystem uses G and @, Random uses R, RampSoak uses 9, and the Performance Equations Subsystem uses C. Either do not use these point source characters or change the default point source characters for these applications. Also, if one does not specify a point source character when creating a PI point, the point is assigned a default point source character of L. Therefore, it would be confusing to use L as the point source character for an interface.

 

 

PI Point Configuration

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

Tag

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

PointSource

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

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 2 Server Nodes

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

      PI 3 Server Nodes

      Float16, float32, 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.

Location1

      Location1 specifies the interface number. It identifies which points belong to a particular interface when multiple copies of the interface program are running. This value must match the /id=n number for the appropriate interface. With no /id= argument, this field should be zero.

Location2

      Location2 specifies the time offset in seconds. It adjusts the timestamp of a value to be the previous offset. It is used in cases where InTouch may not receive a value until sometime after it was actually recorded.

      For example, a device records a set of values every 15 minutes but takes several minutes to send these values to InTouch. These points should be configured to be scanned at a 15 minute scan rate as follows:

            /f=00:15:00,00:00:00

      This means scans will occur on the hour, 15 minutes past the hour, half past the hour, and 45 minutes past the hour. However, the values scanned really belong to the previous 15 minute time. Location2 for these points should be set to 900 (15 minutes).

      Scans can be late also so it is not just a matter of subtracting 15 minutes from the timestamp. For example, if an event is received by the interface at 12:15:30 (30 seconds late on this scan) then the nearest 15 minute timestamp is 12:15:00. The correct timestamp is the previous one, 12:00:00 which is what will be recorded with the above point configuration.

Location3

      This value indicates whether a point is an input or an output point:

      0 = input

      1 = output.

Location4

      Scan-based Inputs

      For 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 flag in the section called “Command-Line Parameters” on page 27.

      Event-based Inputs and Output Points

      Location 4 should be set to zero for these points.

Location5

      The Location5 attribute is not used by the PI-InTouch interface.

InstrumentTag

      The instrument tag attribute is limited to 32 characters.

      The instrument tag name specifies the InTouch point name associated with the PI tag.

ExDesc

      This is the extended descriptor attribute. It is limited to 80 characters.

      Trigger-based or Event-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” 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

      The extended descriptor is also checked for the string “PERFORMANCE_POINT”. If this character string is found, this point is treated as a performance point. See the section “Performance Point Configuration” on page 21 for more information.

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, SCAN OFF will be written to the PI point. If the scan attribute is changed from 1 to 0 while the interface is running, SCAN OFF will also be written to the PI point after the point edit is detected by the interface.

      There is one other situation, which is independent of the Scan attribute, where UniInt will write SCAN OFF to a PI point. If a point that is currently loaded by the interface is edited so that the point is no longer valid for the interface, the point will be removed from the interface, and SCAN OFF will be written to the point. For example, if the PointSource of a PI point that is currently loaded by the interface is changed, the point will be removed from the interface and SCAN OFF will be written to the point.

Shutdown

PI 2 Server Nodes

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

PI 3 Server Nodes

      The shutdown attribute is used only if the server node is a PI 3 system.

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

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

      Bufserv

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

SourceTag

      Output 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 register in a PLC, one would use an output point. Each interface has its own rules for determining whether a given point is an input point or an output point. There is no de facto PI point attribute that distinguishes a point as an input point or an output point.

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

Convers

      This attribute specifies the conversion factor that is used for scaling purposes. Scaling can be configured in three ways:

    • Convers = 0. No scaling will take place.
    • Convers <> 0 for Input Tags. The value in Convers is interpreted as a straight multiplier. This causes the input value from the WW InTouch server to be multiplied by the value in Convers before being sent to PI.
    • Convers <> 0 for Output Tags. The value being sent from PI to the WW InTouch server is divided by the value in Convers.

      The default value of Convers in PI 3 and PI 2 is 1.

 

 

Performance Point Configuration

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

Configuring Performance Points with PI-ICU

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

 
 

      The right mouse menu provides options for creating and deleting Performance Points.

      Create

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

      Delete

      To delete a Performance Point, right mouse 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 mouse clicking on the line belonging to the tag to be corrected, and selecting Correct. The Performance Points are created with the following PI attribute values. If ICU detects that a Performance Point is not defined with the following, it will be marked Incorrect:

      Attribute Details
      Tag Tag name that appears in the list box
      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”

 

      Rename

      To rename a Performance Point, right mouse 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 Manually

      Performance point configuration is the same on all operating system platforms. Performance points are configured as follows.

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

 

I/O Rate Tag Configuration

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

Monitoring I/O Rates on the Interface Node

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

Configuring I/O Rate Tags with PI-ICU (NT-Intel)

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

 

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

Enable IORates for this Interface

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

      Tag Status

      The Tag Status column indicates whether the IORates tag exists in PI. The possible states are:

      • Created – This status indicates that the tag exist in PI
      • Not Created – This status indicates that the tag does not yet exist in PI
      • Deleted – This status indicates that the tag has just been deleted
      • Unknown – This status indicates that the ICU is not able to access the PI Server
      In File

      The In File column indicates whether the IORates tag listed in the tag name and the event counter is in the IORates.dat file. The possible states are:

      • Yes – This status indicates that the tag name and event counter are in the IORates.dat file
      • No – This status indicates that the tag name and event counter are not in the IORates.dat file
      Event Counter

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

      Tagname

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

      Snapshot

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

Right Mouse Button Menu Options

      Create

      Create the suggested IORates tag with the tag name indicated in the Tagname column.

      Delete

      Delete the IORates tag listed in the Tagname column.

      Rename

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

      Add to File

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

      Search

      Allows the user to search the PI Server for a previously defined IORates tag.

Configuring I/O Rate Tags Manually

      There are two configuration steps for configuring an IORates tag manually.

Configuring the PI Point on the PI Server

PI 2 Server Nodes

      A listing of the I/O Rate Tags that are currently being monitored can be obtained with the command:

        @PISysDat:IOMonitor.com

       
      Create an I/O Rate Tag using one of the existing I/O Rate Tags as a template.

PI 3 Server Nodes

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

        Attribute Value
        PointSource L
        PointType float32
        Compressing 0
        ExcDev 0

Configuration on the Interface Node

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

      1. Edit/Create a file called iorates.dat in the PIHOME\dat directory. The PIHOME directory is defined either by the PIPCSHARE entry or the PIHOME entry in the pipc.ini file, which is located in the \WinNT directory. If both are specified, the PIPCSHARE entry takes precedence.

        Since the PIHOME directory is typically C:\PIPC, the full name of the iorates.dat file will typically be C:\PIPC\dat\iorates.dat.

        Add a line in the iorates.dat file of the form:

        intouch001, x

        where intouch001 is the name of the I/O Rate Tag and x corresponds to the first instance of the /ec=x flag in the startup command file. x can be any number between 2 and 34 or between 51 and 200, inclusive. To specify additional rate counters for additional copies of the interface, create additional I/O Rate tags and additional entries in the iorates.dat file. The event counter, /ec=x, should be unique for each copy of the interface.

      1. Set the /ec=x flag on the startup command file of the interface to match the event counter in the iorates.dat file.

      The interface must be stopped and restarted in order for the I/O Rate tag to take effect. I/O Rates will not be written to the tag until 10 minutes after the interface is started.

 

 

Startup Command File

Configuring the Startup Command File with PI-ICU

      The PI-InTouch interface has an ICU Control that will aid in configuring the interface startup command file:

 

General Options

      Wait time between reconnection attempts

      This specifies the number of seconds to wait between reconnection attempts. It allows the interface to start before InTouch does, in which case a connection will be attempted periodically until successful. The minimum period is 10 seconds and the maximum period is 600 seconds (10 minutes). The command line equivalent is /ws.

      Hold tag connection open between scans

      This allows the interface to hold a tag connection open between scans. The command line equivalent is /ht.

Failover

      Enable Failover

      If you are using failover nodes, checking this box will allow you to pass the required parameters to the interface. Un-checking this box will remove all command-line parameters relating to failover.

      InTouch host

      This specifies the name of the InTouch host that the interface is running on. This flag should be specified if configuring failover. The command line equivalent is /fs.

      InTouch point that specifies active server

      This specifies the name of the point on InTouch, which holds the name of the currently active server. This flag should be specified if configuring failover. The command line equivalent is /fp.

Timestamps

      Adjust the timestamp of scanned values

      This causes the interface to adjust the timestamp associated with scanned values by n seconds. This value can be a positive or negative number of seconds. The command line equivalent is /to.

InTouch-specific Debugging

      Output additional timestamp debug messages

      This causes the interface to output additional debug messages that are specifically associated with timestamps of scanned values. The command line equivalent is /tm.

      Write InTouch-specific messages to PI log file

      This causes PI-InTouch specific debugging messages to be sent to the PI log file. The passed debug level can be 0, 1 or 2, with 2 giving the most verbose output, 0 being the same as if this option were absent. The command line equivalent is /dd.

      Process this number of points only

      This option allows a limit to be placed on the number of tags that the interface will process. Passing a value of 10 forces the interface to only process the first 10 tags found – all other tags are ignored. The command line equivalent is /mt.

Additional Arguments

      The Additional Arguments section is provided for any flags that may be required in the future.

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

Configuring the Startup Command File Manually

      If the ICU Control is not used to configure the interface startup file, then the following section explains the arguments available for the .bat file.

      Command file names have a .bat extension. The NT continuation character (^) allows one to use multiple lines for the startup command. The maximum length of each line is 1024 characters (1 kilobyte). The number of flags is unlimited, and the maximum length of each flag is 1024 characters.

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

Command-line Parameters

      Parameter Description
      /fp=pointname

      Optional

      The /fp flag specifies the name of the point on InTouch, which holds the name of the currently active server. The flag should be specified if configuring failover. Refer to the InTouch User Guide, Monitoring the status of an I/O conversation chapter, for details on configuring this flag.
      /fs=servername

      Optional

      The /fs flag specifies the name of the InTouch host that the interface is running on. The flag should be specified if configuring failover.

      When the value of pointname matches servername, then data will be collected on this node. Refer to the InTouch Reference Guide for information regarding the GetNodeName( ) system function. This function returns the NetDDE node name to a string variable.

      /ws=n

      Optional

      The /ws flag specifies the number of seconds to wait between reconnection attempts. It allows the interface to start before InTouch does, in which case a connection will be attempted periodically until successful. Also, if InTouch exits, the interface will continue to operate, attempting a connection periodically until successful.

      The minimum period is 10 seconds and the maximum period is 600 seconds (10 minutes). If this argument is not specified then any failure to make a connection or loss of an existing connection will cause the interface to exit– this includes the initial connection at startup.

      /ht

      Optional

      The /ht flag allows the interface to hold a tag connection open between scans. If this is not specified then a tag connection is made, the tag is read, and the tag is disconnected, for each scan. This is obviously an inefficient way to process tags. For the sake of efficiency this argument should be specified except when the system resources are low and the interface becomes unstable.
      /to=n 

      Optional

      The /to flag causes the interface to adjust the timestamp associated with scanned values by n seconds. This value can be a positive or negative number of seconds. The PI server time is used as the base of the event’s timestamp. See the section “Source of Timestamps” on page 2 or the section on Location2 on page 15 for more information.
      /tm

      Optional

      The /tm flag causes the interface to output additional debug messages that are specifically associated with timestamps of scanned values. This can be useful in situations where time issues may arise, or when debugging any timestamp manipulation that is configured. .
      /mt=n

      Optional

      The /mt flag allows a limit to be placed on the number of tags that the interface will process. /mt=10 forces the interface to only process the first 10 tags found–all other tags are ignored. This is useful for debugging.
      /dd=n

      Optional

      The /dd flag causes InTouch specific debugging messages to be sent to the PI log file. N can be 0, 1 or 2, with 2 giving the most verbose output, 0 being the same as if “/dd=n” was absent.
      /db

      Optional

      The /db flag causes informative messages to be sent from the Universal Interface core to the PI log file for debugging or diagnostic purposes.
      /ps=x

      Required

      The /ps flag specifies the point source for the interface. x is not case sensitive and can be any single character. For example, /ps=I and /ps=i are equivalent.

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

      /id=x

      Optional

      The /id flag 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 on page 43.

      UniInt always uses the /id flag in the fashion described above. This interface also uses the /id flag to identify a particular interface copy number that corresponds to an integer value that is assigned to Location1. This allows multiple copies of the interface to run on the same node and handle different sets of tags. X must be the same as the Location1 field of each of the PI tags associated with this interface copy.

      The /id flag can also be useful in failover situations where different tags may require different failover nodes.

      For this interface, one should use only numeric characters in the identifier. For example,

      /id=1

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

      Required

       
      The /f flag 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 flag on the command line defines a scan class for the interface. There is no limit to the number of scan classes that can be defined. The first occurrence of the /f flag on 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” on page 21 for more information on skipped or missed scans.

      Sub-second Scan Classes:

      One can also specify sub-second scan classes on the command line such as

      /f=0.5 /f=0.1

      where the scanning frequency associated with the first scan class is 0.5 seconds and the scanning frequency associated with the second scan class is 0.1 seconds.

      Similarly, sub-second scan classes with sub-second offsets can be defined, such as

      /f=0.5,0.2 /f=1,0

      /host=host:port

      Optional

      The /host flag 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 and 545 for a PI 2 Server. It is recommended to explicitly define the host and port on the command line with the /host flag. Nevertheless, if either the host or port is not specified, the interface will attempt to use defaults.

      Defaults:

      The default port name and server name is specified in the pilogin.ini or piclient.ini file. The piclient.ini file is ignored if a pilogin.ini file is found. Refer to the PI-API 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 flags would be: 
      /host=marvin                       
      /host=marvin:5450  
      /host=206.79.198.30 
      /host=206.79.198.30:5450

      /stopstat 
      or 
      /stopatat= 
      digstate

      Default: 
      /stopstat= 
      ”Intf shut”

      Optional

      If the /stopstat flag is present on the startup command line, then the digital state I/O Timeout will be written to each PI Point when the interface is stopped.

      If /stopstat=digstate is present on the command line, then the digital state, digstate, will be written to each PI Point when the interface is stopped. For a PI 3 Server, digstate must be in the system digital state table. For a PI 2 Server, where there is only one digital state table available, digstate must simply be somewhere in the table. UniInt uses the first occurrence in the table.

      If neither /stopstat nor /stopstat=digstate is specified on the command line, then no digital states will be written when the interface is shut down.

      Examples: 
      /stopstat=”Intf shut”

      The entire parameter is enclosed within double quotes when there is a space in digstate.

      /ec=x

      Optional

      The first instance of the /ec flag on the command line is used to specify a counter number, x, for an I/O Rate point. If x is not specified, then the default event counter is 1. Also, if the /ec flag is not specified at all, there is still a default event counter of 1 associated with the interface. If there is an I/O Rate point that is associated with an event counter of 1, each copy of the interface that is running without /ec=x explicitly defined will write to the same I/O Rate point. This means that one should either explicitly define an event counter other than 1 for each copy of the interface or one should not associate any I/O Rate points with event counter 1. Configuration of I/O Rate points is discussed in the section called “I/O Rate Tag Configuration,” p. 23.
      /sio

      Optional

      The /sio flag stands for “suppress initial outputs.” The flag applies only for interfaces that support outputs. If the /sio flag is not specified, the interface will behave in the following manner.

      When the interface is started, the interface determines the current Snapshot value of each output tag. Next, the interface writes this value to each output tag. In addition, whenever an individual output tag is edited while the interface is running, the interface will write the current Snapshot value to the edited output tag.

      This behavior is suppressed if the /sio flag is specified on the command line. That is, outputs will not be written when the interface starts or when an output tag is edited. In other words, when the /sio flag is specified, outputs will only be written when they are explicitly triggered.

      /q

      Optional

      When the /q flag is present, Snapshots and exceptions are queued before they are sent to the PI Server node.

      The maximum queue size is close to 4000 bytes. The queue is flushed between scans if it is not filled.

 

Sample PI_InTouch.bat File

      The following is an example of a start-up file, PIInTouch.bat:

        REM    PI_InTouch.bat

        REM ----------------------------------------------------------------

        REM

        REM Sample startup file for the PI Wonderware InTouch interface.

        REM

        REM ----------------------------------------------------------------

        REM

        REM Required command-line parameters

        REM  /ps=x   Point source character

        REM  /f=HH:MM:SS  scan class

        REM

        REM Optional command-line parameters

        REM  /fp=pointname  InTouch point name

        REM  /fs=servername  InTouch host the interface is running on

        REM  /ws=n   Number of seconds between reconnection attempts

        REM  /ht   Hold tag connections open between scans

        REM  /to=n   Number of seconds to adjust timestamps by

        REM  /tm   Output debug messages associated with timestamps

        REM  /mt=n   Maximum number of tags

        REM  /dd=n   Output InTouch specific debugging messages

        REM  /db   Output UniInt debugging messages

        REM  /id=x   Interface identifier

        REM  /host=host:port  PI Home node

        REM  /stopstat=digstate Write digstate to every PI point when interface stops

        REM  /ec=x   Counter number for I/O Rate point

        REM  /sio   Suppress initial outputs

        REM  /q   Queue snapshots and exceptions

        REM Sample command line:

        REM PI_InTouch.exe /ht /ps=I /f=00:00:10 /id=1 /host=liz:5450 /ec=3

        REM

        REM ----------------------------------------------------------------

        REM Revison History

        REM Date      Author Comment

        REM 21-May-01 EW     Written

        REM ----------------------------------------------------------------

 

 

System Variable Path

      The InTouch directory must be added to the System Variable Path. To do this click on:

        Start Settings Control Panel System Environment

      Then highlight Path under System Variables and add the directory.

      For Wonderware InTouch version 6.0b the directory to add to the path is usually:

        C:\InTouch.32

      For version 7.0 the directory is usually:

        C:\Program Files\FactorySuite\InTouch.

      For example, if the local version of InTouch is 6.0b, the path might be:

        %SystemRoot%\system32;%SystemRoot%;c:\intouch.32

 

 

Interface Node Clock

      The correct settings for the time and time zone should be set in the Date/Time control panel. If local time participates in Daylight Savings, from the control panel, configure the time to be automatically adjusted for Daylight Savings Time. The correct local settings should be used even if the interface node runs in a different time zone than the PI Server node.

      Make sure that the TZ environment variable is not defined. The currently defined environment variables can be listed by going to Start | Settings | Control Panel, double clicking on the system icon, and selecting the environment tab on the resulting dialog box. Also, make sure that the TZ variable is not defined in an autoexec.bat file. When the TZ variable is defined in an autoexec.bat file, the TZ variable may not appear as being defined in the System control panel even though the variable is defined. Admittedly, autoexec.bat files are not typically used on NT, but this does not prevent a rogue user from creating such a file and defining the TZ variable unbeknownst to the System Administrator.

 

 

Security

      If the home node is a PI 3 Server, the PI Firewall Database and the PI Proxy Database must be configured so that the interface is allowed to write data to the PI Data Archive. See “Modifying the Firewall Database” and “Modifying the Proxy Database” in the PI Server manuals.

      Note that the Trust Database, which is maintained by the Base Subsystem, replaces the Proxy Database used prior to PI version 3.3. The Trust Database maintains all the functionality of the proxy mechanism while being more secure. 
      See “Trust Login Security” in the chapter “PI System Management” of the PI Universal Data Server System Management Guide.

      If the home node is a PI 2 Server, the read/write permissions should be set appropriately in the pisysdat:piserver.dat file on the PI 2 home node. For more information on setting permissions on PI 2, see the pibuild:piserver.txt file on the PI 2 home node.

      If the interface cannot write data to a PI 3 Server because it has insufficient privileges, a –10401 error will be reported in the pipc.log file. If the interface cannot send data to a PI2 Serve, it writes a –999 error. See the section “Appendix A: Error and Informational Messages” for additional information on error messaging.

        

Starting / Stopping the Interface

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

Starting / Stopping the Interface with PI-ICU

      The PI-Interface Configuration Utility can be used to start and stop the interface service.

 

      To Start or Stop the interface service, use the Start button and the Stop button on the toolbar at the top of the PI-ICU. 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 Interface Service

 
 

 

Starting / Stopping the Interface Manually

      If PI-ICU is not used, then the following sections describe how to manage the interface service manually.

Starting Interface as a Service

      If the interface was installed as a service, it can be started from the services control panel or with the command:

        PI_InTouch.exe –start

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

      Note: It is recommended to run the InTouch Application as a service also. Locate View.exe and from a command prompt type “view.exe –install”. Refer to the Wonderware Documentation for further details about installing as a service.

Stopping Interface Running as a Service

      If the interface was installed a service, it can be stopped at any time from the services control panel or with the command:

        PI_InTouch.exe –stop

      The service can be removed by:

        PI_InTouch.exe –remove

 

 

Buffering

      For complete information on buffering, please refer to the PI-API Installation Instructions.

      PI-API Node buffering consists of a buffering process which runs continuously on the local node, a PI-API library whose calls can send data to this buffering process, and a utility program for examining the state of buffering and controlling the buffering process.

Configuring Buffering with PI-ICU (NT-Intel)

      Buffering is enabled through the PI-Interface Configuration Utility’s Tools>API Buffering… menu. Unless buffering is explicitly enabled, the PI-API will not buffer data, sending data directly to the home node.

      The API Buffering… dialog allows the user to view and configure the parameters associated with the API Buffering (bufserv) process. The user can start and stop the API Buffering process from the Service tab:

 

Service Tab

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

      Service name

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

      Display name

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

      Log on as

      This text box allows users to set what user account the API Buffering service will use. If this text box is left blank, then LocalSystem is used. Typically, the API Buffering service needs to run under the local Administrator account.

      Password

      If the username specified in the Log on as text box requires a password, this field is where the password should be typed. If no password is required, this field can remain blank.

      Confirm password

      The Confirm password text box is used to confirm the password typed into the Password text box.

      Dependencies

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

      Start / Stop

      The Start / Stop buttons allow for the API Buffering service to be started and stopped.

      After a change is made to any of the settings on the Settings tab, the Save button must be clicked, and then the service must be stopped and restarted for the changes to be picked up by bufserv.

      Startup Type

      The Startup Type indicates whether the API Buffering service is setup to start automatically on reboot or manually on reboot, or is disabled.

      If the Auto option is selected, the service will be installed to start automatically when the machine reboots. 

      If the Manual option is selected, the interface service will not start on reboot, but will require someone to manually start the service. 

      If the Disabled option is selected, the service will not start at all. 

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

      Create / Remove

      The Create button creates the API Buffering service with the specified Dependencies and with the specified Startup Type

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

Settings Tab

      The Settings tab allows for configuration of the 7 configurable settings used by API Buffering. Default values are used if no other value is provided. The default value for each parameter, as well as the range, is specified next to each parameter.

 

      Enable API Buffering

      Enables the API Buffering feature.

      Maximum File Size

      Maximum buffer file size in kilobytes before buffering fails and discards events. Default value is 100,000. Range is 1 to 2,000,000.

      The Use Default button places the default value into the text box. To keep this value, click the Apply button.

      Send Rate

      Send rate is the time to wait between sending up to MAXTRANSFEROBJS to the server (milliseconds). Default value is 100. Range is 0 to 2,000,000.

      The Use Default button places the default value into the text box. To keep this value, click the Apply button.

      Primary Memory Buffer Size

      Primary memory buffer size is the size in bytes of the Primary memory buffer. Default value is 32768. Range is 64 to 2,000,000.

      The Use Default button places the default value into the text box. To keep this value, click the Apply button.

      Secondary Memory Buffer Size

      Secondary memory buffer size is the size in bytes of the Secondary memory buffer. Default value is 32768. Range is 64 to 2,000,000.

      The Use Default button places the default value into the text box. To keep this value, click the Apply button.

      Max Transfer Objects

      Max transfer objects is the maximum number of events to send between each SENDRATE pause. Default value is 500. Range is 1 to 2,000,000.

      The Use Default button places the default value into the text box. To keep this value, click the Apply button.

      Pause Rate

      When buffers are empty the buffering process will wait for this number of seconds before attempting to send more data to the home node. Default value is 2. Range is 0 to 2,000,000.

      The Use Default button places the default value into the text box. To keep this value, click the Apply button.

      Retry Rate

      When the buffering process discovers the home node is unavailable it will wait this number of seconds before attempting to reconnect. Default value is 120. Range is 0 to 2,000,000.

      The Use Default button places the default value into the text box. To keep this value, click the Apply button.

      Max Theoretical Send Rate

      This is the theoretical max send rate is calculated like this: 
      max = MAXTRANSFEROBJS / SENDRATE * 1000 
      Default value is 5000.

Configuring Buffering Manually

      If PI-ICU is not used to configure and manage Buffering, the following steps describe how to manually configure and manage Buffering. Buffering is enabled through the use of a configuration file, piclient.ini. Unless this file is modified to explicitly enable buffering, the PI-API will not buffer data, sending data directly to the home node.

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

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

      Configuration of buffering is achieved through entries in the piclient.ini file. The file is found in the dat subdirectory of the PIHOME directory (typically c:\Program Files\pipc\dat) under Windows NT. 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) to the desired values.

      The following settings are available for buffering configuration:

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

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

      Keywords Values Default Description
      PIHOMENODE string None Only used on Unix. On Windows, default 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 whose DST rules differ (seconds)

 

Sample piclient.ini File

      On Windows NT the default server information is stored in the pilogin.ini file so the piclient.ini would only have the [APIBUFFER] section. The BUFFERING=1 indicates that buffering is on. The MAXFILESIZE entry in Kbytes of 100000 allows up to 100 Megabytes of data storage. Do not use commas or other separators in the numeric entries. The retry rate is set to 600 seconds meaning wait 10 minutes after losing a connection before retrying.

      A piclient.ini file might look like:

        [APIBUFFER]

        BUFFERING=1

        MAXFILESIZE=100000

        ; The PI-API connection routines have a 1 minute default timeout.

        RETRYRATE=600

 

 

Appendix A: 
Error and Informational Messages

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

Message Logs

      The location of the message log depends upon the platform on which the interface is running.  See the UniInt End User Document for more information.

      Messages are written to PIHOME\dat\pipc.log at the following times.

  • When the interface starts many informational messages are written to the log. These include the version of the interface, the version of UniInt, the command-line parameters used, and the number of points.
  • As the interface retrieves points, messages are sent to the log if there are any problems with the configuration of the points.
  • If the /db is used on the command line, then various informational messages are written to the log file.

Messages

      InTouch is not running

      Verify InTouch is running.

      Tag refused: Maximum tag count exceeded.

      Reduce the number of tags.

      If experiencing problems with the InTouch interface, verify the following:
  • The interface must run on the same node as InTouch.
  • InTouch must be running before starting the interface.
  • InTouch must be configured as a service if configuring the interface as an automatic service.
  • Data from servers must be logged in InTouch or selected to gather data for all points (InTouch normally only collects data for points on the active displays)
  • The interface must be configured to “Interact with Desktop”.
  • If the InTouch screen stops updating, remove the /ht parameter from the command line.

System Errors and PI Errors

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

Error Descriptions on NT and Unix

      On NT, descriptions of system and PI errors can be obtained with the pidiag utility:

        \PI\adm\pidiag –e error_number

 

 

Revision History

      Date Author Comments
      22-may-01 EW Updated manual version 1.4.70 with skeleton v. 1.08.
      21-Aug-01 Chrys Format changes; footers; fix diagram w/ heading
      27-Sep-01 B Payne Removed reference to WWLogSvc, causes problems when trying to start the interface as a service with a depends on the WWLogSvc
      14 – May –02 CS Added information regarding Failover and changed all references to .exe file to use PI_InTouch.exe
      21-May-02 JPM Added WonderWare InTouch ICU Control to Startup Command File section.  Added ICU to IORates section and Perf Points section.
      14-Jun-02 B Payne Added to appendix A – more hints for troubleshooting.
      06-Sep-02 Holly Updated with info the Wise setup kit, updated sections on PI-ICU for IORates, PerfPoints, Service Config, Buffering. (1.4.72.0)
      26-Sep-02 B Payne Removed the reference to CHIP to PI from ICU section.
      23-Apr-03 B Payne Changed the version to 1.4.72.0
      05-Sep-03 B Payne Added support for Convers
      24-Oct-03 Holly Updated screen shots of ICU and ICU Control (1.4.73.0, doc rev A).
      28-Oct-03 Chrys 1.4.73.0 Rev B: fixed copyright, removed MS dlls, clarified Convers, added standard text for ICU into performance pts, fixed general options of ICU control, added trust to security
      29-Oct-03 Chrys 1.4.73.0 Rev C: fixed TOC
      23-Dec-03 B Payne 1.4.74.0 Rev C incremented version
      16-Dec-04 B Payne Updated supported InTouch versions. Updated supported features section.
      16-Dec-04 Chrys Version 1.4.74.0 Rev E: Specified which OS
           
   

 

   UniInt End-User Interface to the PI System 

 

 

 

   

 

 

 

 

 

Wonderware InTouch Interface to the PI System 

 

Wonderware InTouch Interface to the PI System 

 

 

 

 

 

 

 

 

 

Wonderware InTouch Interface to the PI System 

 

 

 

 

Search more related documents:Wonderware InTouch Interface to the PI System

Set Home | Add to Favorites

All Rights Reserved Powered by Free Document Search and Download

Copyright © 2011
This site does not host pdf,doc,ppt,xls,rtf,txt files all document are the property of their respective owners. complaint#nuokui.com
TOP