Usage Notes: ABB Nexus Add-In DLL for OPCINT interface



ABB Nexus Plug-In DLL

for OPC

Interface to the PI System

Version 1.03

How to Contact Us

|Phone |(510) 297-5800 (main number) |

| |(510) 297-5828 (technical support) |

|Fax |(510) 357-8136 |

|E-mail |techsupport@ |

|World Wide Web | |

|Mail |OSIsoft |OSI Software, Ltd |

| |P.O. Box 727 |P. O. Box 8256 |

| |San Leandro, CA 94577-0427 |Level One, 6-8 Nugent Street |

| |USA |Auckland 3, New Zealand |

| | | |

| |OSI Software GmbH |OSI Software, Asia Pte Ltd |

| |Hauptstra(e 30 |152 Beach Road |

| |D-63674 Altenstadt 1 |#09-06 Gateway East |

| |Deutschland |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_OPCPluginNexus.doc

( 2000 - 2001 OSI Software, Inc. All rights reserved

777 Davis Street, Suite 250, San Leandro, CA 94577

Table of Contents

Introduction 1

Principles of Operation 3

Installation Checklist 5

Plug-In Installation and Administration 7

Plug-In Directory 7

Installation Procedures 7

Define Required Digital States 7

Modify the OPCINT.BAT 7

Configure PI Tags 8

Upgrading the Plug-In 9

Moving the Plug-In to a New Directory 9

Uninstalling the Plug-In 9

Error and Informational Messages 11

Message Logs 11

Troubleshooting 11

System Errors and PI Errors 12

Appendix A: Use of AddOpcPluginStates.bat 13

Revision History 15

Introduction

The PI-OPC interface will retrieve all data from an OPC server, but when data stops flowing because of an emergency, the operator needs to know that there is a problem. Without modification, an OPC interface simply shows data when it is available, and ignores the reason it has stopped flowing. PI users need information about a datum’s specific error condition. In order to get complete information from the sensor gauge (through OPC), OSIsoft created a plug-in DLL for the PI-OPC interface, opcint.exe. For the ABB-Nexus system, this plug-in is in a file called PIOpcABBNexus.DLL.

Note: Neither this manual nor the plug-in are stand-alone products; they are to be used in conjunction with the PI-OPC interface.

Principles of Operation

The PI-OPC interface connects OPC variables (which are defined by OPC symbols for the specific device) to a PI tag. The OPC symbol for any PI tag is saved in that tag’s ‘instrument tag’ field, unless it is too long, in which case it is added to the ‘extended descriptor’ (see the OPCINT manual for exact tag configuration details). The primary type of data retrieved from paper machines is profile data. These data are configured as array data (please see the PI-OPC interface manual for proper configuration of array tags). Data is also available which indicates various statuses of the paper machine as well as the starting and ending boxes for valid profile data.

Profile tags from the ABB-Nexus system have OPC source symbols of the form:

PMn . AC450B . FRAMEn . (meas) . (SCNPROF/COMPPROF) . ProfileArray

The plug-in, PIOpcABBNexus.DLL, causes the tags described above to reflect a machine problem when it occurs. For example, PI tags might use “PM1.AC450B.Frame1.Moisture.Scnprof.ProfileArray” as their OPC symbol. These tags are profile tags. If there is a sheet-break on PM1, then all of those tags will change in PI from a numeric value (status good) to status “SheetBreak”, with no value. When the sheet-break condition is corrected, then each profile tag will change to good status, with a numeric value.

For ABB-Nexus, profile data is the only data for which special status will be applied. No other tags are affected. The status conditions which may invalidate a profile tag, and the digital state value which that tag acquires in that error condition are as follows:

• BadProfile:

Validity variable for that profile returned BAD. Any problem with the specific gauge, such as 80% of input values out of range, gauge disabled, etc.

• OffSheetEdge:

Scanner does not normally reach that databox position. The plug-in will write the digital state, OffSheetEdge, to the profile tags that are in positions less than the start box and which are in positions greater than the end box. Tags specifying the minimum and maximum valid data boxes for each profile are required for the plug-in to perform this function.

• SheetBreak:

Sheet-break has been detected on the frame. All profile tags associated with that scanner will have the status SheetBreak written to them.

• Standardize:

Frame is in standardize mode. All profile tags associated with that scanner will have the status Standardize written to them.

• SinglePoint:

Frame is in single-point data collection mode. Gauge on the same scanner has gone into single-point mode, which disables all gauges on the scanner from normal profile sampling. The results of single-point (or ‘buffered single-point’) sampling may be accessed through other (non-profile) Measurex OPC variables (instrument tags).

• FrameOffline:

Frame has been set offline. Frame is in a state which does not produce data, such as ‘Dead’, ‘Unavailable’, ‘Emergency Stop’, ‘Manual’, ‘Console Offsheet’, etc., which is not covered by the specific conditions described by other PI states.

Installation Checklist

This checklist should help you get the interface up and running with the plug-in. The steps should be followed in the order outlined below.

1. Install PI-OPC interface.

2. Define required digital states in the System Digital State table

BadProfile

OffSheetEdge

SheetBreak

Standardize

SinglePoint

FrameOffline

3. Modify OPCINT.BAT to activate the DLL.

4. Configure PI tags.

5. Start the interface.

Plug-In Installation and Administration

Plug-In Directory

The PIOpcABBNexus.DLL is on the CD with the PI-OPC interface. It must be manually copied into the plug-in subdirectory. For instance, if the interface is installed in

PIHOME\interfaces\opcint

then the DLL should be installed in

PIHOME\interfaces\opcint\plug-ins

Installation Procedures

Although the PIOpcABBNexus.DLL is included on the CD with the PI-OPC interface, one must configure some things before the DLL will be activated.

Define Required Digital States

BadProfile, OffSheetEdge,SheetBreak, Standardize, SinglePoint, and FrameOffline and digital states must be defined before the PI-OPC interface can run with the plug-in. The states are not case sensitive, but they must be spelled exactly as shown.

PI 3 Home Node

For a PI 3 home node, the DLL expects these digital states to be somewhere in the System Digital State Set. There is a program in the plug-ins directory supplied to add these states automatically. See “Appendix A: Use of AddOpcPluginStates.bat,”

PI 2 Home Node

For a PI 2 home node, the expected digital states may be anywhere in the digital state table. You need to add these manually.

Modify the OPCINT.BAT

The plug-in, PIOpcABBNexus.DLL, is on the CD with the PI-OPC interface and must be manually copied into the subdirectory called plug-ins underneath the OPC interface directory. The installer must activate the DLL by adding two commands to the batch file, opcint.bat, which specify its location. For example:

Opcint.exe /ps=O … ^

/DLL=PIHOME\interfaces\opcint\plug-ins\PIOpcABBNexus.dll

After adding the last two lines, the PI-OPC interface will automatically load the plug-in at startup, and manifest Nexus-specific behavior. If the interface is already running, you will need to restart the interface for the DLL to be activated.

Note: The “^” shown at the end of all lines in the command file, except for the last line, is a continuation character indicating that more command lines follow.

Configure PI Tags

The plug-in needs extra information from OPC/Nexus to adjust the profile tags’ status. For each profile, the following variables should be configured:

Frame Status

• PMn . AC450B . FRAMEn . DYD . FRAMESTATUS

Failure on this tag will cause an OffSheetEdge, SheetBreak, Standardize,or SinglePoint digital state to be written to each profile tag in all profiles associated with the given scanner. . Example instrument-tag: “PM1.AC450B.FRAME2.DYD.FRAMESTATUS” (e.g. machine 1, scanner 2).

Starting and Ending Data Boxes

• PMn . AC450B . FRAMEn . (meas) . (SCNPROF/COMPPROF) . FirstBox

First valid box. This is used by the plug-in to determine valid starting data box. Example instrument-tag: “PM1.AC450B.MOISTURE.SCNPROF.FirstBox”. For tags whose array index is lower than this number, a state of OffSheetEdge will be written.

• PMn . AC450B . FRAMEn . (meas) . (SCNPROF/COMPPROF) . LastBox

Last valid box. This is used by the plug-in to determine valid starting data box. Example instrument-tag: “PM1.AC450B.MOISTURE.SCNPROF.LastBox”. For tags whose array index is higher than this number, a state of OffSheetEdge will be written to PI.

Validity

• PMn . AC450B . FRAMEn . (meas) . (SCNPROF/COMPPROF) . ProfileValidity

Failure on this tag will cause the BadProfile digital state to be written to each profile tag in all profiles associated with the given scanner. . Example instrument-tag: “PM2.AC450B.FRAME1.BW1.SCNPROF.ProfileValidity” (e.g. machine 2, scanner 1, weight profile).

Only one instance of the variable needs to be configured for the interface to apply status to all related profile tags. For example, if you have subscribed to several profiles from a single frame, only one ‘FRAMESTATUS’ tag is required.

The above tags must be configured to update at the proper interval. For ABB-Nexus, they should be polled. ProfileValidity, FirstBox, and LastBox status tags should be polled at a rate slightly less than half of the minimum expected scan interval. FrameStatus may be handled in two ways: slow polling and a second tag configured on ‘Advise-On-Change’, or fast polling (e.g. five seconds or less). FrameStatus is a special case, because an emergency condition will cause all profile tags to be marked immediately after the interface gets the FrameStatus tag input, and not before.

Upgrading the Plug-In

If the plug-in is upgraded independent of the PI-OPC interface, install the plug-in in the appropriate directory. Then stop and restart the PI-OPC interface according to the instructions in the PI-OPC interface manual.

Moving the Plug-In to a New Directory

Although it is not recommended, it is possible to move the plug-in to a new directory. You will need to change opcint.bat to reflect the name of the new directory and then stop and restart the interface as described in the PI-OPC interface manual.

Uninstalling the Plug-In

If for some reason you want to run the interface without the plug-in, delete the /DLL command line parameter from the batch file, opcint.bat, and stop and restart the PI-OPC interface according to the instructions in the PI-OPC interface manual.

Error and Informational Messages

Error messages that are written to the message log are pre-pended by a string NameID. 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

Error and informational messages are written to the pipc.log file. The location of the pipc.log file is determined by the PIHOME entry in the pipc.ini file. The pipc.ini file should always be in the WinNT directory. For example, if the PIHOME entry is:

C:\PIPC

then the pipc.log file will be located in the c:\PIPC\dat directory.

For version 1.3 and greater of the PI-API, a process called pilogsrv may be installed to run as a service. After the pipc.log file exceeds a user-defined maximum size, the pilogsrv process renames the pipc.log file to pipcxxxx.log, where xxxx ranges from 0000 to the maximum number of allowed log files. Both the maximum file size and the maximum number of allowed log files are configured in the pipc.ini file. Configuration of the pilogsrv process is discussed in detail in the PI-API Installation Instructions manual.

Note: No messages are written to the command window when the interface is run interactively. All messages are written to pipc.log.

Troubleshooting

In general, if the plugin is installed and tags configured, data should be properly modified.

The plugin installation is successful if the message: “ABB Nexus Plug-In DLL version n.nn” appears in the logfile. If this message does not appear, then the plugin has not been successfully installed.

If the plugin is installed, and profile status is not correctly modified to reflect frame status conditions, then the frame status tags may not be correctly configured. Input on frame status and first/last box tags is necessary for the plugin to function.

Error: “PI digital state "(state name)" must be defined.” Interface will not start without the correct digital states defined in PI’s system state table. See appendix A.

Error: “ : bad 'dlldebug' value; must be from 0 to 10 (default 0)” Interface will not start if the /dlldebug option was used with anything but a number between 0 and 10.

Error: “/ts= : bad timestamp parameter” Interface will not start if the timestamp parameter was anything but N,Y,A, or U.

Error: “NULL handed to DLL_LOADSTRUCT: …” During tag initialization, there was a serious internal error in OPCINT. Contact PI tech support.

Error: “bad dev_struct pointer sent to plugin DLL” During a tag delete or edit, there was in internal error in OPCINT. Contact PI tech support..

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

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

\PI\adm\pidiag –e error_number

Appendix A:

Use of AddOpcPluginStates.bat

The plug-in requires several new digital states in PI’s system digital state table. PI 3 allows automatic addition of states to the system table using an application called AddOpcPluginStates, which should appear on your interface system after installation. The application consists of four files:

• AddOpcPluginStates.bat

• NewStates.bat

• AddStates.exe

• MakeDumpSet.exe

All of these files must be moved to the PI\adm directory of your PI 3 archive machine. They will not function unless moved to the PI archive machine, in the PI\adm directory. Log in as an administrator, go to a DOS prompt, and locate to the PI\adm directory. Make sure PI is running. Invoke:

D:\PI\adm\> AddOpcPluginStates

The required states should be added to your PI System Digital State table.

Revision History

|Date |Editor |Comments |

|02-Apr-01 |JML |Changed Format |

|05-Apr-01 |CG |Verified many of the changes |

|15-Feb-02 |WRI |Added troubleshooting and more tag configuration explanation |

| | | |

| | | |

| | | |

| | | |

| | | |

| | | |

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download