PI_OPCTool
User’s Guide

Version 2.2.1.0
Revision A

1

UniInt End-User Interface to the PI System

How to Contact Us

OSIsoft, Inc.
777 Davis St., Suite 250
San Leandro, CA94577USA
Telephone
(01) 510-297-5800 (main phone)
(01) 510-357-8136 (fax)
(01) 510-297-5828 (support phone)

Houston, TX
Johnson City, TN
Mayfield Heights, OH
Phoenix, AZ
Savannah, GA
Seattle, WA
Yardley, PA / Worldwide Offices
OSIsoft Australia
Perth, Australia
Auckland, New Zealand
OSI Software GmbH
Altenstadt,Germany
OSI Software Asia Pte Ltd.
Singapore
OSIsoft Canada ULC
Montreal, Canada
OSIsoft, Inc. Representative Office
Shanghai, People’s Republic of China
OSIsoft Japan KK
Tokyo, 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


OSIsoft, 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 party’s 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.
© 1998-2006 OSIsoft, Inc. PI_OPCTool.doc

1

UniInt End-User Interface to the PI System

Table of Contents

Introduction

Reference Manuals

Diagram of Hardware Connection

Principles of Operation

Installation

Starting PI_OPCTool

Connecting to an OPC Server

Connecting to an OPC Server on the Local Node

Connecting to an OPC Server on a Remote Node

Checking the Status of the OPC Server

Creating a Group

Adding Items to a Group

Displaying an OPC Server's Tags Automatically

Displaying an OPC Server's Tags Manually

Filtering Items

Adding an Item

Removing an Item

Reading Data

Executing Synchronous Read Operations

Executing Asynchronous Operations

Reading All Items in a Group

Reading One Item in a Group

Executing Advise Operations

Writing Data

Writing to an Array

Writing a Date or Time Value

Activating and Inactivating Items / Groups

Saving and Loading Configuration Data

Remote Operation

Technical Information

Troubleshooting

1

PI_OPCTool User's Guide1

Introduction

OPC (OLE for Process Control) is a standard established by the OPC Foundation task force to allow applications to access process data from the plant floor.

OPC servers with communication interfaces that comply with the OPC Standard allow client software applications that follow this standard to communicate with any of those servers without regard to hardware releases or upgrades.

The connection between the client and the OPC server is either through the Microsoft COM interface or through OLE Automation, and the client accesses data from the data cache maintained by the OPC server or requests that the server read the device directly.

This PI_OPCTool uses an OPC COM custom interface to communicate with OPC servers. Use this tool to help configure and use the OSIsoft OPC Interface with the OSIsoft OPC Server or to check communications with any third-party OPC server.

This tool runs on NT platforms running NT4, Windows 2000, or XP.

The PI_OPCTool provides the following features.

  • Connections to as many as five OPC servers.
  • Creation of up to ten groups with up to 200 items per group.
  • Synchronous read/write operations.
  • Asynchronous read/write operations.
  • Advise read operations.
  • Tag filtering for refining the tags to be displayed and assigned as OPC items.
  • Working configuration can be saved to files, to be used in creating PI tags and startup files for the PI OPC interface

This document describes the PI_OPCTool and how to use it to check communications with any Data Access version 1.0a or 2.0 OPC Server.

Reference Manuals

OSIsoft
  • OPC Server Manual
  • OPC Interface to the PI System
Vendor

The OPC standards are freely available from the OPC Foundation at

Diagram of Hardware Connection

1

PI_OPCTool User's Guide1

Principles of Operation

This tool is designed to allow the user to validate data communication with an OPC server. It is not intended to be used to collect data for practical purposes, or as part of a functional application, nor is it intended to be used to configure PI tags on any extended basis. It is simply provided as a way to test the functionality of an OPC server, and to verify that network and application permissions are correctly set to allow communication between an OPC server and a client application.

Specifically, the tool will execute one method of the OPC Data Access specification when one button is clicked, wherever that is practically possible. For some functions, more than one call to the OPC server may be made when one button is clicked, for example: when connecting to the server, the tool will attempt to acquire several COM interface pointers, and will make several calls to the server. But overall, as far as possible, the rule is one click, one call. This is expressly intended to help in debugging problems in communicating with OPC servers, or to help in debugging the servers themselves.

There is no provision for storing data received from the OPC servers, or for sending data from a file or another program to an OPC server. This tool is for interactive use only.

1

PI_OPCTool User's Guide1

Installation

The application does not require any installation. To use the online help, the help files (PI_OPCTool.hlp and PI_OPCTool.cnt) are required, but the only requirement for using the tool is the executable itself. The tool can run from a floppy or CD, if it is not on the hard disk.

The OPC proxy files must be installed on all machines, both client and server. These files can be obtained from the OPC Foundation, but both the client and the server probably include them in the installation.

This tool runs on NT platforms running NT4, Windows 2000, or XP.

1

PI_OPCTool User's Guide1

Starting PI_OPCTool

To start the PI_OPCTool, simply double-click on the PI_OPCTool.exe file. The PI_OPCTool appears as shown below.

1

PI_OPCTool User's Guide1

Connecting to an OPC Server

The PI_OPCTool can connect to a server that runs on the local node or on a remote node. The PI_OPCTool can display the names of installed OPC servers. If the name of the OPC server of the local node is not present, make sure that the OPC server or its client package is installed on this node. If the OPC server runs on another node, use the OPC Enumerator to locate it, if OPCEnum is installed on both nodes (described in this section). The PI_OPCTool can connect to as many as five OPC servers.

Connecting to an OPC Server on the Local Node

To connect to an OPC server on the local node, follow the steps below.

  1. Click as shown in the figure below to display a list of the OPC servers registered on the system.

  1. Select the appropriate server and then click Connect. For the local node, leave the Node Name field blank.
    A message box appears to confirm a successful connection and the name of the connected server appears in the Connected Servers field.

Connecting to an OPC Server on a Remote Node

The OPC Foundation has provided the OPC Enumerator tool to help establish connections between clients and servers that are on separate nodes. To use the tool, it must be installed on both nodes. The install kit for the OSIsoft OPC Interface installs OPCEnum on the client node in the Winnt/System32 directory and also places a set of files in the OPCEnum directory under the directory in which the OPC Interface was installed. To install the tool on another node, copy the files from the OPCEnum directory to the node and register them by running Register.bat. Then, check the DCOM configuration for the OPC Enumerator.

To connect to a server on a remote node, follow the steps below.

  1. Verify that the OPC Enumerator is installed on both nodes. Then, enter the node name in the Node Name field and click Connect. The PI_OPCTool will connect to the remote OPCEnum and get a list of the servers on the remote node.
  2. Click as shown in the figure above to display a list of the OPC servers registered on the remote node.
  3. Select the appropriate server and then click Connect again.
    A message box appears to confirm a successful connection and the name of the connected server appears in the Connected Servers field.

Checking the Status of the OPC Server

To check the server status, follow the steps below.

  1. Select the server in the Connected Servers field.
  2. Click Server Status.
    Information about the server appears in the Points field, as shown in the figure below.

1

PI_OPCTool User's Guide1

Creating a Group

Up to ten groups can be defined for each OPC server. Each group must have a different name, although the same name can be used on different servers.

To create a group for a server, follow the steps below.

  1. Select the server from list of servers in the Connected Servers field.
  2. Enter a name for the group in the Group field.
  3. Enter an update rate in milliseconds in the Update Rate field.
    This rate specifies how often the server will check for new values for the items in this group. The server may not be able to provide the requested update. If the actual rate is different, this value replaces the one that was entered.
  4. To create the group inactive, check the box next to the Inactivate button. This box is only enabled when a new group name is entered. Once the group is created, the user can activate and inactivate it using the button.
  5. Click Create as shown in the figure below.
    A message box appears to confirm a successful creation of a group, and the group is added to the list of Groups on this server.

Adding Items to a Group

Up to 200 items can be added to each group that is defined for an OPC server. Before adding items to a group, display the list of available tags on the server. Then choose the tags to monitor and add them to a group.

If the OPC server does not support browsing, the ItemIDs can be entered manually. Be aware that the ItemID has to exactly match what the server is expecting. This includes punctuation characters and upper or lower case of characters, and the full ItemID must be entered, which may consist of several segments.

Displaying an OPC Server's Tags Automatically

Depending on the capabilities of the server, all the tags on the server can be displayed in a flat or hierarchical format by clicking List Server's Tags. If the server's items are in a flat format, the tags appear as a simple list. If the server's items are in a hierarchical format, the list appears as a tree that can be expanded as needed.

To display all the tags on a server, follow the steps below.

Caution: Do not use List Server's Tags for DeltaV or PI OPC servers, or any other which is likely to have a great many items. "All the server's tags" can be hundreds of thousands, and the function may crash the application or simply take an hour or more to complete. Use Manual Tag List instead.

  1. Select the server from list of servers in the Connected Servers field.
    If the server has the capability of listing its items, the Browsable checkbox is checked. Otherwise, the server does not support this functionality.
  2. Click List Server's Tags. The tags appear as shown in the figure below. If the list is in a hierarchical format, expand the branches as needed.

Displaying an OPC Server's Tags Manually

The user can control how many tags that he/she wants the server to display. This is particularly useful if there are very many tags, which can take many minutes to display.

The Manual Tag List button displays one level of a hierarchical tree. Select either Branches, Leaves, or a Flat view of the item list. Leaves are Items that can be added to a group. Branches can have Leaves under them, and they can also be items themselves. A Flat view displays all Leaves below the selected Branch in a simple list.

If no displayed Item or Branch is selected, the tool will operate from the root of the server's Item tree. If a branch is selected, then the requested operation will be carried out at that position. This allows the user to first get a listing of the branches at the root level, then select a branch and proceed downward into the branches and leafs below that branch. If a Flat view is selected and a branch is selected, the tool will get a list of all the leaves below that selected branch.

The tags appear as shown in the figure below.

Filtering Items

Filter by selecting for Input/Output Items, or (if the server supports it) by specifying a server-specific filter string.

To filter the tags based on Input/Output :

  1. Select the server in the Connected Servers field.
  2. If the server has the capability of listing its items, the Browsable checkbox is checked. Otherwise, the server does not support this functionality.
  3. Choose to display a Branch, Leaf, or a Flat view of the item list.
  4. Select the Input (for all readable tags) or Output (for all writeable tags) checkboxes to select all readable or all writeable tags, respectively. Both boxes can be checked to list only items that are both readable and writable.
  5. As described above, either click List Server's Tags, or choose a branch and click Manual Tag List.

To filter using server-specific strings:

  1. Select the server in the Connected Servers field.
  2. If the server has the capability of listing its items, the Browsable checkbox is checked. Otherwise, the server does not support this functionality.
  3. Choose to display a Branch, Leaf, or a Flat view of the item list.
  4. Enter the filter string in the Filter box. These strings are free-form, and each server which supports filtering will have its own format for what can be put into the filter string.
  5. As described above, either click List Server's Tags, or choose a branch and click Manual Tag List.

Adding an Item

After the tags are displayed, choose the ones to add as items to a group.

To add the tags on a server to a group, follow the steps below.

  1. Select the server in the Connected Servers field.
  2. Select the group in the Group field the item will be added to.
  3. (a) If the server supports browsing, double-click the item in the browse tree, and the full ItemID of the Item will be copied to the Item field. The PI_OPCTool also adds the item to the Tag field, with the group name pre-pended. Edit the TAG field to make sure the tag name is unique.
    OR
    (b) If double-clicking the tag name does not add the item to the Item field, enter the item name manually. Enter a tag name in the Tag field as well.

Note: The Tag field is only a temporary name for this Item in this group. The same Item can be added to a group more than once, the same Item can be added to multiple groups. But each Item that is added to a group must have a unique Tag name. This tag has nothing to do with PI Tags, unless the configuration is saved and used it to create PI tags. The tag could be named "Fred"; it doesn't matter, as long as there's not already a "Fred" tag in the group.

  1. Click Add to Group to add the item to the group.
    A message box appears to confirm the successful addition of the Item to the group, and the item appears in the Points field as shown in the figure below.

Removing an Item

To remove an item, enter its name in the Tag field (double-click the item in the Points field instead) and click Remove from Group, as shown below.

1

PI_OPCTool User's Guide1

Reading Data

The PI_OPCTool can do synchronous and asynchronous read operations and both can be used to test communications with the server. However, the fact that the PI_OPCTool can do a synchronous read operation on the server does not mean that the OPC Interface (or third-party client) can also read data. The OPC Interface makes asynchronous calls to read data, because they are faster. Verify that data can be read with the PI_OPCTool using a refresh, asynchronous read, or advise operation, all of which are asynchronous calls.

Executing Synchronous Read Operations

To do a synchronous read operation, follow the steps below.

  1. Select the server in the Connected Servers field.
  2. Select the group in the Group field containing the items to be read.
  3. Click SyncRead, as shown below. The current values for all items in the group appear in the Points field.