Measurex Davinci Plug-In DLL

Measurex DaVinci Plug-In DLL
for OPC
Interface to the PI System

Version 1.04
28 October 2000

7

Measurex DaVinci Plug-In DLL for OPC Interface to the PI System 7

How to Contact Us

Phone / (510) 297-5800 (main number)
(510) 297-5828 (technical support)
Fax / (510) 357-8136
Internet /
World Wide Web / http://www.osisoft.com
Mail / OSI Software, Inc.
P.O. Box 727
San Leandro, CA 94577-0427
USA
OSI Software GmbH
Hauptstrabe 30
D-63674 Altenstadt 1
Deutschland /
OSI Software, Ltd
P. O. Box 8256
Level One, 6-8 Nugent Street
Auckland 3, New Zealand

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. HPUX 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.
Mx DaVinci Plug-In to OPC Interface

Ó 2000 OSI Software, Inc. All rights reserved
777 Davis Street, Suite 250, San Leandro, CA 94577

7

Measurex DaVinci Plug-In DLL for OPC Interface to the PI System 7

Table of Contents

Introduction 1

Principles of Operation 3

Plug-In Installation and Administration 5

Plug-In Directory 5

Installation Procedures 5

Upgrading the Plug-In 7

Moving the Plug-In to a New Directory 7

Uninstalling the Plug-In 7

Error and Informational Messages 9

Message Logs 9

Troubleshooting 9

System Errors and PI Errors 9

Appendix A: Use of AddOpcPluginStates.bat 11

Appendix B: Use of Configuration File 13

Revision History 15

7

Measurex DaVinci Plug-In DLL for OPC Interface to the PI System 7

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. PI data tags may become invalid for several reasons. A paper machine, for instance, may have a sheet break. In order to get complete information from the sensor gauge (through OPC), a plug-in DLL for the PI-OPC interface has been created by OSI. For the Honeywell-DaVinci system, this plug-in is called “PIOpcMxDaVinci.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.

7

Measurex DaVinci Plug-In DLL for OPC Interface to the PI System 7

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 or ‘extended descriptor’ (see the PI-OPC interface 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 PIOPC 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.

Every time array data is read, the plug-in, PIOpcMxDaVinci.DLL, examines the statuses associated with that data. If a given status condition is in effect, the plug-in will set the values for some or all of the array data with the system digital state associated with the error condition. If no status condition exists, the array data is sent to PI with no modifications.

Profile data is the only data for which special statuses 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:

·  OffSheetEdge:
Scanner does not normally reach that data box 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.

Note: The PI-OPC interface requires that array numbering start with 1. The Measurex DaVinci profiles start with 0. Therefore, a start box of 6 will result in array positions 1–6 having OffSheetEdge written to them. An end box of 995 will result in array positions 996-1000 having OffSheetEdge written to them.

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

·  FrameOffline:
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.

·  BadProfile:
Any problem with the specific gauge, such as 80% of input values out of range, gauge disabled, etc.

·  SinglePoint:
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).

7

Measurex DaVinci Plug-In DLL for OPC Interface to the PI System 7

Plug-In Installation and Administration

Plug-In Directory

The PIOpcMxDaVinci.DLL is installed as part of the PI-OPC interface installation into the Plug-in subdirectory. For instance, if the interface is installed in

D:\pipc\interfaces\opcint

then the DLL will be installed in

D:\pipc\interfaces\opcint\Plug-ins

Installation Procedures

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

Define Required Digital States

OffSheetEdge,SheetBreak, SinglePoint, FrameOffline, BadProfile, and Standardize digital states must be predefined 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: 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 OPCINT.BAT

The plug-in, PIOpcMxDaVinci.DLL, is installed as part of the PI-OPC interface installation 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=c:\pipc\interfaces\opcint\plug-ins\PIOpcMxDaVinci.dll ^

/dllconfig=c:\pipc\interfaces\opcint\plug-ins\PIOpcMxDaVinci.txt

After adding the last two lines, the PI-OPC interface will automatically load the plug-in at startup, and manifest DaVinci-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 Mx-DaVinci to adjust the profile tags’ status. This is accomplished by creating a few more PI tags. The scanner information is in the instrument tag field.

Starting and Ending Data Boxes

Configure these two tags for each profile, not each profile tag, but each profile.

·  scanner <n>/measurements/<meas>/last scan/trend/minimum valid index

This is used by the plug-in to determine valid starting data box. The OffSheetEdge digital state will get written to each tag in the profile array positions of one to the number sent to this tag.

·  scanner <n>/measurements/<meas>/last scan/trend/maximum valid index

This is used by the plug-in to determine valid ending data box. The OffSheetEdge digital state will get written to each tag in the profile array positions of the number sent to this tag plus 1 to the end of the array.

Note: The PI-OPC interface requires that array numbering start with 1. The Measurex DaVinci profiles start with 0. Therefore, a start box of 6 will result in array positions 1–6 having OffSheetEdge written to them. An end box of 995 will result in array positions 996-1000 having OffSheetEdge written to them.

Standardize

Only one PI tag with the OPC item number listed below needs to be configured for the interface to apply the Standardize digital state to all related profile tags. For example, if you have subscribed to several profiles from a single scanner, only one ‘scanner in standardize’ tag needs be configured.

·  scanner <n>/mss/status/scanner in standardize

The Standardize digital state will get written to each profile tag in all profiles associated with scanner <n>.

SheetBreak

Only one PI tag with the OPC item number listed below needs to be configured for the interface to apply the SheetBreak digital state to all related profile tags. For example, if you have subscribed to several profiles from a single scanner, only one ‘scanner in standardize’ tag needs be configured.

·  scanner <n>/mss/status/scanner in break

The SheetBreak digital state will get written to each profile tag in all profiles associated with scanner <n>.

SinglePoint and BufferedSinglePoint

Two tags need to be configured to apply the SinglePoint digital state to all related profile tags.

·  /scanner <n>/status/single point

·  /scanner <n>/status/buffered single point

Offline

Three tags need to be configured to apply the Offline digital state to all related profile tags.

·  /scanner <n>/status/OffLine

·  /scanner <n>/status/OffSheet

·  /scanner <n>/status/Maintenance

BadProfile

Configure this tag for each profile, not each profile tag, but each profile.

·  /scanner <n>/measurements/<meas., e.g. ‘basis weight’>/validity/valid status

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 and /DLLconfig command line parameters from the batch file, opcint.bat, and stop and restart the PI-OPC interface according to the instructions in the PI-OPC interface manual.

7

Measurex DaVinci Plug-In DLL for OPC Interface to the PI System 7

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 /idflag 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 PIHOMEentry 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 PIAPIInstallationInstructions manual.

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

Troubleshooting

Restarts: The Da Vinci server must be operational before starting the PIOPCINTinterface.

·  Removing the Ethernet cable and reconnecting it while the interface is operating recovers within about one minute and no user action is required.

·  Powercycling the API datacollector node starts up without user action.

·  Caution: restarting the Da Vinci while the interface is running will result in a state where no data may be connected indefinitely. The PI-API node must be restarted in this case. (Planned modifications in future Da Vinci servers should remove this restriction.)

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

7

Measurex DaVinci Plug-In DLL for OPC Interface to the PI System 7

Appendix A: Use of AddOpcPluginStates.bat

This option is only available when the PI Home Node is PI 3.

The plug-in requires several new digital states in the PI System Digital State Set that can be built automatically using an application called AddOpcPluginStates. The application consists of the following four files that are located in the plug-ins directory underneath the OPC interface directory:

·  AddOpcPluginStates.bat

·  NewStates.bat

·  AddStates.exe

·  MakeDumpSet.exe

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

D:\PI\adm\> AddOpcPluginStates

The required digital states will be added at the end of your PI System Digital State Set.