Вы находитесь на странице: 1из 38

Uniformance

OLE for Process Control


Real-Time Data Interface
Installation Guide
Copyright, Notices, and Trademarks

Copyright, Notices, and Trademarks


© Honeywell International Inc. 1998-2004. All Rights Reserved.
While this information is presented in good faith and believed to be accurate, Honeywell disclaims the implied warranties
of merchantability and fitness for a particular purpose and makes no express warranties except as may be stated in its
written agreement with and for its customers.
In no event is Honeywell liable to anyone for any indirect, special or consequential damages. The information and
specifications in this document are subject to change without notice.
Honeywell, Experion PKS, PlantScape, TotalPlant, Uniformance PHD, and Business.FLEX are U.S. registered
trademarks of Honeywell International Inc.
Other brand or product names are trademarks of their respective owners.

Release Information
Uniformance PHD
Revision 4
Revision Date: June 8, 2004
Document Number: RDI-320.4

Honeywell Process Solutions


WWW.ACS.HONEYWELL.COM
HONEYWELL 2500 W. Union Hills Dr.
Phoenix, Arizona 85027
©Honeywell International Inc.

ii • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Contents

Contents
Introducing the OPC RDI 5
RDI Description 5
Tag Capacity Limitations 5
Concurrent Interface Limitations 6
Data Throughput and Constraints 6
Required Support Files 6

Real-Time System Description 8

Installing the OPC RDI 9


Installation Prerequisites 9

Installation Checklist 9

Preparing the System Environment 10

Defining Source System Tag Attributes and Data Types 11

Completing the RDI Parameter Configuration Form 11

Completing the RDI Specification Form 14

Verifying RDI Type (RDI_intrf_params.Dat) 18

Increasing Maximum Tags (PHDParams.Dat) 18

Running RDI_Services 19
Modifying parameters after running RDI_Services -
Interfaces_CustomConfig.Dat 21
Interpreting GO File Options 22

Defining and Starting RDI on a Running PHD System 23

Modifying Registry Settings 24


Setting the Polled Mode Stamping Option 24
Setting the Exception Condition Option 24

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • iii
Contents

Setting the RDI Startup Option 25

Configuring PHD Tags 27


Tag Field Usage 27
PHD Tag Settings Required to Collect OPC Data Types 29

Troubleshooting 33
Common problems 33

PHD Confidence and OPC Quality 33

RDI Status 34

Problem Diagnosis 34

Glossary 35

Index 37

iv • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Introducing the OPC RDI

RDI Description
You can run the OPC (OLE for Process Control) RDI (Real-time Data Interface) in
polled or exception mode. The OPC RDI supports the following:
• Poll mode and Exception mode for reading single values,
• Exception mode for reading element values of an array, and
• Puts (downloads) for single values (puts are NOT supported for elements of an
array).
The OPC RDI returns most data types from an OPC Server. The client application
tells the OPC server the data type that the client wishes to receive. The OPC server
allows items to be a single value or an array of values. If the item contains an array
of values, the OPC RDI collects each element of the array into one PHD tag. The
OPC RDI supports only one-dimensional arrays.
The OPC RDI supports the following OPC standards:
• DA1.0a
• DA2.04
• DA3.0
• HDA 1.1 (for history recovery)
The OPC RDI defaults to DA3.0. If the OPC Server is not DA3.0 capable, then the
RDI attempts to use DA2.04 calls to the OPC Server.
If DA1.0a is needed, you must specify the /F option in the RDI configuration to force
the RDI to use DA1.0a access.
If DA2.04 is needed, you can specify the /X2 option in the RDI configuration to force
the RDI to use DA2.04 access.

Tag Capacity Limitations

The OPC Server defines these limitations.

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 5
Introducing the OPC RDI

Concurrent Interface Limitations

There is nothing in the OPC RDI client software that prevents multiple interfaces to a
single OPC Server. If the OPC Server supports more than one connection, you can
set multiple interfaces to a single OPC.

Data Throughput and Constraints

The data throughput and constraints vary significantly. Refer to the OPC Server
documentation on the throughput of the OPC Server.

Required Support Files

The following items are delivered as part of the interface:


• RDIOPC.dll
• RemoteOPC.exe
• RDIUtils.dll
The following diagram illustrates the RDI components used in the Local and Remote
implementations. Use the RDI Specification form in TPI to configure the RDI, run
the program RDI_Services run to establish the new RDI files. For a remote RDI,
copy and install the Remote EXE on the remote node.

6 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Introducing the OPC RDI

Figure 1 – Local and Remote Implementations – OPC

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 7
Introducing the OPC RDI

Real-Time System Description


OPC is a standard developed to communicate with numerous data sources related to
the process control industry. This standard allows a client application to be written
for communication with OPC servers from many different vendors. OPC is based on
the Distributed Component Object Model (DCOM) technology developed by
Microsoft.
The OPC RDI supports the DA 1, 2.04, 3.0 and HDA 1.1 OPC standards.
The architecture of process control systems varies between vendors. Data
communication is typically specific to the features and capabilities supported by
those platforms. Since OPC is an open technology standard, it provides a common
communication path to these different architectures. Because of this open technology,
some of the configuration for the PHD OPC RDI depends on the OPC server to
which it communicates.
The OPC specification reports values on an exception or polled basis:
• Polled mode (OPC Read Synchronous) – Uses Device Reads
• Exception mode (OPC Read Asynchronous) – Uses OnDataChange method
OPC refers to tags as items. The item name is a string of Unicode characters. Each
OPC server vendor can implement which string sequence makes an item.
REFERENCE: More information on OPC can be found in the publicly available
OPC specification. The OPC web address is: http://www.opcfoundation.org.

8 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Installing the OPC RDI

Installation Prerequisites
Verify that the following prerequisites have been completed before continuing to the
RDI installation procedures:
• Compatible version of the OPC Server is installed and operative.
• The network hardware is in place and operative that connects the OPC Server
node and the PHD Server.
• The appropriate PHD Server release is installed, configured, and running.
The PHD patch has been installed, if applicable.
• The OPC Server node is reachable by TCP/IP communication from the PHD
Server.
• The TotalPlant Information (TPI) application is installed on the machine you
plan to use to enter Oracle data and configure tags for the new RDI

Installation Checklist
Task Go to ! Notes

1. Prepare the System Environment


Install the client connection This guide – section Preparing
software, if necessary. the System Environment

2. Enter Oracle Data

In TPI, modify the Tag Source This guide – section Defining If parameters to be historized
Configuration form, if Source System Tag Attributes by PHD are not specified in
necessary. and Data Types the standard list (such as
parameters with larger fields),
then you must add them to
this form.
In TPI, complete the RDI This guide – section Completing Add parameters to the form, if
Parameter Configuration form, the RDI Parameter Configuration necessary.
if necessary Form
In TPI, complete the RDI This guide – section Completing Add the Update Frequency
Specification form. the RDI Specification Form parameter to the OPC source
system.

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 9
Installing the OPC RDI

Task Go to ! Notes

3. Verify System Configuration

Verify that the RDI type is This guide – section Verifying The OPC RDI type should be
present in the file RDI Type (RDI_intrf_params.Dat) present in the file, along with
RDI_intrf_params.Dat. its default RDI parameter
values. No action should be
required.
Modify the PHDParams.Dat This guide – section Increasing MAX_TAGS and
file, if necessary, to ensure that Maximum Tags MAX_TAGNO
tags to be built against the new (PHDParams.Dat)
RDI will not exceed the
specified maximum.

4. Create RDI

At a command prompt, execute This guide – section Running RDI_SERVICES <Oracle


RDI_SERVICES. RDI_Services user/password@database
instance> <DB provider>
In a running PHD system, use This guide – section PHDMAN EXECUTE
PHDMAN to define and start Interfaces.Dat
the RDI. Defining and Starting RDI on a
Running PHD System Interfaces_CustomConfig.Dat
(if needed)
PHDMAN STA INT

5. Modify Registry Settings

If appropriate, add the This guide – section Setting the Enable this option if you want
NewPolledModeStamping Polled Mode Stamping Option the RDI to defer its next scan
parameter to the registry for if it falls behind, instead of
the new RDI. starting it immediately after
the current scan.
If appropriate, add the • This guide – section Enable this option if you want
RunConditionMode parameter the RDIServer to generate
to the registry for the new RDI. • Setting the Exception exception data for a group of
Condition Option real-time tags associated with
• Exception Condition Interface this RDI, by polling them only
User Guide when data is required.

If appropriate, add the This guide – section Setting the Enable this option if you want
RDIDependency parameter to RDI Startup Option to startup RDIs in dependency
the registry for the new RDI. order.

6. Configure PHD Tags

In TPI, configure PHD tags. This guide - section Configuring TPI>Process History>Tag
PHD Tags Configuration form

Preparing the System Environment


The OPC Server and/or Client software must be installed before using the OPC RDI.
Prior to configuring any OPC RDI, a client connection to the OPC Server may have
to be installed on the node on which the OPC RDI will execute. The OPC Server
vendor provides the client connection software.

10 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Installing the OPC RDI

The RDI is designed to take advantage of the OPC Foundation's OPCENUM service
in order to connect to a remote OPC Server without having to install the OPC Server
vendor’s client. If the OPC Server is a DA 1.0a, then it will probably NOT have the
OPCENUM service installed. In this case, the OPC Vendor’s client must be installed
or the OPCENUM service can be installed on the OPC Server.

Defining Source System Tag Attributes and Data Types


The Tag Source Configuration form defines the data mapping between a source
system and PHD. Perform the following steps to add attributes for the source system
type to the TPI Tag Source Configuration form.
The following procedure is needed only when parameters to be historized are not
already specified in the RDBMS, such as parameters with larger fields.
Step Action

1 Open the TPI application.

2 Under Process History, open the form Tag Source Configuration.

3 Select Enter Query and select OPC as the system type.

4 In an empty record at the bottom of the form, add the information for
additional parameter(s), as necessary.

REFERENCE: For definitions of the PHD data types, refer to PHD System Manual,
section Understanding the Tag Source Definitions.

Completing the RDI Parameter Configuration Form


Honeywell does not put all of the available RDI command line parameters in the
Oracle database. Perform the following steps to add parameters, as needed.
Step Action

1 In the TPI application, under Process History, open the form RDI Parameter
Configuration.

2 Select Enter Query and select OPC as the Source System.


RESULT: The form displays default parameters for an OPC RDI (see Figure 2).

3 See Table 1 for the description of each field.


If additional parameters are needed in order to implement command line options
that are not currently available in form, add parameter Names and descriptions of
your choice to the bottom of the form. The parameters will then be available on
the RDI Specification form.
See Table 2 – Additional Command Line Options – OPC for descriptions of
additional parameters.

4 Close the form.

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 11
Installing the OPC RDI

Table 1 – RDI Parameter Configuration Form - OPC


Field Description

Source System OPC

Name Name of the parameter

XCOND_NOSYNCH (This parameter can be added if needed.)


OPC SERVER Note: Later, you will use the RDI Specification form to
MACHINE NAME change the parameter values for a specific OPC RDI.
SCANTIME Refer to Table 3 for parameter definitions.
POLL
NOINITTAG
MAXITEMS
DEBUGLEVEL
LOOKUPFILE
FORCEDA1
IGNORECLOCKDELTA
OPCSERVERHDA
LICENSEKEY
DEVICEREAD
ALWAYSVALIDATE
GROUPSCANRATE
SLOWINT
DELETEPUTGROUP
<nameofyourchoice> Refer to Table 2 – Additional Command Line Options – OPC.

Description Description of the parameter.

Required? Designates whether parameter is required.

Default Value Default value to be transferred to the RDI Specification form.

Validation Text The validation to apply when a value is entered in the RDI
Specification form.

You may choose to add any of the following options to the RDI Parameter
Configuration form, and then they will be available on the RDI Specification form.

Table 2 – Additional Command Line Options – OPC


Name Description

<nameofyourchoice> /XC enables RDI to convert Boolean values:


0 = 0 on read/write
Not zero = 1 on read
Not zero = -1 on write
<nameofyourchoice> /XI enables RDI to ignore OPC Server status.
<nameofyourchoice> /XL enables RDI to use licensed connection only.
<nameofyourchoice> /XN enables putting of NAN (not a number) values through
the RDI. The RDI is forced to write NAN value for Puts to ‘F’
and 'D' type tags when confidence is < 0.
<nameofyourchoice> /X2 forces the RDI to use DA 2 access.

12 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Installing the OPC RDI

Figure 2 – RDI Parameter Configuration Form – OPC

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 13
Installing the OPC RDI

Completing the RDI Specification Form


The parameters in the RDI Specification form define the behavior for a specific OPC
RDI. Perform the following steps to configure a specific RDI.
Step Action

1 In the TPI application, under Process History, open the form RDI Specification.

2 For a local RDI, select OPC as the Source System.


For a remote RDI, select GATEWAY as the Source System.

Note:
For a local RDI:
The parameter Names appearing in the RDI Parameter Configuration form for an
OPC source system will populate the RDI Specification form after you select OPC
as the source system. You will use the RDI Specification form to configure the
new OPC RDI.
For a remote RDI:
You will use the RDI Specification form for a GATEWAY source system to
configure the new remote RDI. The required OPC RDI parameters (such as
GROUPSCANRATE) are represented in the RDI Specification form for a
GATEWAY source system as RDIPARAMETER1-RDIPARAMETER6. You will
use RDIPARAMETER1-RDIPARAMETER6 to enter the appropriate values for the
parameters for a remote OPC RDI.

3 Enter data in the fields as required for the new RDI.


Note:
• After the master record is entered (top part of form), the parameters specific to
this type of RDI are displayed with their default values.
• The asterisks (*) in the table indicate mandatory fields.

For descriptions of the fields, refer to Table 3.

4 After entering the required data, close the form.

Table 3 – RDI Specification Form – OPC


Field Description
*RDI Name Enter the PHD Real-time Data Interface name (interface
instance name).
The RDI Name and Hostname combination must be a
unique identifier that will be used to identify data
parameters to be collected from the interface.
*Host Name Enter the name of the host on which the interface executes.
When you execute RDI_Services, the program only
processes the interfaces defined in the Oracle database for
the host on which RDI_Services is executing.
For PHD systems with buffered PHD Servers, the same
interface name can be defined on two different hosts.
*Description Enter the description of the RDI.

14 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Installing the OPC RDI

Field Description
Enabled Select whether the interface is enabled. If this flag is not
set, the RDI_Services program does not process this
interface.
Source System If local RDI, select OPC.
If remote or remote peer RDI, select GATEWAY.
This specifies the program name and the parameters
required for the interface.
Remote Interface? Not used on R200 PHD.
Remote Connect String Not used on R200 PHD.
Required? This field shows a value is required for the parameter. The
value in this field is a read-only attribute of the Name field.

Name Value Description


For a Remote and Remote Peer RDIs:
• The Gateway RDI Installation Guide describes the Gateway parameters.

• You will need to specify the values for the following parameters (such as OPC SERVER)
through the names RDIPARAMETER1 - RDIPARAMETERn.
For a Remote Peer RDI, additional parameters are described in the Remote Peer RDI
Installation Guide.
*OPC SERVER OPC HDA server name (PROGID) of the OPC Server. For
more information, refer to section "OPC Server Name."
*MACHINE NAME Hostname or IP address of the machine running the OPC
Server. Defaults to local hostname. If the OPC Server is
on the same machine as the OPC RDI, you may leave this
value blank (null string).
SCANTIME /S /S Causes the RDI to retrieve the timestamp from
the OPC Server; otherwise, the RDI generates a
timestamp after collecting the value.
POLL /P /P causes the RDI to run in poll mode (OPC Read
Synchronous); otherwise, it runs in exception
mode (OPC Read Asynchronous).
DEVICEREAD /RC /RC forces use of Cache reads.
/RD /RD forces use of Device reads (Polled mode
reads) instead of Cache reads. This is the default
mode.
NOINITTAG /I /I disables the insertion of a 0 value with a -1
confidence when the RDI is started, shutdown, or
every 24 hours when the RDI resynchronizes its
time with the OPC Server. Default is disabled.
MAXITEMS /M /M<number> limits the number of items in an OPC
group, where <number> is the maximum number
of items. (Make sure there are no spaces between
the /M and the number). Some OPC servers have
a maximum number of items per group.
Default is 250.
/M0 = Unlimited group size

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 15
Installing the OPC RDI

Field Description

DEBUGLEVEL /D /D<number> turns on the debug information to the


level specified by <number>. Leave at default
value of 0 (blank). Other values are for support
purposes only. Range 0-9
LOOKUPFILE /L /L<filename> specifies the filename of the lookup
file used when the Source Tag Specification
(src_tagname) field of the Tag Configuration form
is blank or contains _RDI_GET_ITEM. Used
when the OPC item names are >40 characters.
When creating the lookup file, refer to the section,
"Tag Field Usage," Source tagname.
FORCEDA1 /F /F specifies that the RDI should use DA 1.0a calls
to the OPC Server. Default is to use DA 3.0
IGNORECLOCKDELTA /C /C specifies that the RDI should ignore the clock
delta difference in time stamps received from the
OPC Server.
OPCSERVERHDA /H /H<OPC HDA server name> specifies the
PROGID of the OPC HDA Server to be used for
history recovery. This is assumed to be on the
same machine as the OPC DA Server and use the
same item names.
LICENSEKEY /K /K<keyvalue> specifies a license key to use when
connecting to an OPC Server that requires a
license key.
ALWAYSVALIDATE /V /V forces use of ValidateItems calls before
AddItems calls for Polled mode.
GROUPSCANRATE /G# /G# changes the requested update frequency for a
group sent to the OPC Server to # milliseconds.
Default is 1000 milliseconds.
By default, the OPC RDI creates an “active” OPC
group with an update frequency of 1000 msec.
This causes the OPC Server to request data from
the source system once per second, regardless of
the scan frequency configured on the PHD tag.
SLOWINT /XS /XS specifies that items are added to groups one
at a time instead of in blocks.
DELETEPUTGROUP /XR /XR specifies that a group should be created and
deleted on each Put request, instead of reusing
the group for each Put request
(The following options may be available on this form, if they were added to the RDI
Parameter Configuration form.)
XCOND_NOSYNCH Optional. For an Exception Condition interface, you can
add this parameter (as the first RDI parameter) to indicate
that polling does not synchronize with clock offsets.
REFERENCE: Later in the RDI installation, the Exception
Condition feature is then set also (see the section "Setting
the Exception Condition Option").

16 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Installing the OPC RDI

Field Description

If XCOND_NOSYNCH is not specified, you may configure


parameters OFFSET and/or REMSYNCH (through the
RDI_services program) to control timing of polling (see the
section "Running RDI_Services").
<nameofyourchoice> /XC /XC enables RDI to convert Boolean values:
0 = 0 on read/write
Not zero = 1 on read
Not zero = -1 on write
<nameofyourchoice> /XI /XI enables RDI to ignore OPC Server status.
<nameofyourchoice> /XL /XL enables RDI to use licensed connection only.
<nameofyourchoice> /XN /XN enables putting of NAN (not a number) values
through the RDI. The RDI is forced to write NAN
value for Puts to ‘F’ and 'D' type tags when
confidence is < 0.
Only applies to DA1 and DA2 connections.
For DA3, the value is written as is, but the quality
is changed to BAD. The DA3 behaviour occurs
regardless of the value specified for this option.
<nameofyourchoice> /X2 /X2 forces the RDI to use DA2 access. Default is
to use DA 3.0

OPC Server Name


The OPC Server Name is the Program ID (PROGID) that defines the OPC Server to
be used. The OPC Server name will allow the OPC RDI to retrieve the Class ID
(CLSID) for the OPC RDI. In place of the PROGID, the CLSID may be specified.
If specifying the CLSID, ensure the enclosing brackets [“{“, “}”] are used.
If the RDI is executed with no OPC DA Server Name then it will list all the
registered PROGID’s listed on this machine. If the OPC Server is on another
machine, then you will need to find the PROGID of the OPC Server from that
machine.

Honeywell TPS App Node Example:


The registry values are as follows:
HKEY_CLASSES_ROOT\Hci.TPNServer

HKEY_CLASSES_ROOT\Hci.TPNServer\CLSID = {ADF6AEBB-B0F1-11d0-8A01-00C04FC97D9D}

HKEY_CLASSES_ROOT\Hci.TPNServer\OPC

HKEY_CLASSES_ROOT\Hci.TPNServer\OPC\Vendor="Honeywell IAC Inc."

If the PROGID will be used, the OPC Server name to be used is “Hci.TPNServer”.
If the CLSID will be used, the OPC Server name to be used is
“{ADF6AEBB-B0F1-11d0-8A01-00C04FC97D9D}”.

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 17
Installing the OPC RDI

Verifying RDI Type (RDI_intrf_params.Dat)


The OPC RDI type should appear in the RDI_intrf_params.Dat file, as shown in the
following figure.

Figure 3 – RDI_intrf_params.Dat File

The format of each line in the file is shown below:


RDI Type, Exception Interface, History Recovery, Path, File name

The following table defines the fields of each line in the file.

Table 4 – Entries for RDI Type - RDI_intrf_params.Dat


Field Description

RDI Type RDI type


Exception Interface 0 = Polled Mode RDI
1 = Exception Based RDI
History Recovery 0 = No History Recovery
1 = Use History Recovery
Path Location of the DLL. Always leave this value PHD_EXEC.
Filename Name of the file on the PHD Server

Increasing Maximum Tags (PHDParams.Dat)


Perform the following steps to view or modify the maximum number of tags
configured for the PHD System, to ensure that tags built against the new RDI do not
exceed the specified maximum.

18 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Installing the OPC RDI

Step Action

1 Open the file <install directory>PHDServer\NTSite\PHDParams.Dat.

2 If necessary, increase the values of the following parameters:


• MAX_TAGS - Maximum number of defined tags.

• MAX_TAGNO - Maximum possible tag numbers.

3 Save the file.

4 If you modified the above parameters, then you need to Stop and Cold Start the
PHD Server in order to resize its global memory sections.
To restart the PHD Server, execute the following commands at a command
prompt:
PHDCTL STOP
PHDCTL START COLD

Running RDI_Services
Perform the following steps to run the RDI_Services interface configuration program,
which creates the files for a particular RDI.
Attention: Make sure you did NOT delete "127.0.0.1 localhost" from the Hosts file
on the PHD Server (Windows\system32\drivers\etc). The RDI_Services program
uses this entry (which was created when Windows was installed). If deleted,
RDI_Services and the RUNRDI utility will not function properly.

Note: The following steps must be performed on the PHD Server machine. You
must be logged on to the operating system as a user that is member of
PHD_MANAGER and Administrators groups.
Step Action

1 Make a backup copy of the following files located at <install directory>


\PHDServer\NTSite\:
Interfaces.dat and Start_Interfaces.dat.

2 Open the backup copy of the Interfaces.dat file and keep it available on the
screen to reference.

3 If necessary, evaluate the offsetting scheme (OFFSET parameters) of the existing


RDI's in the Interfaces.dat file.

4 If new RDI's have been previously created in error, for each RDI execute the
following at a Command prompt:
PHDMAN SHUT INT <RDI Name>
ATTENTION:
RDI_Services attempts to copy new dlls for every RDI configured for this node. If
you choose to leave existing RDIs running on this node, then when RDI_Services
attempts to copy the dll for a running RDI, the copy fails and an error message is
output.

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 19
Installing the OPC RDI

Step Action

5 At a command prompt on the PHD Server where the interface is to run, execute
the following command from the <install directory>:
RDI_SERVICES <Oracle user/password@database instance> <DB provider>
• Substitute your system's user name, password and database name. You may
use PHD_READONLY user/password as it exists by default in the database
and has access that is sufficient for rdi_services.
• Specify either OraOLEDB.Oracle or MSDAORA as the DB provider.

Refer to the PHDParams.Dat file to see which DBProvider is used on your


system. OraOLEDB.Oracle is the Oracle provider. MSDAORA is the Microsoft
provider.

Example: RDI_SERVICES PHD_READONLY/PHD_READONLY


@TOTALPLANT MSDAORA

6 For definitions of the interface parameters for which RDI_SERVICES prompts,


refer to Table 5 – Parameters Prompted by RDI_Services.
Respond to the questions regarding each RDI. Use the open copy of the
Interfaces.dat file as a reference for the existing RDIs, as well as the result of your
evaluation of the OFFSET parameters done at step 3.
RESULT: After you respond to the final prompt, the appropriate files are created
and updated.

7 Verify that RDI_Services accomplished the following for the new RDI:
• Created a GO_<rdiname>.CMD file.

• Created a KILL_<rdiname>.CMD file.

• Rewrote the Interfaces.Dat file to add commands that define the new RDI.

• Rewrote the Start_Interfaces.Dat file to add commands for starting the new
RDI.
• Copied DLL for interface type as RDI<rdiname>.DLL to the RDI directory.

8 Verify that the Interfaces.Dat and the Interfaces_CustomConfig.Dat files contain


the appropriate parameters.
REFERENCE: For examples of the Interfaces.Dat, Interfaces_CustomConfig.Dat,
and Start_Interfaces.Dat files, refer to the Basic RDI Installation Guide.
9 Verify that the GO file reflects the correct RDI parameters entered through the
RDI Specification form. Refer to section "Interpreting GO File Options."

20 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Installing the OPC RDI

Table 5 – Parameters Prompted by RDI_Services


This parameter… Sets this…

MIN_HISTRECMN (D) - Minimum duration (minutes) of system outage for


invocation of history recovery from real-time system. No
history recovery is performed if this value and the
MAX_HISTRECMN are set to 0.
MAX_HISTRECMN (D) - Maximum recoverable history duration (minutes)
XSCANSECS (D) - Exception interface scan wait interval (scan interval
in exception mode). The real-time system will be queried
for values at this interval (seconds).
REMCLOCK (D) - Use remote real-time system clock for timestamps.
REMSYNCH (D) - Synchronize the remote clock.
OFFSET (D) - Offset in seconds for scan cycle.
Typically, you change the OFFSET parameter if the
purpose of the new RDI is to achieve better load leveling.
Note: To minimize overlap, offset the scan cycles relative
to each other by setting the OFFSET parameters to
different prime numbers.
Note: The above parameters are dynamic and therefore can be changed while the
PHD Server is running; however, you may have to restart the RDI for the changes to
affect the RDI. So, if you changed the parameters for an existing, running RDI, you
may have to restart it to implement the change.

Modifying parameters after running RDI_Services -


Interfaces_CustomConfig.Dat

To modify the value of any of the prompted parameters after running RDI_Services,
you may add Set commands to the file Interfaces_CustomConfig.Dat, instead of re-
running RDI_Services:
SET <rdiname>:<parametername> <value>
The file is executed automatically upon system startup, after automatic execution of
Interfaces.Dat. You may execute the file manually through PHDMAN.
Note: The above parameters are dynamic and therefore can be changed while the
PHD Server is running; however, if you change parameters for a running RDI, you
may have to restart the RDI for the changes to affect the RDI.
REFERENCE: For additional information on setting RDI parameters, refer to the
section "Set Interface Parameters." in the PHDMAN User Guide.

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 21
Installing the OPC RDI

Interpreting GO File Options

The GO_<rdiname>.cmd and KILL_<rdiname>.cmd procedures are created


automatically after you initialize the RDI Specification form for this interface and
execute the RDI_Services program.
The GO procedure passes parameters to the interface program as defined below:
-oRUNRDI [ –p<port number>] "-oRDI<rdiname>.OUT" RDI<rdiname> <rdiname>
[optional params]
The following table describes the parameters that the GO procedure passes to the
interface program.
REFERERENCE-For definitions of the GO file options that are applicable to a
remote (Gateway) RDI, refer to the Gateway RDI Installation Guide.

Table 6 – Go File Options – OPC RDI


Parameter Description

–P<port number> (Optional) RDI_Services does not define this parameter. If this
parameter is needed, it must be entered manually into the GO
file. If the PHD Server has more than one RDIServer, then this
parameter represents the port number of the RDIServer to which
this RDI is associated.
-oRDI<rdiname>.OUT Specifies the file in the LOG FILES directory where the RDI
outputs information.
Where <rdiname>is the interface instance name as specified in
the RDI Specification form.
RDI<dllname> Present, but not actually used in PHD R2xx.
<rdiname> The interface instance name as specified in the RDI Name field
of the RDI Specification form.
(Optional) The following parameters must follow the first two required parameters, but may
be in any order.
XCOND_NOSYNCH Refer to Table 3 – RDI Specification Form – OPC
/C
/F
/G#
/H<OPC server
name>
/i
/K<keyvalue>
/L<filename>
/M<#>
/P
/RC
/RD
/S
/V
/XC Refer to Table 2 – Additional Command Line Options – OPC
/XI
/XL

22 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Installing the OPC RDI

Parameter Description
/XN
/XR
/XS
/X2

Defining and Starting RDI on a Running PHD System


To complete the definition of an interface in a running PHD System, perform the
following steps to manually execute the following files through the PHDMAN utility:
• Interfaces.Dat,
• Interfaces_CustomConfig.Dat (if needed), and
• Start_Interfaces.Dat.
Note: Performing a system startup of a PHD System causes the above files to be
executed automatically.
Step Action

1 On the PHD Server, open a command prompt and change directories to the
<install directory>phdserver\ntsite, and then enter the following command:
PHDMAN EXECUTE Interfaces.Dat
Note: Alternatively, you can use the PHDMAN shortcut on the desktop,
which defaults to the path of the ntsite directory.

2 Verify that the new RDI is now available:


PHDMAN SHO INT

3 Enter the following command to set any RDI modifications you entered into
the Interfaces_CustomConfig.Dat file, if any:
PHDMAN EXECUTE Interfaces_CustomConfig.Dat

4 Enter one of the following commands to start the new RDI:


To start all non-running RDI's - PHDMAN EXECUTE Start_Interfaces.dat
OR
To start a single RDI - PHDMAN STA INT <RDI Name>
5 Verify the RDI status:

PHDMAN MON INT *

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 23
Installing the OPC RDI

Modifying Registry Settings

Setting the Polled Mode Stamping Option

A registry entry (NewPolledModeStamping) can be used to enable an alternate


polling mode for an RDI:
• Disabled (0) - Default. If the RDI detects that the current scan has fallen behind,
it still schedules the next scan immediately after the current scan is complete (PHD
R150 behavior).
• Enabled (1) - If the RDI detects that the current scan has fallen behind, it defers
polling until the next scheduled scan cycle. An overloaded source system may
experience reduced loading with this setting, but will also experience skipped
scans.
If needed, perform the following steps to add/enable the parameter in the registry:
Step Action

1 At the Run command, open the registry editor: regedit

2 Go to the following registry location: HKLM \ SYSTEM \ CurrentControlSet \


Services \ <RDIServer> \ Parameters \ RDIList \ <rdiname>

3 Add a new DWORD parameter:

a) Right-click>New>DWORD Value.

b) Enter NewPolledModeStamping as the name.


4 Enter the parameter value:

a) Right-click NewPolledModeStamping>Modify.

b) Set the value to 1 to enable the new polled mode.


5 Close the registry editor.

Setting the Exception Condition Option

A registry entry (RunConditionMode) can be used to enable the Exception Condition


feature for any RDI running as a polled mode interface.
When enabled, the exception condition feature generates exception data for a group
of real-time tags by polling them when data is required, as defined through Condition
tags and Virtual Calculation tags.
If needed, perform the steps to add/enable the parameter in the registry.
REFERENCE: For instructions on how to implement the Exception Condition
feature, refer to the Exception Condition Interface User Guide.

24 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Installing the OPC RDI

Setting the RDI Startup Option

A registry entry (RDIDependency) can be added to enable the option that starts RDI's
in dependency order. When a request is made to start all RDIs (Start Int *), the
startup of any RDI can be delayed until other RDIs, upon which it is dependent, are
started.
For each RDI, you can specify one or more RDIs on which it is dependent.
Tag Routing is an example of an RDI function for which RDI startup dependency
may be a concern.
If needed, perform the following steps to add/configure the parameter in the registry:
Step Action

1 At the Run command, open the registry editor: regedt32

2 Go to the following registry location: HKLM \ SYSTEM \ CurrentControlSet \


Services \ <RDIServer> \ Parameters \ RDIList\<rdiname>

3 Use one of the following procedures, depending on the operating system, to


add a new multiple string value:
Windows 2003:

a) Right-click>New> Multi-String Value.

b) Enter RDIDependency as the Value Name.


c) Right-click RDIDependency> Modify.

d) On separate lines, enter the name of each RDI upon which this RDI
is dependent.

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 25
Installing the OPC RDI

Step Action

e) Click OK.
Windows 2000:

a) Edit > Add Value

b) Data Type> REG_MULTI_SZ


c) Enter RDIDependency as the Value Name.

d) Click OK.
e) On separate lines, enter the name of each RDI upon which this RDI
is dependent.

f) Click OK.

4 Close the registry editor.

26 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Configuring PHD Tags

Note: If tags are already built, but are not yet associated with the RDI, enter the RDI
assignment for the tags, and then enter the following command to cause PHD to re-
query Oracle for the tags: PHDMAN UPDATE TAG FULL
ATTENTION: Executing UPDATE TAG FULL may result in a gap in data
collection.
After the interface is defined and started, perform the following steps to configure
PHD tags for the RDI through TPI.
Step Action

1 In the TPI application, under Process History, open the form Tag
Configuration.

2 Configure PHD tags against new RDI.


Refer to following sections for details.

3 Verify that the new RDI collects tag values by entering the following
command at a command prompt or through the PHDMAN shortcut on the
desktop.
PHDMAN MON QUE <Tag name>

Tag Field Usage

The OPC interface uses PHD tag fields as described in the following table.
Field Description

System type OPC


Source tagname Normally, this field contains the OPC server item name, but if the
name is longer than 40 characters, leave the field blank or specify
_RDI_GET_ITEM_.
If you specify _RDI_GET_ITEM_ or leave the field blank, then the RDI
will look for the tag number in a lookup file and use the associated
longer item name. The filename of the lookup file is specified in the
RDI Specification form.
The format for the data in the lookup file is:
<PHD tag number>,<OPC item name to be associated to the PHD
tag>
The OPC item names in the file can be of any length.
Examples of data in the lookup file:
• 23,/northplant/area1/unit45/element92/longtagname.pv

• 45,shorttag.pv

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 27
Configuring PHD Tags

Field Description

Source tagtype OPC Data type (See the section "OPC Source Tag Types")
Source attribute This field must be equal to VALUE, VALUExx, ARRAY or ARRAYxx
Where xx is the number of characters in the ASCII string to be
collected.
VALUE or VALUExx causes the RDI to convert the value associated to
the OPC item into the appropriate PHD tag value.
ARRAY or ARRAYxx causes the RDI to convert an element of the
array associated to the OPC item into the appropriate PHD tag value.
− Source Indexb will specify the element to be saved.

− OPC item names with a src_indexb of –1 represent the array


dimension. Other PHD tags with ARRAY or ARRAYxx and the
same OPC item name will be associated to the dimension tag.
− For all PHD tags associated to the same OPC item that is an
array of values, the Scan Seconds tag field must be the same
value.
Source indexb This field is only used when the Source Attribute is ARRAY or
ARRAYxx. The integer value identifies the OPC item value’s array
element to be associated with the PHD tag. The index values start
with 0 and go through the size of the array – 1. Negative values in this
field indicate the following:
• -1 PHD Tag value is the Array Dimension. (tagtype must be I4)

• -2 PHD Tag value is the Array Size (tagtype must be I4)

• -3 PHD Tag Value is the Array Lower Bounds (tagtype must be I4)

If src_indexb is greater than or equal to 0, then the tag value returned


is the value in the array at src_indexb.
Otherwise, the tag value is set to the dimension of the array, the size
of the array, or the lower bounds of the array, depending on the value
in the indexb field.
Currently, only one-dimensional arrays are supported, so if the
dimension is greater than one, an error will be returned for this tag and
all associated tags.

28 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Configuring PHD Tags

PHD Tag Settings Required to Collect OPC Data Types

The PHD source tagtype field indicates the OPC data type requested and how this tag
stores the requested value in PHD. The following table shows the PHD tag settings
required to collect the OPC data types that can be translated to OPC RDI data types.
Note: Other OPC data types can be collected, but they will be converted into one of
the OPC data types listed in the table below.
Source Source PHD tag OPC data type Input Output
tagtype attribute datatype from to
OPC OPC
Server Server

F4 VALUE F VT_R4 ! !
D8 VALUE D VT_R8 ! !
I4 VALUE I VT_I4 ! !
L8 VALUE L VT_CY ! !
AS VALUE C VT_BSTR ! !
AS VALUE80 C VT_BSTR ! !
US VALUE U VT_BSTR ! !
US VALUE80 U VT_BSTR ! !
BO VALUE I VT_BOOL ! !
TI VALUE I VT_DATE ! !
TD VALUE I, L, F, or D VT_DATE ! !
TL VALUE L VT_DATE ! !
F4 ARRAY F VT_R4 | VT_ARRAY !
D8 ARRAY D VT_R8 | VT_ARRAY !
I4 ARRAY I VT_I4 | VT_ARRAY !
L8 ARRAY L VT_CY | VT_ARRAY !
AS ARRAY C VT_BSTR | VT_ARRAY !
AS ARRAY80 C VT_BSTR | VT_ARRAY !
US ARRAY U VT_BSTR | VT_ARRAY !
US ARRAY80 U VT_BSTR | VT_ARRAY !
BO ARRAY I VT_BOOL | VT_ARRAY !
TI ARRAY I VT_DATE | VT_ARRAY !
TD ARRAY D VT_DATE | VT_ARRAY !
TL ARRAY L VT_DATE | VT_ARRAY !

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 29
Configuring PHD Tags

OPC Source Tag Types


Following are the OPC Source tag types:
• F4 - four byte float
• D8 - Eight byte float (double)
• I4 - four byte integer
• L8 – eight byte integer
• AS – ASCII
• US - Unicode
• BO - Boolean (Logical)
Note: Boolean types are stored as an integer value, with 'not zero' being true and
zero (0) being false.
• TI - Time

Note: Time data type is stored as an integer value as the number of seconds since
midnight of January 1, 1970, with the time based on UTC.
• TD – Date
Note: Date data type is stored as a double value as the number of days since
midnight of January 1, 1900, similar to date formats used in Excel.
Tag type Format

I Sees dates since January 1, 1970


L Windows FILETIME format (64-bit value representing number of 100-
nanosecond intervals since January 1, 1601 (UTC))
D Date, similar to Microsoft Excel

30 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Configuring PHD Tags

Mapping OPC data type to PHD Tag Type


OPC data types are defined by the structure VARIANT. This structure contains a
union of different data types, with the first word describing the data type contained in
the union. PHD does not support VARIANTs or all of the data types supported by
VARIANTs.
The following table shows VARIANT data types and the mapping to the Source Tag
Type and the PHD Tag Type.
VARIANT data type Source tag type PHD tag data type

VT_R4 F4 F
VT_R8 D8 D
VT_I1 I4 I
VT_I2 I4 I
VT_I4 I4 I
VT_I8 L8 L
VT_UI1 I4 I
VT_UI2 I4 I
VT_UI4 I4 I
VT_UI8 L8 L
VT_CY L8 L
VT_INT I4 I
VT_DATE I4 I
VT_DATE D8 D
VT_UINT I4 I
VT_BSTR AS C
VT_BSTR US U
VT_BOOL BO I

If the OPC Data canonical (native) data type does not translate into one of the Source
Tag Types directly, the OPC RDI will use standard operating system conversion
routines to convert the OPC value into one of the VARIANT data types that can be
translated into a Source Tag Type. For example: A variant of VT_R8 will be
converted to a VT_I4 if the Source Tag Type requested is I4.
VARIANTS return any of its known data types as an array of values. The OPC RDI
stores the individual elements of the array. The translation of the element values is
the same as the table described above. The OPC RDI collects the dimension, size
and lower bounds of the array. When collecting these values, the Source Tag Type
must be I4. The dimension of the array must be collected to collect any other value
associated with the array.

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 31
Configuring PHD Tags

32 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Troubleshooting

Common problems
The following problems may occur:
• The startup parameters from PHD are incorrectly defined.
• The interface has not been defined to PHD (or incorrectly defined).
• The name of the OPC server is incorrect.
• RDI stuck in INIT/INACTIVE state.
− Attempting to start an RDI when the RDI Server is not running will result in
the RDI being stuck in the Init/Inactive state.
− If this occurs, it is necessary to restart the RDI Server, and then Kill the RDI
before issuing the Start command again.
REFERENCE: For further problem diagnosis, refer to the Uniformance PHD -
Process History Database System Manual or refer to the OPC Server documentation.

PHD Confidence and OPC Quality


Read tag value:

OPC RDI If OPC Quality is… Then PHD Confidence is…

DA or HDA BAD –1
interfaces
UNCERTAIN 0
GOOD 100

Write tag value:

OPC RDI If the PHD And OPC Then the RDI downloads
Confidence is… Quality is… this value…

DA3.0 –1 BAD <value>


<100 UNCERTAIN <value>
100 GOOD <value>
DA1.x and DA1 and DA2 do not support writing an OPC quality. The tag
DA2.x value is written, and the confidence/OPC quality is ignored, with
the following exception.
–1 BAD (See NOTE)

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 33
Troubleshooting

Write tag value:


NOTE: If the /XN option is set (through the RDI Specification form in TPI), then the
RDI is forced to write NAN (not a number) value for Puts to ‘F’ and 'D' type tags when
confidence is < 0. This option does not apply to DA3 connections.

RDI Status
Retrieval Tag RDI Status

Good retrieval Status is zero (0)


OPC item failed Status is equal to the OPC failure code

Problem Diagnosis
In many cases, looking at the RDI log file can be very useful. The log file gives
information about the following:
• Initialization of tags, poll groups, and errors during these actions
• Outgoing and incoming data packages
The RDI log file can be found in <install directory>\PHDServer\Log Files.
For further problem diagnosis, refer to the PHD system log files.

34 • Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide
Glossary

OPC
OLE for Process Control (OPC) is a standard developed to communicate with
numerous data sources related to the process control industry.

RDI
PHD Real-time Data Interface. One RDI is used for each type of DCS, PLC,
SCADA, and other real-time sources of data that are included in PHD.

Source System
The source system is the system that provides the real-time data to the PHD systems.
This can be another PHD system, or a DCS system.

Tag
A distinct value residing in the source system and collected by an RDI.

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 35
Glossary

36 • Glossary Uniformance PHD - OLE for Process Control RDI Installaation Guide
four byte float data type 30
four byte integer data type 30
Index I
I4. See four byte integer.
implementing OPC RDI 5
installing the interface 9–34
A
included files list 6
architecture troubleshooting 33
understanding 8 Integer 30
AS. See ASCII data type. interface installation
ASCII data type 30 included files list 6
attribute mapping interface, installing 9–34
understanding 29 introducing
OLE for Process Control RDI 5–8
B items, using instead of tags 8
BO. See Boolean (logical) data type.. See Boolean
(logical) data type. O
Boolean (logical) data type 30
OLE for Process Control RDI
architecture 8
C
implementing 5
configuration forms installing the interface 9–34
Tag Source Configuration 11 introducing 5–8
providing common communications 8
D using DCOM technology 8
data types OPC. See OLE for Process Control.
AS or ASCII 30 open technology in OLE for Process Control RDI
BO or Boolean (logical) 30 8
F4 or four byte float 30
P
I4 or four byte integer 30
requesting specific types 29 PHD tag definitions
TI or time 30 tag source type/attribute mapping 29
US or Unicode 30 polled values, reporting 8
process control systems
E the architecture 8
exception values
T
reporting 8
Tag Source Configuration
F configuration forms 11
F4. See four byte float.. See four byte float. tag source type/attribute mapping: 29

Uniformance PHD OLE for Process Control Real-Time Data Interface Installation Guide • 37
Index

tags
defining as items 8
TI. See time data type.
time data type 30

U
Unicode data type 30
US. See Unicode data type.

V
values
reporting 8

38 • Uniformance PHD - OLE for Process Control Real-Time Data Interface Functional Specification

Вам также может понравиться