Integration: Key Topics
Integration: Key Topics
1 of 50
Integration
Key Topics
SOA Web Services
OPC
SOA Web Services
Key Topics
Introduction
Installation and Setup
Troubleshooting SOA Web Services
Security
(Opens the Gateway Administration help file.)
(Opens the Gateway Administration help file.)
SOA Web Services Introduction
Inside this topic
DeltaV software uses Services Oriented Architecture (SOA) web services to provide access to DeltaV functionality such as Campaign Manager and
Recipe Exchange from client applications outside of the DeltaV system. The web services are built with the Windows Communication Foundation
(WCF) programming framework. Use the web services to integrate Enterprise Resource Planning (ERP) systems with the process control system in
conjunction with Manufacturing Execution Systems (MES).
The web services are Recipe Exchange, Campaign Manager, Mynah Integration, and Monitor. The Monitor service is used internally and has no
interface. The Mynah Integration service exists solely to support the Mynah Mimic application. You cannot write applications that access this service.
Client applications access these services and communicate with the underlying DeltaV functionality through an application station configured as an SOA
Gateway.
Supported Network Configurations
The supported configurations for using SOA web services from an external system are:
The SOA Gateway in a DeltaV system (domain or workgroup) connected to an external LAN. The addition of a firewall is recommended to
protect the SOA Gateway.
The following figure shows a generalized example of an external system connected to a DeltaV system.
SOA Gateway in a DeltaV system connected to external LAN
The SOA Gateway in a DeltaV system domain connected to a Secure SOA Server in another domain. The addition of a firewall is recommended
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 2 of 50
to protect the SOA Gateway. The two domains must have a trust relationship.
The following figure shows a generalized example of a DeltaV system domain connected to an external domain.
SOA Gateway in a DeltaV domain connected to a Secure SOA Server in another domain
The computer labeled SOA Gateway is an application station on the DeltaV area control network (ACN). The gateway is the access point for all client
programs using web services.
The general steps to set up SOA web services are:
1. Install DeltaV software on the computers in the DeltaV system.
2. Designate an application station as the SOA Gateway from the Physical Network properties dialog.
3. Export the workstation configuration.
4. Move to the application station designated as the SOA Gateway.
5. Run Workstation Configuration on the application station.
6. Download the application station.
7. If you are using a firewall, configure it to enable the ports the services are using.
If you are using the SOA Gateway in a DeltaV domain and providing access to users in another domain, the general steps to set it up are:
1. Install DeltaV software on the computers in the DeltaV domain.
2. Designate an application station as the SOA Gateway from the Physical Network properties dialog.
3. Export the workstation configuration.
4. Move to the application station designated as the SOA Gateway.
5. Run Workstation Configuration on the application station.
6. Download the application station.
7. Create a trust relationship between the two domains.
8. Move to the computer in the other domain that is going to be the Secure SOA Server.
9. Install the Gateway software.
10. If you are using a firewall, configure it to enable the ports the services are using.
In this implementation the DeltaV system must be configured as a domain, not a workgroup. The DeltaV domain is protected by a firewall and the only
contact outside the domain is through the Web Service Gateway.
Gateway Administration Utility
Use the Gateway Administration utility to configure the web services in your DeltaV system. From the application you can also save log files generated
by the services. Launch the utility by selecting the gateway application station in DeltaV Explorer, then selecting Administer SOA Gateway from the
context menu of the gateway application station. For more information on the Gateway Administration utility, refer to its online help.
Web Service APIs
The web service application programming interfaces (APIs) document how to use the web services to access the DeltaV functionality. The
documentation includes information on data contracts, service contracts, exception handling, and methods and their parameters.
Complete documentation for the web services' APIs is available from the online help for the Gateway Administration utility. The file is in the
\DeltaV\hlp directory on DeltaV workstations. The file name is SOAAdminApp.chm. If you need access to the API reference you can copy this file to
other computers.
SOA Installation and Setup
Inside this topic
The web services and supporting software are installed when DeltaV software is installed so no further installation is required for the SOA Gateway
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 3 of 50
inside the DeltaV system.
Setting up the SOA Gateway
To set up the SOA Gateway you must first configure the application station that is going to be designated as the gateway:
1. Open DeltaV Explorer on the DeltaV system's ProfessionalPLUS workstation.
2. If you need to create an application station to use as the gateway, select Control Network, then select New | Application station from the context
menu.
3. In the Properties dialog, name the application station and select other options desired, then click OK.
4. Select Physical Network, then select Properties from the context menu.
5. In the Properties dialog, select the Gateway tab.
6. Browse to or enter the name of the application station you want to be the gateway, then click OK.
7. Select File | Export | Workstation Configuration.
8. Save the workstation configuration file.
Now move to the application station you selected to be the SOA Gateway:
1. Install DeltaV software as a local application station.
2. When prompted, select Professional / Operator / Application / Base / Inter-Zone Server.
3. Click Next.
4. Browse to the location of the workstation configuration file you created earlier and select it.
5. Select the application station name in the list that appears.
6. Click Next.
7. Complete the installation.
8. Return to the ProfessionalPLUS workstation and download the SOA Gateway application station.
The following services are installed on the SOA Gateway:
Campaign Manager Web Service
Recipe Exchange Web Service
Monitor Service
Installing and Setting up the Secure SOA Server
If you need access to web services on computers outside of the area control network (ACN), both the DeltaV system and the external system must be in
domains, not workgroups. The SOA web services do not support workgroup-to-workgroup communication. You must install the web services software
on a computer in the external domain to create a Secure SOA Server.
The prerequisites for installing the Secure SOA Server are:
Set up the SOA Gateway in the DeltaV ACN as explained above.
If you are using a firewall between the domains, make sure it has been configured correctly.
Configure a two-way domain trust between the DeltaV domain system and the external domain.
Configure the domain name system (DNS) for both domains.
To install the Secure SOA Server software in the external domain:
1. Run the setup.exe program on the DeltaV installation disk #1 in the DV_Extras\SOA Gateway folder.
A progress dialog appears, then after a few moments the DeltaV External Gateway - InstallShield Wizard appears.
2. In the Receiver field enter the fully-qualified domain name of the SOA Gateway configured within the DeltaV network.
This is the domain that contains the DeltaV application station configured as the SOA Gateway in DeltaV Explorer. For example:
AppStation1.MyDeltaVDomain
3. Enter the port number the SOA Gateway (the application station) uses for the service EmersonProcess.Web.Services.MonitorHost.exe.
4. Click Next.
A dialog appears in which you select and verify an installation path for the web service software.
5. Click Next.
A dialog appears that summarizes the installation settings you have made.
6. Click Next.
Installing the Secure SOA Server creates the Windows user account DeltaVAdmin. A dialog appears in which you can change the password of this
account. This is the account used by the Gateway web services. You can change this password or accept the default password.
7. Click Next.
The setup continues until the InstallShield Wizard Complete dialog appears.
8. Click Finish.
The following services are installed on the Secure SOA Server:
Campaign Manager Web Service
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 4 of 50
Recipe Exchange Web Service
Monitor Service
You can verify their existence from the Windows Task Manager or the Windows Services application. You can view service logs from the DeltaV SOA
Gateway Administration application.
After the Monitor Service is activated, the other web services attempt to start using their default port numbers. If the default ports are already in use, the
services do not start. The Windows Event Viewer contains information on whether the services started or not. For information on resolving port conflicts
refer to the topic Troubleshooting SOA Web Services.
Note SOA web service client programs in the external domain must point to the Secure SOA Server, not the SOA Gateway within the DeltaV system
domain.
Enabling the Mynah Integration Web Service
If you are using the Mynah Mimic application for simulation, you must enable the Mynah Integration web service.
Note The Mynah Integration web service is intended for use only in DeltaV Simulation systems.
To enable and start the Mynah web service:
1. Select Start | DeltaV | Engineering | System Preferences.
2. Select Enable Simulation Download.
3. Click OK.
4. Select Start | DeltaV | Engineering | Database Administration.
5. Close all DeltaV applications.
6. Select File | Shutdown Server.
7. After the Database Server shuts down, select File | Connect to Server.
8. From DeltaV Explorer, open the ProfessionalPLUS workstation properties dialog.
9. Select Enable Mynah Integration Web Service.
10. Click OK.
11. Download ProfessionalPLUS setup data.
It may take a few moments for the Mynah Integration web service to start.
The Mynah Integration web service should now appear in the Gateway Administration application.
After you enable the Mynah service the following services start on the ProfessionalPLUS workstation:
Monitor Service
Mynah Integration web service
Troubleshooting SOA Web Services
Inside this topic
This section contains information you may need if the web services do not work as expected.
Default Port Information
If any of the default ports that the SOA web services use are already in use, the following information explains how to troubleshoot and correct the
conflicts. The way to find and correct port conflicts is different depending on whether your system has only an SOA Gateway or both an SOA Gateway
and a Secure SOA Server.
The default port numbers for the services are shown in the following table.
Notes:
* The Monitor and Mynah Integration services do not have
an HTTP port.
The following table summarizes the locations where you should verify the service's port numbers. The port number for each service must be the same on
each computer (and firewall, if installed) where the port is active. If you need to change a port (for example, if another application is already using one of
the default ports) select an unused port in the range 49152 to 49999.
Verify Port Numbers on...
Web Service
ProfessionalPLUS SOA Gateway Secure SOA Server Firewall
Monitor Yes* Yes Yes Yes
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 5 of 50
* Only if the Mynah Integration service has been enabled.
If any of the default ports that the SOA web services use are already in use, the following information explains how to troubleshoot and correct the
conflicts. The way to find and correct port conflicts is different depending on whether your system has only an SOA Gateway or both an SOA Gateway
and a Secure SOA Server. If a service does not activate, check the Windows Event Viewer for the reason.
The following sections are generalized instructions for verifying and adjusting the port number for the web services. The examples in the instructions use
NetTcpPort numbers. If you are using HttpPort binding, adjust the port numbers in the instructions as required.
Port Conflicts in the SOA Gateway Only
This is a DeltaV workgroup that contains an SOA Gateway. It may or may not have a firewall protecting the SOA Gateway.
Each web service attempts to activate on its default port, but if that port is already in use, the service activates on the first available port number between
49152 and 49999.
To troubleshoot and correct port conflicts:
1. If the default port of any of the services is already in use the service does not start and you must set a new port for the service in the SOA Gateway
Administration application. Use the Windows netstat command to find a port between 49152 and 49999 that is not being used.
2. If a firewall is in place to protect the SOA Gateway, you must configure the firewall to allow communications on the ports that Recipe Exchange
and Campaign Manager use.
Port Conflicts in the SOA Gateway and Secure SOA Server
This is a DeltaV domain that contains an SOA Gateway connected to another domain that contains a Secure SOA Server. There may or may not be a
firewall protecting the SOA Gateway.
Each web service attempts to activate on its default port, but if that port is already in use, the service activates on the first available port number between
49152 and 49999.
To troubleshoot and correct port conflicts:
1. If the default port of any of the services is already in use the service does not start and you must set a new port in the SOA Gateway
Administration application. Use the Windows netstat command to find a port between 49152 and 49999 that is not being used.
2. If a firewall is in place to protect the SOA Gateway, you must configure the firewall to allow communications on the ports that Recipe Exchange,
Campaign Manager, and the Monitor Host web service use.
3. Set up the Secure SOA Server making sure the the Monitor service activates.
If your system has a firewall protecting the SOA Gateway, make sure the port you use for the Monitor service is open on the firewall.
4. Once the Monitor service is running on both the SOA Gateway and Secure SOA Server, check the Campaign Manager and Recipe Exchange web
services. Each service should be using the same port on the SOA Gateway and the Secure SOA Server. If they are different, use the Windows
netstat command to find a common available port between 49152 and 49999 for each service.
5. If a firewall is in place to protect the SOA Gateway, verify that the firewall allows communications on the ports that Recipe Exchange, Campaign
Manager, and Monitor Host web services use.
Using netstat
When the SOA Gateway is activated by downloading the DeltaV application station, the first service to get activated is the Monitor service. This service
supports the Gateway Administration application. The Monitor service default port is 49301.
Use the Windows netstat command to determine the port the other services are using and, if needed, find unused ports.
netstat -a -b
Look for instances that include the word LISTENING. For example, the Recipe Exchange service appears in the command output looking similar to:
The port number used by the service is shown above in bold italic text. Depending on where you are running the netstat command there may be other
instances of the service appearing in the output, but they will not include LISTENING so you can ignore them.
SOA Security
Inside this topic
The web services are fully integrated into the standard DeltaV security system. All web service interactions with the underlying DeltaV control systems
occur under an authenticated user account and are checked against any applicable DeltaV security function keys and locks using the username and
password arguments. All passwords are encrypted and are passed using secure means.
The web services impersonate the caller of any of its web methods and therefore ensures that it is this caller's identity against which all Operating
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 6 of 50
System-level security checks are authenticated. For this reason, any web service client application must run as a valid and known Windows account from
the perspective of the DeltaV node hosting the service.
At the same time, some web methods (in Campaign Manager) take a confirmer name and password. The confirmer's account is checked against the
DeltaV security function locks. For example to modify a campaign, the DeltaV Campaign Manager enforces that the confirmer account has the
CAMPAIGN_MODIFY function key in the DeltaV security system. First, the Campaign Manager node authenticates the confirmer name and password
to ensure it is a valid account and if so, ensures that the user has the appropriate key for the DeltaV security function lock. The node performs the
requested operation only after both of these checks have passed.
The web services support both Basic authentication and Integrated Windows authentication. If Integrated Windows authentication is used Impersonation
must be enabled to ensure communication.
Using Web Services between Domains
Security for accessing web services in one domain from another domain is provided by Active Directory and a trust relationship between the domains.
The authentication of users in one domain is trusted by the other domain in a trust relationship. Users in a trusted domain have access to resources in the
trusting domain, subject to the access controls that are applied in the trusting domain.
Access to resources is restricted by access control. Trust relationships allow users and computers to be authenticated (to have their identity verified) by
an authentication authority. Access control allows authenticated users to use the resources (files, folders, and virtual containers) that they are authorized
to use and prohibits them from using (or even seeing) resources that they are not authorized to use.
Note To access a DeltaV node hosting a program accessible by web service, any user connecting to the web service must be assigned to the node's
DeltaV group. This means that once the domain trust is established, users from the non-DeltaV domain who access the web service must be added to the
DeltaV groups in the DeltaV domain.
For example if a trust exists between DOMAIN1 and DOMAIN2, and the user DOMAIN1\USER1 wants to access the web service connected to a
DeltaV server on DOMAIN2, the following steps must be performed:
1. Add DOMAIN1\USER1 to the DeltaV group on the domain controller on DOMAIN2.
2. Add DOMAIN1\USER1 to the DeltaV group on the individual DeltaV nodes hosting applications supported by web services.
3. Ensure that the user has a matching DeltaV account name, downloaded with the appropriate privileges.
OPC
Key Topics
Using OPC
OPC Server Functional Overview
OPC Mirror Application
OPC Pager Application
DeltaV OPC Alarms and Events Server
Barcode Tutorial
Quick Reference
Properties and Methods
Visual C++ Tips
OPC Constants for Visual Basic
DeltaV Parameter Types and Field Definitions
DCOM Setup
Configuring User Accounts for OPC Server and Clients
DeltaV OPC Historical Data Access
Using OPC
This section describes user and system requirements to successfully interface to OLE for Process Control (OPC) servers for DeltaV software. It also
provides an overview of the OPC 1.0 and 2.0 specifications.
The OPC servers for DeltaV software provide an interface to the run-time database in a DeltaV control network. OPC is based on Microsoft's OLE/COM
technology. Through this technology, the DeltaV OPC servers give programmers the ability to perform the following tasks:
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 7 of 50
Connect to a DeltaV OPC Data Access Server
Connect OPC servers through DeltaV OPC Mirror
Use the DeltaV OPC Pager application
Set up and use the DeltaV OPC Alarms and Events Server
Read and Write to DeltaV runtime data
Request exception reporting
Browse for available data fields
Requirements
User Requirements
This document is intended to be used as a guide for developers of OPC 1.0- or OPC 2.0-compliant clients for DeltaV software. It is assumed that the
reader is familiar with Microsoft OLE/COM technology and the OPC 1.0 or OPC 2.0 specifications. For the tutorial example, Barcode, its is also
assumed that the reader is familiar with Visual Basic.
System Requirements
DeltaV OPC Data Access Server runs on an Application Station. OPC clients may run on this workstation or on another Windows workstation connected
by a network. The network option requires use of DCOM (Distributed COM). For more information, see Visual C++ Tips.
OPC client programs may be written in either Visual C++ or a higher level business application such as Excel, Visual Basic, etc.
References
Kraig Brockschmidt, Inside OLE, Second Edition, Microsoft Press, Redmond, WA, 1995.
Microsoft COM Specification, version 0.9 (available from Microsoft's FTP site), October 24, 1995.
Microsoft Systems Journal, Q&A, pp. 89-101, April, 1996.
OLE Automation Programming Reference, Microsoft Press, Redmond, WA, 1996.
OLE 2 Programming Reference, Vol. 1, Microsoft Press, Redmond, WA, 1994.
OLE for Process Control, OPC Overview, Version 1.0 (available at http://www.opcfoundation.org/), OPC Foundation, 1998.
DeltaV OPC Data Access Server Functional Overview
The Application Station acts as a gateway between the DeltaV Control Network and other applications and networks. DeltaV OPC Data Access Server
runs on this machine providing DeltaV run-time access to applications that are running either on the Application Station or on a machine with a network
connection to the Application Station.
Note In order to run an OPC client on a non-DeltaV workstation, first install the OPC Remote application. To install the OPC Remote application, run
the OPCRemote.exe setup file located in the DV_Extras\OPCRemote folder on the DeltaV installation disk #1.
DeltaV Network Diagram
OPC client applications can use the COM compliant Custom Interface or the OLE Automation Interface of the DeltaV OPC Data Access Server. The
custom interface supports clients written in C++. The OLE Automation Interface supports higher level business applications such as Excel, Visual Basic,
etc.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 8 of 50
OPC Interfaces
OPC clients can define one or more OPC groups within the DeltaV OPC Data Access Server.
The OPC groups provide a way for clients to organize the data. Items in the same group have the same "freshness" (time resolution), percent dead band
in which to ignore changes and time bias. Also, a client application can request to be notified when any data in a group changes.
Group/Item Relationship
Within each group the client can define one or more OPC items.
The OPC items represent connections to data sources within the server. A value, a Quality Mask and a Timestamp are associated with each item. The
value is a VARIANT type. The Quality Mask is similar to a quality flag. It shows the quality state of an item's data value. Quality flags are described in
the OPC Data Access Custom Interface Specification. This specification is available at http://www.opcfoundation.org.
Note that the items are not the data sources; the DeltaV system is the data source. Items are simply connections to a field of a parameter in the DeltaV
system.
OPC Data Access Server Objects
An OPC Data Access Server contains three types of objects: OPCServer, OPCGroup and OPCItem. Each object has interfaces that allow access to the
object's methods and properties.
OPCServer objects
You must create an OPCServer object before you can get references to other objects. If there is a need to connect to more than one DeltaV system, you
may have more than one OPCServer object with its own OPCGroup and OPCItem objects. The figures below illustrate the structure of an OPCServer
object as defined by the OPC 1.0 and OPC 2.0 specifications:
OPC 2.0 OPC 1.0
Note Brackets indicate an interface that is defined as optional in the OPC specification.
OPCGroup objects
An OPCGroup object is the object that an OPC Data Access Server delivers to manage a collection of items. The figures below illustrate the structure of
an OPCGroup object as defined by the OPC 1.0 and OPC 2.0 specifications:
OPC 2.0 OPC 1.0
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 9 of 50
OPCItem objects
The figures below illustrate the structure of an OPCItem object as defined by the OPC 1.0 and OPC 2.0 specifications:
OPC 2.0 OPC 1.0
For a listing of all the properties and methods see The Automation Interface.
Redundant DeltaV OPC Data Access Server
By using a pair of Application Stations, you can set up DeltaV OPC Data Access Server for redundancy. You can then configure the connection of an
OPC client to the active DeltaV OPC Data Access Server so that in the event of problems, the application will recover by switching over to the
Application Station running the standby DeltaV OPC Data Access Server. Switchover events include, but are not limited to:
A loss of network connectivity such that the Application Station running the standby DeltaV OPC Data Access Server loses communications
integrity with the Application Station running the active DeltaV OPC Data Access Server
A planned or unplanned shutdown (or reboot) of the Application Station running the active DeltaV OPC Data Access Server
Other switchover criteria, as designed into a custom, redundant-aware OPC client
You can also manually initiate a switchover. You might want to do this, for example, so that you can retain the functionality of your DeltaV OPC Data
Access Server application under the following conditions:
To upgrade your DeltaV software or other system software
To perform hardware maintenance or upgrades
To respond to an unstable or hung process on the Application Station where the active DeltaV OPC Data Access Server is running
Application Station Restrictions and Redundancy
After enabling the redundant DeltaV OPC Data Access Server feature on a pair of Application Stations, you cannot also enable additional subsystems for
these workstations, because they are not supported for redundant switchovers. Only assigned modules in a virtual controller, OPC Data Access Server,
OPC Mirror, and Redundant DeltaV Connect can be configured to run redundantly. If you attempt to enable one of the following subsystems, a dialog-
box message advises you that the subsystem is incompatible with redundancy:
Alarms And Events (including the Event Chronicle)
Batch Historian
Batch Executive
Campaign Manager
Continuous Historian
Remote Network (including Remote Access Services (RAS) servers)
A number of DeltaV applications, some of which appear under DeltaV on the Start menu of either partner in an Application Station pair with the
redundant DeltaV OPC Data Access Server feature enabled, are also not supported for redundant operation. Although you can start these applications,
inconsistent and/or erroneous data may result after a switchover. Also, running these applications may affect the stability of an Application Station where
redundant DeltaV OPC Data Access Server is running. It is strongly recommended that you not run the following DeltaV applications on the Application
Station pair being used for redundant DeltaV OPC Data Access Server:
Auto-Update Service
Batch Application Manager
Batch History View
Batch OI Configuration
Batch Operator Interface
Continuous Historian Administration
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 10 of 50
DeltaV Diagnostics
DeltaV Logger
DeltaV Excel Add-Ins
Event Chronicle Administration
Inspect With InSight
Process History View
Recipe Simulator
Remote Clients
Set-Synchronize Network Time
SimulatePro
User Manager (Note: You may need to run User Manager in a Workgroup environment; however, redundancy is not supported.)
It is strongly recommended that you not install other applications on the Application Stations where you have enabled the redundant DeltaV OPC Data
Access Server feature, as these applications will not run redundantly and their operation may not be reliable following a switchover. Also, running other
applications may affect the stability of an Application Station where redundant DeltaV OPC Data Access Server is running. In particular, you should not
install or use any of the following DeltaV applications on the Application Station pair:
AMS Device Manager Audit Trail
Campaign Manager Operator Interface
OPC Alarms and Events Server
DeltaV History Analysis
DeltaV OPC Pager
DeltaV Web Server
Typical Redundant DeltaV OPC Data Access Server Configuration
In the following illustration, an OPC Data Access client is running on a remote workstation. The remote workstation can be either a DeltaV workstation
(such as another Application Station) or a non-DeltaV workstation.
The client is connected to ROPC.nodename.1, the name of the local proxy server for the active DeltaV OPC Data Access Server on the Application
Station named nodename.
Redundant DeltaV OPC Data Access Server in a Typical Configuration
During the workstation configuration of an Application Station pair with redundant DeltaV OPC Data Access Server enabled, the DeltaV system
appends the characters _S, by default, to the name of the second Application Station of the pair. In this example, therefore, the physical name of the
partner Application Station (on the right) would be nodename_S and its DeltaV OPC Data Access Server would become active following a switchover.
For more information about Application Station names, see Connecting to the Redundant DeltaV OPC Data Access Server.
Setting Up a Pair of Application Stations for Redundant DeltaV
OPC Data Access Server
These instructions assume that you are installing DeltaV software on a new pair of Application Stations to use for running an OPC client connected to a
redundant DeltaV OPC Data Access Server. For other setup scenarios, see Setting Up a Partner Application Station for Redundant DeltaV OPC Data
Access Server or Reconfiguring Application Stations for Redundant DeltaV OPC Data Access Server.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 11 of 50
Creating an Application Station
1. On the ProfessionalPLUS workstation, create an Application Station in DeltaV Explorer by right-clicking Control Network under System
Configuration | Physical Network, and then selecting New | Application Station.
2. On the General page of the Properties dialog box, specify a name for the Application Station.
Naming the Application Station
Important As a general rule, do not specify an Application Station name that ends with the characters _S. When the DeltaV system creates
a pair of Application Stations for redundant DeltaV OPC Data Access Server, it appends these characters to whatever name you specify as
the base name for the Application Station. Having a pair of Application Stations named nodename_S and nodename_S_S could result in
misleading or undesirable results while working with redundant DeltaV OPC Data Access Server. For more information about Application
Station names, see Connecting to the Redundant DeltaV OPC Data Access Server.
3. On the Redundancy page of the Properties dialog box, enable the Enable Redundancy for Assigned Modules option, select the Redundant OPC
option, and then select either the OPC DA Server Only option or the OPC DA Server and OPC Mirror option from the pull-down list.
Important After enabling the redundant DeltaV OPC Data Access Server feature on a pair of Application Stations, you cannot also enable
subsystems such as Batch Executive, Batch Historian, Continuous Historian, Campaign Manager, Alarms and Events, or Remote Network
under this Application Station. Only assigned modules in a virtual controller, OPC Data Access Server, OPC Mirror, and Redundant DeltaV
Connect can be configured to run redundantly.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 12 of 50
Enabling Redundant DeltaV OPC Data Access Server
4. You can optionally enable the Unattended Workstation Reboot on Failover or Manual Switchover option, if, for example, either of the Application
Stations will be located in an unmanned facility.
Important Before enabling the Unattended Workstation Reboot on Failover or Manual Switchover option, see Operational Considerations
for Redundant DeltaV OPC Data Access Server for more information.
5. Click OK to close the Properties dialog box for the Application Station.
6. Export a workstation configuration file for the new Application Station. In DeltaV Explorer, select the new Application Station that you just
created. Click File | Export | Workstation Configuration. Save the workstation configuration file either to removable media (a diskette or a USB
drive, for example) or to a network location that can be accessed from the Application Stations you will be configuring. You can use the default
name for a workstation configuration file, DevData.cfg, or specify a different file name.
Installing DeltaV on the first Application Station
1. Using the DeltaV installation disks, run the setup program on one of the Application Stations.
2. When prompted to select your workstation type, choose the Local Application Station option, and then click Next.
3. When prompted to provide the workstation configuration file that you made earlier on the ProfessionalPLUS workstation, click Browse, navigate
to the exported workstation configuration file, and double-click it.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 13 of 50
Specifying the Workstation Configuration File
Note If you ever need to reconfigure either workstation in the pair, you should respond Yes to this prompt if it is the Application Station
that you specified as the preferred active; otherwise, if it is the workstation with the characters _S appended to the base Application Station
name, respond No.
Specifying an Application Station as Preferred Active
5. Follow the on-screen instructions to complete the installation of the Application Station.
Installing DeltaV software on the second Application Station
1. Using the DeltaV installation disks, run the setup program on the remaining Application Station.
2. When prompted to select your workstation type, choose the Local Application Station option, and then click Next.
3. When prompted to provide the workstation configuration file that you made earlier on the ProfessionalPLUS workstation, click Browse, navigate
to the exported workstation configuration file, and double-click it.
4. Select the workstation name, and then click Next. The following message appears: A node with Redundant Assigned Modules has been selected. Is
this the preferred active Application Station? If you responded Yes to this prompt when configuring the first of the two Application Stations,
respond No now. For more information about Application Station names, see Connecting to the Redundant DeltaV OPC Data Access Server.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 14 of 50
5. Follow the on-screen instructions to complete the installation of the second Application Station
Finishing the Installation
1. Assign licenses for the Application Stations and the redundant DeltaV OPC Data Access Server feature, as needed.
Note There is no reason to assign licenses to the Application Stations for DeltaV software components that are not designed to coexist with the
redundant DeltaV OPC Data Access Server feature. For example, you should not license subsystems such as Batch Executive, Batch Historian,
Continuous Historian, Campaign Manager, or Remote Network on the Application Stations, because they cannot be enabled simultaneously with
the redundant DeltaV OPC Data Access Server feature.
2. In DeltaV Explorer on the ProfessionalPLUS workstation, download the Application Station.
Note If you selected the OPC Data Access Server and OPC Mirror option on the Redundancy page of the Properties dialog box for the
Application Station, install OPC Mirror on each Application Station. For more information, see Redundant DeltaV OPC Mirror.
Setting Up a Partner Application Station for Redundant DeltaV
OPC Data Access Server
These instructions assume that you already have one Application Station, to which you are adding a second Application Station to use for running an
OPC client connected to a redundant DeltaV OPC Data Access Server. Also assumed is that you've made any necessary version upgrades to DeltaV
software on the existing Application Station. For other setup scenarios, see Setting Up a Pair of Application Stations for Redundant DeltaV OPC Data
Access Server or Reconfiguring Application Stations for Redundant DeltaV OPC Data Access Server.
Setting up the existing Application Station
1. Connect the new Application Station to the DeltaV network.
2. In DeltaV Explorer on the ProfessionalPLUS workstation, right-click the existing Application Station under System Configuration | Physical
Network | Control Network.
3. Click Properties on the shortcut menu for the Application Station. You can optionally change the name of the existing Application Station on the
General page of the Properties dialog box, but this is not necessary. However, changing the Application Station name is strongly recommended, if
it coincidentally ends with the characters _S.
Important As a general rule, do not specify an Application Station name that ends with the characters _S. When the DeltaV system creates a pair
of Application Stations for redundant DeltaV OPC Data Access Server, it appends these characters to whatever name you specify as the base name
for the Application Station. Having a pair of Application Stations named nodename_S and nodename_S_S could result in misleading or
undesirable results while working with redundant DeltaV OPC Data Access Server. For more information about Application Station names, see
Connecting to the Redundant DeltaV OPC Data Access Server.
4. Click the Redundancy tab of the Properties dialog box. On the Redundancy page, enable the Enable Redundancy for Assigned Modules option,
select the Redundant OPC option, and then select either the OPC DA Server Only option or the OPC DA Server and OPC Mirror option from the
pull-down list.
Important You cannot enable redundant DeltaV OPC Data Access Server on a pair of Application Stations if you have already enabled any
other subsystems, such as Batch Executive, Batch Historian, Continuous Historian, Campaign Manager, Alarms and Events, or Remote
Network, for the existing Application Station. To enable redundant DeltaV OPC Data Access Server on a pair of Application Stations, you
must first disable any previously-enabled subsystems for this Application Station. Only assigned modules in a virtual controller, OPC Data
Access Server, OPC Mirror, and Redundant DeltaV Connect can be configured to run redundantly.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 15 of 50
Enabling Redundant DeltaV OPC Data Access Server
5. You can optionally enable the Unattended Workstation Reboot on Failover or Manual Switchover option, if, for example, either of the Application
Stations will be located in an unmanned facility.
Important Before enabling the Unattended Workstation Reboot on Failover or Manual Switchover option, see Operational Considerations
for Redundant DeltaV OPC Data Access Server for more information.
6. Click OK to close the Properties dialog box for the Application Station.
7. When prompted to export a workstation configuration file for the existing Application Station, click Yes. Save the workstation configuration file
either to removable media (a diskette or a USB drive, for example) or to a network location that can be accessed from the Application Station you
are configuring. You can use the default name for a workstation configuration file, DevData.cfg, or specify a different file name.
8. On the existing Application Station, import the workstation configuration file by clicking DeltaV | Installation | DeltaV Workstation Configuration
on the Start menu.
9. When the introductory DeltaV Workstation Configuration dialog box appears, click Next.
10. For the Select Workstation Type option, select Professional / Operator / Application / Base / Inter-Zone Server, and then click Next.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 16 of 50
Specifying the Type of Workstation
11. When prompted to provide the workstation configuration file that you made earlier on the ProfessionalPLUS workstation, click Browse, navigate
to the exported workstation configuration file, and double-click it.
Importing the Workstation Configuration File
12. Select the workstation name, and then click Next. The following message appears: A node with Redundant Assigned Modules has been selected. Is
this the preferred active Application Station? It is recommended that you respond Yes to this prompt when configuring the existing Application
Station. When you respond Yes, the Application Station is given the name specified for it in DeltaV Explorer. For more information about
Application Station names, see Connecting to the Redundant DeltaV OPC Data Access Server.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 17 of 50
Note If you ever need to reconfigure either workstation in the pair, you should respond Yes to this prompt if it is the Application Station that you
specified as the preferred active; otherwise, respond No, if it is the workstation with the characters _S appended to the base Application Station
name.
13. Follow the on-screen instructions to complete the configuration of the Application Station.
Installing DeltaV software on the new Application Station
1. Use the DeltaV installation disks to run the setup program on the new Application Station where you intend to run an OPC client connected to a
redundant DeltaV OPC Data Access Server.
2. When prompted to select your workstation type, choose the Local Application Station option, and then click Next.
3. When prompted to provide the workstation configuration file that you made earlier on the ProfessionalPLUS workstation, click Browse, navigate
to the exported workstation configuration file, and double-click it.
4. In the DeltaV Workstation Configuration dialog box, select the workstation name, and then click Next. The following message appears: A node
with Redundant Assigned Modules has been selected. Is this the preferred active Application Station? If you responded Yes earlier when
configuring the existing Application Station, you must respond No to this prompt now. When you respond No, the characters _S are appended to
the appended to the name specified for the Application Station in DeltaV Explorer. For more information about Application Station names, see
Connecting to the Redundant DeltaV OPC Data Access Server.
5. Follow the on-screen instructions to complete the installation of the new Application Station.
Finishing the Installation
1. Assign licenses for the Application Stations and redundant DeltaV OPC Data Access Server, as needed.
Note There is no reason to assign licenses to the Application Stations for DeltaV software components that are not designed to coexist with the
redundant DeltaV OPC Data Access Server feature. For example, you should not license subsystems such as Batch Executive, Batch Historian,
Continuous Historian, Campaign Manager, or Remote Network on the Application Stations, because they cannot be enabled simultaneously with
the redundant DeltaV OPC Data Access Server feature.
2. In DeltaV Explorer on the ProfessionalPLUS workstation, download the Application Station.
Note If you selected the OPC DA Server and OPC Mirror option on the Redundancy page of the Properties dialog box for the Application Station,
the current version of OPC Mirror must be installed on each Application Station. If a previous version of OPC Mirror is already installed on the
existing Application Station, uninstall it before installing the current version on both the existing and new Application Stations. For more
information, see Redundant DeltaV OPC Mirror.
Reconfiguring Application Stations for Redundant DeltaV OPC Data
Access Server
These instructions assume that you are reconfiguring an existing pair of Application Stations that were not previously being used to run an OPC client
connected to a redundant DeltaV OPC Data Access Server. Also assumed is that you've already made any necessary version upgrades to DeltaV software
on the existing Application Stations. For other setup scenarios, see Setting Up a Pair of Application Stations for Redundant DeltaV OPC Data Access
Server or Setting Up a Partner Application Station for Redundant DeltaV OPC Data Access Server.
Important If either Application Station contains a Continuous Historian database, you should back up or export the Continuous Historian data sets
before proceeding. For more information about working with Continuous Historian data sets, see Continuous Historian Administration.
Configuring the first Application Station
1. In DeltaV Explorer on the ProfessionalPLUS workstation, right-click one of the existing pair of Application Stations that you intend to use for
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 18 of 50
running an OPC client connected to a redundant DeltaV OPC Data Access Server.
2. Click Delete on the shortcut menu for the Application Station, and then click Yes when prompted to confirm that you want to delete this
Application Station from the Control Network.
3. In DeltaV Explorer, right-click the remaining Application Station that you intend to use for running an OPC client connected to a redundant
DeltaV OPC Data Access Server.
4. Click Properties on the shortcut menu for the Application Station. You can optionally change the name of the Application Station on the General
page of the Properties dialog box, but this is not necessary. However, changing the Application Station name is strongly recommended, if it
coincidentally ends with the characters _S.
Important As a general rule, do not specify an Application Station name that ends with the characters _S. When the DeltaV system creates a pair
of Application Stations for redundant DeltaV OPC Data Access Server, it appends these characters to whatever name you specify as the base name
for the Application Station. Having a pair of Application Stations named nodename_S and nodename_S_S could result in misleading or
undesirable results while working with redundant DeltaV OPC Data Access Server. For more information about Application Station names, see
Connecting to the Redundant DeltaV OPC Data Access Server.
5. Click the Redundancy tab of the Properties dialog box. On the Redundancy page, enable the Enable Redundancy for Assigned Modules option,
select the Redundant OPC option, and then select either the OPC DA Server Only option or the OPC DA Server and OPC Mirror option from the
pull-down list.
Important You cannot enable redundant DeltaV OPC Data Access Server on a pair of Application Stations if you have already enabled any
other subsystems, such as Batch Executive, Batch Historian, Continuous Historian, Campaign Manager, Alarms and Events, or Remote
Network, for this Application Station. To enable redundant DeltaV OPC Data Access Server on a pair of Application Stations, you must first
disable any previously-enabled assigned modules for this Application Station. Only assigned modules in a virtual controller, OPC Data
Access Server, OPC Mirror, and Redundant DeltaV Connect can be configured to run redundantly.
Enabling Redundant DeltaV OPC Data Access Server
6. You can optionally enable the Unattended Workstation Reboot on Failover or Manual Switchover option, if, for example, either of the Application
Stations will be located in an unmanned facility.
Important Before enabling the Unattended Workstation Reboot on Failover or Manual Switchover option, see Operational Considerations
for Redundant DeltaV OPC Data Access Server for more information.
7. Click OK to close the Properties dialog box for the Application Station.
8. When prompted to export a workstation configuration file for the Application Station, click Yes. Save the workstation configuration file either to
removable media (a diskette or a USB drive, for example) or to a network location that can be accessed from the Application Station you are
configuring. You can use the default name for a workstation configuration file, DevData.cfg, or specify a different file name.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 19 of 50
9. On the Application Station that you did not delete in DeltaV Explorer, import the workstation configuration file by clicking DeltaV | Installation |
DeltaV Workstation Configuration on the Start menu.
10. When the introductory DeltaV Workstation Configuration dialog box appears, click Next.
11. For the Select Workstation Type option, select Professional / Operator / Application / Base / Inter-Zone Server, and then click Next.
Specifying the Type of Workstation
12. When prompted to provide the workstation configuration file that you made earlier on the ProfessionalPLUS workstation, click Browse, navigate
to the exported workstation configuration file, and double-click it.
Importing the Workstation Configuration File
13. Select the workstation name, and then click Next. The following message appears: A node with Redundant Assigned Modules has been selected. Is
this the preferred active Application Station? It is recommended that you respond Yes to this prompt when configuring the first of the two
Application Stations. When you respond Yes, the Application Station is given the name specified for it in DeltaV Explorer. For more information
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 20 of 50
about Application Station names, see Connecting to the Redundant DeltaV OPC Data Access Server.
Note If you ever need to reconfigure either workstation in the pair, you should respond Yes to this prompt if it is the Application Station that you
specified as the preferred active; otherwise, respond No, if it is the workstation with the characters _S appended to the base Application Station
name.
14. Follow the on-screen instructions to complete the configuration of the Application Station.
Configuring the second Application Station
1. On the Application Station that you deleted in DeltaV Explorer earlier, import the workstation configuration file by clicking DeltaV | Installation |
DeltaV Workstation Configuration on the Start menu.
2. When the introductory DeltaV Workstation Configuration dialog box appears, click Next.
3. When prompted to select your workstation type, choose the Local Application Station option, and then click Next.
4. When prompted to provide the workstation configuration file that you made earlier on the ProfessionalPLUS workstation, click Browse, navigate
to the exported workstation configuration file, and double-click it.
5. In the DeltaV Workstation Configuration dialog box, select the workstation name, and then click Next. The following message appears: A node
with Redundant Assigned Modules has been selected. Is this the preferred active Application Station? If you responded Yes earlier when
configuring the first Application Station, you must respond No to this prompt now. When you respond No, the characters _S are appended to the
name specified for the Application Station in DeltaV Explorer on the ProfessionalPLUS workstation. For more information about Application
Station names, see Connecting to the Redundant DeltaV OPC Data Access Server.
Important When the message appears, advising you that any Continuous Historian database stored on this Application Station will be deleted,
click Yes to continue with this procedure, if you have no Continuous Historian data sets to protect. Otherwise, click No to discontinue this
procedure until you have backed up or exported Continuous Historian data sets. After backing up your Continuous Historian data sets, restart this
procedure of importing the workstation configuration file. For more information about working with Continuous Historian data sets, see
Continuous Historian Administration.
6. Follow the on-screen instructions to complete the installation of the second Application Station.
Finishing the Installation
1. Assign licenses for the Application Stations and redundant DeltaV OPC Data Access Server, as needed.
Note There is no reason to assign licenses to the Application Stations for DeltaV software components that are not designed to coexist with the
redundant DeltaV OPC Data Access Server feature. For example, you should not license subsystems such as Batch Executive, Batch Historian,
Continuous Historian, Campaign Manager, or Remote Network on the Application Stations, because they cannot be enabled simultaneously with
the redundant DeltaV OPC Data Access Server feature.
2. In DeltaV Explorer on the ProfessionalPLUS workstation, download the Application Station.
Note If you selected the OPC DA Server and OPC Mirror option on the Redundancy page of the Properties dialog box for the Application Station,
the current version of OPC Mirror must be installed on each Application Station. If a previous version of OPC Mirror is already installed on either
of the Application Stations, uninstall it before installing the current version. For more information, see Redundant DeltaV OPC Mirror.
Using the DeltaV Status Window on the Application Stations
After configuring the Application Stations with the Enable Redundancy for Assigned Modules option enabled, the DeltaV Status window runs in the
Windows System Tray. You can use the DeltaV Status window to monitor redundancy status and for general diagnostic information while
troubleshooting. To open the DeltaV Status window, left-click its icon in the System Tray.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 21 of 50
DeltaV Status Window
The DeltaV Status window contains the following indicators:
Power: If not illuminated, there may be a communication or setup problem.
Error: If illuminated or flashing, an error is preventing the DeltaV OPC Data Access Server from assuming active or standby status.
Active: If illuminated, the active DeltaV OPC Data Access Server is fully configured and operational.
Standby: If illuminated, the standby DeltaV OPC Data Access Server is fully configured and operational.
Pri. CN: Flashes to indicate that the Primary DeltaV control network is communicating.
Sec. CN: Flashes to indicate that the Secondary DeltaV control network is communicating.
The DeltaV Status window has two options: Always On Top and Auto Hide. To enable or disable either option, right-click the DeltaV Status window
and click the option that you want to toggle on or off in the shortcut menu.
Operational Considerations for Redundant DeltaV OPC Data Access
Server
The following sections contain important operational information that you should consider while setting up and using redundant DeltaV OPC Data
Access Server.
Using the Unattended Reboot Option
In DeltaV Explorer, on the Redundancy page of the Properties dialog box for the Application Station where you set up redundant DeltaV OPC Data
Access Server, you can optionally enable the Unattended Workstation Reboot on Failover or Manual Switchover option. This option is designed
primarily for when either of the Application Stations will be located in an unmanned facility.
After a switchover event that occurs when the Unattended Workstation Reboot on Failover or Manual Switchover option is disabled, the standby DeltaV
OPC Data Access Server will take over as the active DeltaV OPC Data Access Server, but the other DeltaV OPC Data Access Server will not reestablish
itself as the standby DeltaV OPC Data Access Server until the Application Station where it runs is restarted. This is true for a manual switchover, as well
as for an unplanned switchover. To bring the other DeltaV OPC Data Access Server into error-free, standby status, you must restart the Application
Station where the red Error light is flashing in the DeltaV Status window. For more information, see Using the DeltaV Status Window on the
Application Stations.
Important To do system maintenance or perform software upgrades, you should disable the Unattended Workstation Reboot on Failover or Manual
Switchover option. Otherwise, the Application Station may restart before you finish your task.
Loss of Standby Status
While the possibility is considerably diminished when the Application Stations running redundant DeltaV OPC Data Access Server are connected to a
primary and secondary DeltaV network, it can happen that the standby DeltaV OPC Data Access Server cannot assume standby status after an otherwise
successful switchover. Conditions that may lead to this state include: temporary, general loss of network connectivity or extreme CPU overload.
When the active DeltaV OPC Data Access Server is functioning normally, but the standby DeltaV OPC Data Access Server is unable to assume standby
status, the DeltaV Diagnostics program will clearly indicate problem areas in the diagnostic parameters for Control Network | nodename | Redundancy |
Standby. Also, all lights in the DeltaV Status window on the Application Station running the standby DeltaV OPC Data Access Server that could not
assume standby status will be illuminated, as shown in the following illustration:
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 22 of 50
DeltaV Status Window With All Lights Illuminated
If the Unattended Workstation Reboot on Failover or Manual Switchover option is enabled for the Application Station pair when the standby DeltaV
OPC Data Access Server is unable to acquire standby status, the unattended reboot may not occur under switchover conditions that would otherwise
trigger it. Manually restarting the Application Station allows the standby DeltaV OPC Data Access Server to reacquire standby status and does not affect
the operation of the Application Station running the active DeltaV OPC Data Access Server.
Connecting to the Redundant DeltaV OPC Data Access Server
After setting up a pair of Application Stations for DeltaV OPC Data Access Server redundancy, you must also run the Redundant DeltaV OPC Server
Configuration program on any workstation from which you intend to run an OPC client connected to the redundant DeltaV OPC Data Access Server on
the Application Station pair.
DeltaV Application Station and Windows workstation names
In the DeltaV system, when you set up a pair of Application Stations to run a redundant subsystem, the specified Application Station name is used as the
Windows workstation name for one of the Application Stations and the characters _S are appended to this name for use as the Windows workstation
name of the other Application Station.
For example, if the Application Station name you specify is AppStat, the Windows workstation names of the physical pair of Application Stations will
be AppStat (user-specified) and AppStat_S (system-generated). At any given point in time, due to switchover sequencing, the active subsystem may be
running on either physical Windows workstation, AppStat or AppStat_S. However, in the DeltaV system, the Application Station pair is always referred
to with the logical name AppStat.
Simplex and redundant DeltaV OPC Data Access Server names
The default, simplex DeltaV OPC Data Access Server included with an Application Station or ProfessionalPLUS workstation is named OPC.DeltaV.1.
To connect an OPC client to the redundant OPC server, do not configure a connection between the client and OPC.DeltaV.1, as this simplex server does
not support redundancy. Instead, you must configure the connection between the client and ROPC.nodename.1, the local, proxy server for the active
DeltaV OPC Data Access Server on nodename in a redundant pair.
Running the Redundant DeltaV OPC Server Configuration program on a DeltaV workstation
To run an OPC client on a DeltaV workstation connected to the redundant DeltaV OPC Data Access Server on an Application Station pair set up for
redundancy, run the Redundant DeltaV OPC Server Configuration program on the DeltaV workstation. To start the Redundant DeltaV OPC Server
Configuration program, run RedDeltaVOPC.exe, located in the DeltaV\bin folder, and then complete the following steps:
1. In the Application Station pair box, enter the name of the Application Station where you selected the Redundant OPC option after enabling the
Enable Redundancy for Assigned Modules option. Alternatively, click Browse to locate and select the Application Station.
Important Be sure to specify the name of the Application Station where you selected the Redundant OPC option—do not specify the name
of its partner Application Station, which has the same name, but with the characters _S appended to it.
Specifying an Application Station with a Redundant DeltaV OPC Data Access Server
2. After specifying the name of the Application Station in the Application Station pair box, click Validate.
3. After the Redundant DeltaV OPC Server Configuration program validates the Application Station, click Add.
After clicking Add, the redundant DeltaV OPC Data Access Server for the specified Application Station appears in the Redundant DeltaV
OPC Data Access servers box as ROPC.nodename.1, where nodename is the name of the Application Station.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 23 of 50
Specifying an Application Station with a Redundant DeltaV OPC Data Access Server
Running the Redundant DeltaV OPC Server Configuration program on a non-DeltaV
workstation
To run an OPC client on a non-DeltaV workstation connected to the redundant DeltaV OPC Data Access Server on an Application Station pair set up for
redundancy, run the Redundant DeltaV OPC Server Configuration program on the workstation. To start the Redundant DeltaV OPC Server
Configuration program on a non-DeltaV workstation, complete the following steps:
1. Install the OPC Remote application on the remote workstation by running the OPCRemote.exe setup file located in the DV_Extras\OPCRemote
folder on the DeltaV installation disk #1.
2. When the Default DeltaV OPC Server dialog box appears, click the Redundant OPC button.
When you click the Redundant OPC button, the OPC Remote installation program runs the Redundant DeltaV OPC Server Configuration
program.
3. In the Application Station pair box of the Redundant DeltaV OPC Server Configuration program, enter the name of the Application Station where
you selected the Redundant OPC option after enabling the Enable Redundancy for Assigned Modules option. Alternatively, click Browse to locate
and select the Application Station.
Important Be sure to specify the name of the Application Station where you selected the Redundant OPC option—do not specify the name
of its partner Application Station, which has the same name, but with the characters _S appended to it.
4. After specifying the name of the Application Station in the Application Station pair box, click Validate.
5. After the Redundant DeltaV OPC Server Configuration program confirms the Application Station, click Add.
After clicking Add, the redundant DeltaV OPC Data Access Server for the specified Application Station appears in the Redundant DeltaV
OPC Data Access servers box as ROPC.nodename.1, where nodename is the name of the Application Station.
Adding and Removing Connections
You can use the Redundant DeltaV OPC Server Configuration program to configure up to 16 connections. Configured connections appear in the pull-
down list in the Configured Servers box.
To add an additional connection, follow the instructions in Connecting to the Redundant DeltaV OPC Data Access Server. To remove a connection, run
the Redundant DeltaV OPC Server Configuration program, select the connection from the pull-down list in the Configured Servers box, and then click
Remove.
To start the Redundant DeltaV OPC Server Configuration program on a DeltaV workstation, run RedDeltaVOPC.exe, located in the DeltaV\bin folder.
To start the Redundant DeltaV OPC Server Configuration program on a non-DeltaV workstation, click Programs | OPC Remote | Redundant DeltaV
OPC Server on the Start menu.
DeltaV Diagnostics and Redundant DeltaV OPC Data Access Server
To monitor or get diagnostic information about the redundancy subsystem and the Application Station pair with redundant DeltaV OPC Data Access
Server, run the DeltaV Diagnostics program on the DeltaV ProfessionalPLUS workstation or a DeltaV workstation.
Important Parameter values appearing in the DeltaV Diagnostics program on the Application Station running the standby DeltaV OPC Data Access
Server are not updated. Because inconsistent and/or erroneous data may result after a switchover, you should always run DeltaV Diagnostics on the
DeltaV ProfessionalPLUS workstation or a DeltaV workstation other than the Application Stations where redundancy has been enabled for assigned
modules in a virtual controller, OPC Data Access Server, OPC Mirror, or Redundant DeltaV Connect.
For example, to get information about OPC clients connected to a redundant DeltaV OPC Data Access Server, see the diagnostic parameters under
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 24 of 50
Redundancy-related Parameters in DeltaV Diagnostics
Initiating a manual switchover
From DeltaV Diagnostics, a user with the Diagnostic Key can initiate a manual switchover, in which the standby assumes the role of active DeltaV
OPC Data Access Server. To manually initiate a switchover, select the Application Station with DeltaV OPC Data Access Server, and then click the
Redundancy Switchover command on the Tools menu.
After a switchover event that occurs when the Unattended Workstation Reboot on Failover or Manual Switchover option is disabled, the standby DeltaV
OPC Data Access Server will take over as the active DeltaV OPC Data Access Server, but the other DeltaV OPC Data Access Server will not re-
establish itself as the standby DeltaV OPC Data Access Server until the Application Station where it runs is restarted. This is true for a manual
switchover, as well as for an unplanned switchover. To bring the other DeltaV OPC Data Access Server into error-free, standby status, you must restart
the Application Station where the red Error light is flashing in the DeltaV Status window. For more information, see Using the DeltaV Status Window
on the Application Stations. For more information about the Unattended Workstation Reboot on Failover or Manual Switchover option, see Operational
Considerations for Redundant DeltaV OPC Data Access Server.
Diagnostic Parameters Specific to OPC Data Access Server Redundancy
The following DeltaV Diagnostics parameters, specific to redundancy, appear under DeltaV System | Control Network | nodename, where nodename is
the name of the Application Station with a redundant DeltaV OPC Data Access Server and CLTnn Client is an OPC client:
Diagnostic Parameter Description
WinName The name of the Application Station running the current active
DeltaV OPC Data Access Server (see Note below).
OPC Subsystem | Clients The number of clients connected to the DeltaV OPC Data Access
Server on this Application Station.
Note This parameter reports up to a maximum of 99 clients in the
OPC subsystem.
The name of the executable for the OPC client connected to the
OPC Subsystem | CLTnn Client | App
DeltaV OPC Data Access Server on this Application Station.
The maximum load (items per second) of the current
OPC Subsystem | CLTnn Client | Load
configuration.
OPC Subsystem | CLTnn Client | Node The name of the computer on which the OPC client is running.
OPC Subsystem | CLTnn Client | The current state of the standby DeltaV OPC Data Access Server:
PartnerServerState running, initializing, or failed.
The number of items, such as parameters, that the OPC client is
OPC Subsystem | CLTnn Client | Pnts
currently requesting.
OPC Subsystem | CLTnn Client | ServerState The current state of the active DeltaV OPC Data Access Server:
running, initializing, or failed. If the OPC client is connected to a
simplex DeltaV OPC Data Access Server, the current state is N/A
(not applicable).
Which DeltaV OPC Data Access Server on this Application
OPC Subsystem | CLTnn Client | ServerType Station that the OPC client is connected to, SIMPLEX or
REDUNDANT.
The name of the user logged on to the workstation where the OPC
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 25 of 50
For more information about Application Station names, see
Connecting to the Redundant DeltaV OPC Data Access Server.
Note When browsing Diagnostic parameters from applications such as Control Studio or Process History View, you may encounter a diagnostic
parameter named ISACTIVE. This parameter is intended for use only by an OPC client running on an Application Station hosting redundant Assigned
Modules. If the OPC client is running on the Application Station with the standby virtual controller, the ISACTIVE parameter will have a value of 0. In
all other cases, the ISACTIVE parameter will have a value of 1.
Properties and Methods
The topics below contain the properties and methods for both the Automation Interface and the Custom Interface.
The Automation Interface
The following table lists properties and methods that can be used for the Automation Interface defined for client/server applications implemented to
conform to the OPC 1.0 or OPC 2.0 specification.
OPC 2.0 OPC 1.0
OPCServer Properties IOPCServerDisp Properties
StartTime Count
CurrentTime MajorVersion
LastUpdateTime StartTime
MajorVersion MinorVersion
MinorVersion CurrentTime
BuildNumber BuildNumber
VendorInfo LastUpdateTime
ServerState VendorInfo
LocaleID
Bandwidth IOPCServerDisp Methods
OPCGroups AddGroup
PublicGroupNames Item
ServerName GetErrorString
ServerNode RemoveGroup
ClientName GetGroupByName RemoveGroup
SetEnumeratorType
OPCServer Methods
GetOPCServers IOPCPublicGroupStateMgtDisp Methods
Connect GetPublicGroupByName
Disconnect RemovePublicGroup
CreateBrowser
GetErrorString IOPCBrowseServerAddressSpaceDisp Properties
QueryAvailableLocaleIDs Organization
QueryAvailableProperties IOPCBrowseServerAddressSpaceDisp Methods
GetItemProperties ChangeBrowsePosition
LookupItemIDs SetItemIDEnumerator
GetItemIDString
OPCBrowser Properties RemoveGroup
Organization SetAccessPathEnumerator RemoveGroup
Filter SetEnumeratorType
DataType
AccessRights IOPCItemMgtDisp Properties
CurrentPosition Count
Count
IOPCItemMgtDisp Methods
OPCBrowser Methods AddItems
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 26 of 50
Item SetDataTypes
ShowBranches Item
ShowLeafs RemoveItems
MoveUp SetActiveState
MoveToRoot ValidateItems
MoveDown SetClientHandles RemoveGroup
MoveTo
GetItemID IOPCGroupStateMgtDisp Properties
GetAccessPaths ActiveStatus
PercentDeadBand
OPCGroups Properties ClientGroupHandle
Parent ServerGroupHandle
DefaultGroupIsActive LCID
DefaultGroupUpdateRate TimeBias
DefaultGroupDeadband Name
DefaultGroupLocaleID UpdateRate
DefaultGroupTimeBias
Count IOPCGroupStateMgtDisp Methods
CloneGroup
OPCGroups Methods
Item IOPCSyncIODisp Methods
Add OPCRead
GetOPCGroup OPCWrite
Remove
RemoveAll IOPCAsyncIODisp Methods
ConnectPublicGroup AddCallbackReference
RemovePublicGroup OPCRead
Cancel
OPCGroup Properties OPCWrite
Parent DropCallbackRefernce
Name Refresh
IsPublic
IsActive IOPCItemDisp Properties
IsSubscribed AccessRights
ClientHandle Quality
ServerHandle AccessPath
LocaleID ReadError
TimeBias ActiveStatus
DeadBand RequestedDataType
UpdateRate Blob
OPCItems ServerHandle
ClientHandle
OPCGroup Methods Timestamp
SyncRead EUInfo
SyncWrite Value
AsyncRead EUType
AsyncWrite WriteError
AsyncRefresh ItemID
AsyncCancel
IOPCItemDisp Methods
OPCItems Properties OPCRead
Parent OPCWrite
DefaultRequestedDataType
DefaultAccessPath
DefaultIsActive
Count
OPCItems Methods
Item
GetOPCItem
AddItem
AddItems
Remove
Validate
SetActive
SetClientHandles
SetDataTypes
OPCItem Properties
Parent
ClientHandle
ServerHandle
AccessPath
AccessRights
ItemID
IsActive
RequestedDataType
Value
Quality
TimeStamp
CanonicalDataType
EUType
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 27 of 50
EUInfo
OPCItem Methods
Read
Write
The Custom Interface
The following table lists Custom Interface properties and methods that can be used in client/server applications implemented to conform to the OPC 1.0
or OPC 2.0 specification.
IOPCServer Methods
AddGroup
GetStatus
GetErrorString
RemoveGroup
GetGroupByName RemoveGroup
CreateGroupEnumerator
IOPCBrowseServerAddressSpace Methods
QueryOrganization
GetItemID
ChangeBrowsePosition
BrowseAccessPaths
BrowseOPCItemIDs RemoveGroup
IOPCGroupStateMgt Properties
Count
IOPCGroupStateMgt Methods
GetState
SetName
SetState
CloneGroup
IOPCSyncIO Methods
OPCRead
OPCWrite
IOPCItemMgt Methods
AddItems
SetClientHandles
ValidateItems
SetDatatypes
RemoveItems
CreateEnumerator
SetActiveState
IDataObject Methods
Dadvise
Dunadvise
IEnumOPCItemAttributes Methods
Next
Reset
Skip
Clone
Visual C++ Tips
Creating a custom COM client in Visual C++ requires a knowledge of COM programming. The following is a very brief set of steps required to get
started with an MFC-based OPC client application.
Adding OLE Support to The Project
In the pre-compiled header, add:
#include "afxole.h"
Adding OPC Support to the Project
In the pre-compiled header, add:
#include "opc.h"
In the main application CPP file, add:
#include "opc_i.c"
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 28 of 50
Opc.h and opc_i.c can be generated from files included at the OPC ftp site (zilker.net/pub/opc).
Adding UNICODE to the Project
Change the preprocessor symbol _MBCS to _UNICODE to the preprocessor symbols. An unresolved external on _WinMain@16 will also occur if you
fail to add wWinMainCRTStartup into the EntryPointSymbol section of the link output category after adding _UNICODE to the preprocessor symbols.
Adding DCOM Support
If you plan to use DCOM, you will also need to define the symbol _WIN32_DCOM.
Handling Messages
Any OLE thread must dispatch messages in order to function correctly. OLE threads that do not dispatch messages can cause message broadcasters to
hang. For more details on this subject see article Q136885 - OLE Threads Must Dispatch Messages in Microsoft's OLE knowledge base.
Writing a Client for Redundant DeltaV OPC Data Access Server
A redundant DeltaV OPC Data Access Server is an in-process server, implemented by a dynamic-link library (DLL) module. If the design of your OPC
client explicitly excludes interfacing with an in-process server, the client will fail if it attempts to connect to a redundant DeltaV OPC Data Access
Server.
In an OPC client that does not exclude interfacing with an in-process server, the third parameter of its call to CoCreateInstance or CoCreateInstanceEx
must resolve to CLSCTX_INPROC_SERVER, by referencing CLSCTX_SERVER or CLSCTX_ALL, as in the following example:
where CLSCTX_SERVER and CLSCTX_ALL are defined as follows:
Note If you use an OPC client that you acquired from an outside vendor, you should contact the author to verify that the client is not written to exclude
interfacing with an in-process server before using it with redundant DeltaV OPC Data Access Server.
For more information about interfacing with in-process servers, refer to the Microsoft Developer Network Library articles on Component Object Model
(COM) programming at http://msdn2.microsoft.com/en-us/library/ms687205.aspx.
OPC Constants for Visual Basic
The following table lists Visual Basic global constants that can be used for client/server applications implemented to conform to the OPC 1.0 or OPC 2.0
specification.
OPC 2.0 OPC 1.0
'global constants for basic OPC 2.0 functionality 'global constants for OPC 1.0 functionality
'Variant data type definitions Public Const OPC_ENUM_PRIVATE_CONNECTIONS = 1
Public Const VT_EMPTY = 0 Public Const OPC_ENUM_PUBLIC_CONNECTIONS = 2
Public Const VT_NULL = 1 Public Const OPC_ENUM_ALL_CONNECTIONS = 3
Public Const VT_I2 = 2 Public Const OPC_ENUM_PRIVATE = 4
Public Const VT_I4 = 3 Public Const OPC_ENUM_PUBLIC = 5
Public Const VT_R4 = 4 Public Const OPC_ENUM_ALL = 6
Public Const VT_R8 = 5 Public Const OPC_GROUPNAME_ENUM = 0
Public Const VT_CY = 6 Public Const OPC_GROUP_ENUM = 1
Public Const VT_DATE = 7 Public Const opcLocaleEnglish = &H409
Public Const VT_BSTR = 8 Public Const OPC_READABLE = 1
Public Const VT_DISPATCH = 9 Public Const OPC_WRITEABLE = 2
Public Const VT_ERROR = 10 Public Const OPC_DS_CACHE = 1
Public Const VT_BOOL = 11 Public Const OPC_DS_DEVICE = 2
Public Const VT_VARIANT = 12 Public Const OPC_NOENUM = 0
Public Const VT_UNKNOWN = 13 Public Const OPC_ANALOG = 1
Public Const VT_DECIMAL = 14 Public Const OPC_ENUMERATED = 2
Public Const VT_I1 = 16 Public Const OPC_STATUS_RUNNING = 1
Public Const VT_UI1 = 17 Public Const OPC_STATUS_FAILED = 2
Public Const VT_UI2 = 18 Public Const OPC_STATUS_NOCONFIG = 3
Public Const VT_UI4 = 19 Public Const OPC_STATUS_SUSPENDED = 4
Public Const VT_I8 = 20 Public Const OPC_STATUS_TEST = 5
Public Const VT_UI8 = 21 Public Const OPC_BRANCH = 1
Public Const VT_INT = 22 Public Const OPC_LEAF = 2
Public Const VT_UINT = 23 Public Const OPC_FLAT = 3
Public Const VT_VOID = 24 Public Const OPC_BROWSE_UP = 1
Public Const VT_HRESULT = 25 Public Const OPC_BROWSE_DOWN = 2
Public Const VT_PTR = 26 Public Const OPC_NS_HIERARCHIAL = 1
Public Const VT_SAFEARRAY = 27 Public Const OPC_NS_FLAT = 2
Public Const VT_CARRAY = 28 Public Const VT_EMPTY = 0
Public Const VT_USERDEFINED = 29 Public Const VT_NULL = 1
Public Const VT_LPSTR = 30 Public Const VT_I2 = 2
Public Const VT_LPWSTR = 31 Public Const VT_I4 = 3
Public Const VT_FILETIME = 64 Public Const VT_R4 = 4
Public Const VT_BLOB = 65 Public Const VT_R8 = 5
Public Const VT_STREAM = 66 Public Const VT_CY = 6
Public Const VT_STORAGE = 67 Public Const VT_DATE = 7
Public Const VT_STREAMED_OBJECT = 68 Public Const VT_BSTR = 8
Public Const VT_STORED_OBJECT = 69 Public Const VT_DISPATCH = 9
Public Const VT_BLOB_OBJECT = 70 Public Const VT_ERROR = 10
Public Const VT_CF = 71 Public Const VT_BOOL = 11
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 29 of 50
DeltaV Parameter Types and Field Definitions
DeltaV fields are classified by parameter types. You can use the DeltaV fields listed in the following table in your OPC application.
Parameter Type Field Name
(English)
Boolean CV
Signed Integer 8 CV
Signed Integer 16 CV
Signed Integer 32 CV
Unsigned Integer 8 CV
Unsigned Integer 16 CV
Unsigned Integer 32 CV
Floating Point CV
Floating Point with CV
Status
ST
Discrete with Status CV
ST
Scaling EU100
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 30 of 50
EU0
UNITS
DECPT
Mode TARGET
ACTUAL
NORMAL
PERMITTED
ALLOWED
Access Permissions GRANT
DENY
Simulate Float ENABLE
SSTATUS
SVALUE
FSTATUS
FVALUE
Simulate Discrete ENABLE
SSTATUS
SVALUE
FSTATUS
FVALUE
PIO Reference REF
Floating Point Array ROWS
COLS
CV
Event ATYP
PRI
ENAB
INV
CUALM
LAALM
NALM
CV
ALMPARAM
LIMPARAM
PARAM1
PARAM2
Alarm List ROWS
COLS
ENAB
MACK
PRIAD
PARAM
LAALM
NALM
PRI
TIN
String CV
Boolean with Status CV
ST
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 31 of 50
Unsigned Integer 32 CV
with Status
ST
Option Bitstring CV
SETINDEX
DC Mask PASSIN
PASSOUT
ACT1IN
ACT1OUT
ACT2IN
ACT2OUT
External Reference REF
Internal Reference REF
Expression EXPTYPE
Expression STRING
User Named Set CV
CVI
SET
CVS
DCOM Setup
Distributed Component Object Model (DCOM) is an application level protocol for object-oriented remote procedure calls useful for distributed,
component-based systems of all types. It is useful to OPC in that it allows a client to connect to a server running across a network that uses TCP/IP.
To use DCOM, the following steps must be completed:
Connect two machines on a network with TCP/IP network protocol.
Enable DCOM on both machines (normally DCOM is enabled automatically with the operating system installation).
Set the DCOM security to allow the client to connect to the server application.
Windows provides a utility called dcomcnfg.exe. This utility provides a user interface for setting the necessary DCOM settings in the Windows registry.
Enabling DCOM on the PC
Normally, DCOM is enabled on the machine when Windows is installed. However, if DCOM is not enabled, you can do so by following these steps on
both the server and client machines:
1. Run the executable file, dcomcnfg.exe.
The Component Services window opens.
2. In the left pane, open Component Services.
A Computers folder appears.
3. Open the Computers folder.
The My Computer icon appears.
4. Right click the My Computer icon and select Properties.
5. Select the Default Properties tab.
6. Select the check box Enable Distributed COM on this computer.
7. Changing this value requires a reboot.
The EnableDCOM key in the Windows registry is set to "Y" when this box is checked. If DCOM is not enabled, then all cross-machine calls are rejected
(the caller, typically, gets an RPC_S_SERVER_UNAVAILABLE return code).
Setting the Location of the DeltaV OPC Data Access Server
On the server machine, the DeltaV OPC Data Access Server application must be set to run on the local machine.
1. Run the executable file, dcomcnfg.exe.
The Component Services window opens.
2. In the left pane, open Component Services.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 32 of 50
A Computers folder appears.
3. Open the Computers folder.
The My Computer icon appears.
4. Open the My Computer icon.
Several folders appear.
5. Open the DCOM Config folder.
6. Right click "FrsOpcDv" in the list that appears and select Properties.
7. Select the Location tab.
8. The "Run application on this computer" check box should be selected.
On the client machine, the DeltaV OPC Data Access Server application must be set to run on the server machine. This is set up automatically when OPC
Remote is installed. This can be verified by following these steps:
1. Run the executable file, dcomcnfg.exe.
The Component Services window opens.
2. In the left pane, open Component Services.
A Computers folder appears.
3. Open the Computers folder.
The My Computer icon appears.
4. Open the My Computer icon.
Several folders appear.
5. Open the DCOM Config folder.
6. Right click "DeltaV OPC Server" in the applications list and select Properties.
7. Select the Location tab.
8. The "Run application on the following computer" checkbox should be selected.
9. The name of the server machine should be listed.
Setting DCOM Security
On both the server and client machines, DeltaV OPC Data Access Server must have the correct properties.
1. Run the executable file, dcomcnfg.exe.
The Component Services window opens.
2. In the left pane, open Component Services.
A Computers folder appears.
3. Open the Computers folder.
The My Computer icon appears.
4. Right click the My Computer icon and select Properties.
5. Select the Default Properties tab to view the default DCOM security levels.
6. The Default Authentication Level should have been set to "Connect".
7. The Default Impersonation Level should have been set to "Identify".
Once access is permitted, COM will check security for each call. There are two categories, AuthenticationLevel and ImpersonationLevel. The
authentication level dictates how secure the communication is between the client and the server. The negotiated authentication level is the highest of
client and server. It can not be RPC_C_AUTHN_LEVEL_NONE if the callee wants to know who is calling him. The impersonation level is set up by
the caller for how much it trusts the callee.
Access and Launch Permissions
In order for the DeltaV OPC Data Access Server service to run, the DCOM access and launch permissions must be set on the server machine. Most
permissions are set when DeltaV software is installed. However, you must manually set permissions for anonymous logon. To confirm DCOM
permissions and to set permissions for anonymous logon, complete the following steps:
1. Run the executable file, dcomcnfg.exe.
The Component Services window opens.
2. In the left pane, open Component Services.
A Computers folder appears.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 33 of 50
3. Open the Computers folder.
The My Computer icon appears.
4. Right click the My Computer icon and select Properties.
5. Select the COM Security tab, and then click the Edit Limits button in the Access Permissions group.
6. From the Group or user names list, select ANONYMOUS LOGON, and then enable the Allow option for both Local Access and Remote Access
permissions.
Important Neglecting to enable the Allow option for Remote Access permissions prevents an OPC client on a non-DeltaV workstation from
being able to connect to the redundant DeltaV OPC Data Access Server on an Application Station pair set up for redundancy.
7. Open the My Computer icon.
Several folders appear.
8. Open the DCOM Config folder.
9. Right click "FrsOpcDv" in the list that appears, and then select Properties.
10. Select the Security tab.
The Access permissions should include the accounts that need to connect to the DeltaV OPC Data Access Server. The SYSTEM account is
the only account with Launch permission. The System account will also have Access permission.
The accounts that need to connect are the ones that will actually be running the client application. If these are not Domain accounts then the user name
and password must match on both the server and client machines for Windows to recognize the users as the same account. The user name must also be a
DeltaV user on the server machine (defined by running DeltaV User Manager).
Note After the server is running, "launch permission" setting is not used. The only user that launches the server is SYSTEM. Any other client accessing
the server bypasses launch permissions and requires Access permission only.
11. Select the Identity tab.
12. The option "This user" should have been selected and DeltaVAdmin should be the user name.
This tells COM how to launch the server. There are three options:
Interactive User - Server is launched as user who is currently logged on the machine. If nobody is logged on, launch fails.
Launching User - Server is launched with account running the client application on the other machine.
This user/User - DCOM logs on the specific User in the background and starts server using caller's token. This is the setting needed for the DeltaV
OPC Data Access Server.
Configuring User Accounts for OPC Server and Clients
OPC uses Microsoft DCOM technology to allow a client to connect to a server running across a network that uses TCP/IP. Any two machines configured
for DCOM communications can be set up to run as a DeltaV OPC client and server. For more information, see Enabling DCOM on the PC.
Client Machine Setup
For unsolicited callbacks to work, assign the password for the DeltaV Admin account on the client machine to be the same as that on the server machine.
This is because the OPC server is running as DeltaVAdmin on the server machine. The DeltaV Admin account is automatically created by the OPC
Remote installation.
Server Machine Setup
The client application runs as a valid Windows account and DeltaV account to the server machine. The server is set up differently depending upon
whether the computers are in a workgroup or domain. The following sections describe the various setup options. The term “opcuser” is used as an
example user account name.
Both Client and Server Machine are in a Workgroup
The client runs as a local user if both client and server are in a workgroup.
To set up the user on the server machine:
1. Use the DeltaV User Manager on the server machine to create a user account (for example, “opcuser”) and assign it the same password as the
client machine.
2. Make “opcuser” both an Operating System Account and a DeltaV Database Account.
3. Grant proper DeltaV groups and DeltaV locks to “opcuser”.
4. Download the DeltaV machine.
The Client Runs as a Domain User and the Server is in a Workgroup
Follow the steps described above when both the client and server machines are in a workgroup.
The Client Runs as Local User and the Server is in a Domain
On the server machine use the Windows User Manager application to:
1. Create a local user account (for example “opcuser”).
2. Assign it the same password as the client machine.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 34 of 50
3. Add it to the local DeltaV group.
On the server machine use DeltaV User Manager to:
1. Create a DeltaV Database account with the same name as the local user account (in these examples “opcuser”).
2. Grant proper DeltaV groups and DeltaV locks to “opcuser”.
3. Download the DeltaV machine.
The Client Runs as domainA User and the Server is in domainB and domainB Trusts domainA
1. Use Windows User Manager to add domainA\opcuser to the local DeltaV group.
2. Use the DeltaV User Manager to create opcuser as a DeltaV Database account.
3. Grant proper DeltaV groups and DeltaV locks to this user.
4. Download the DeltaV machine.
The Client Runs as domainA User and the Server is in domainB, and domainB Does not Trust domainA
Follow the steps described above when the client runs as local user opcuser, and server is in a domain.
Barcode Tutorial
Barcode, the application in this tutorial, is a Visual Basic 4.0 program that interfaces between a bar-code scanner attached to the serial port of the
Application Station and the DeltaV OPC Data Access Server. In the DeltaV controller, the "Opc-Sample" SFC is running a process to produce ice cream
from various recipes. When the recipe selected is "Fudge Ripple", one of the steps in the SFC will pause for the operator to add a dry ingredient
manually. When the Barcode application starts up, it reads the target ingredient information from DeltaV software and monitors the step of the SFC.
When the step becomes "DRY_ADD", the user is asked to scan the ingredient label (as if the ingredient was added to the process) and click the Update
DeltaV button. The application writes the actual ingredient information back to DeltaV software and sets a flag allowing the SFC to continue.
Note The code examples in this tutorial are compliant with the OPC 2.0 specification. Slight variations are required to implement the Barcode
application in compliance with the OPC 1.0 specification.
Barcode Tutorial Application Window
The example application, Barcode, is a Visual Basic application and therefore uses the Automation interface to the DeltaV OPC Data Access Server. To
write an OPC client that uses the custom interface, the user would include the same basic steps. However, this process is rather detailed and is not fully
covered in this topic. For more information, see Visual C++ Tips.
In this tutorial you will:
Open the example project. This project already has code for reading data from the bar-code reader. It does not have any references to OPC.
Reference OPC in your project and include files to define OPC constants
Add the code to connect and disconnect to the DeltaV OPC Data Access Server, create and destroy a group, add and remove items.
Request exception reporting on the items in your group.
Set values in DeltaV software through OPC calls.
Creating a Client Application
This chapter describes the steps required to create the tutorial application, Barcode.
Creating an OPC client application in Visual Basic means creating an OLE Automation client. Using OLE Automation, you can "borrow" the
functionality of other applications by controlling their objects from within your Visual Basic application. If the object is an OLE Automation object, you
can use its properties and methods in code.
Note It takes approximately 2 hours to complete this tutorial.
Setting Up a New Project
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 35 of 50
To start this application, you open the VB project, Barcode and add references to the OPCDisp library. This gives you project access to all of the DeltaV
OPC Data Access Server interfaces and their properties and methods. Use the References dialog box to make another application's objects available in
your code. This dialog box allows you to set a reference to the other application's object library.
Also included with the project is a TrueType bar code font called 3of9.ttf. To load this font, go to Control Panel, Fonts. Select "Install New Font" from
the File menu. Select the file, \DeltaV\samples\Opc\Start\3of9.ttf and choose OK.
Referencing OPC in your project
1. Start Visual Basic.
2. From the File menu, choose Open Project and select the Barcode.vbp file in the DeltaV directory \DeltaV\samples\Opc\Start.
3. Barcode.vbp is a project file to use as a starting point. The Custom Control "Microsoft Comm Control" is the only option selected.
4. To open the References dialog box, choose References from the Project menu.
5. If OPCAutomation 2.0 is in the list, skip to step 7.
6. If OPCAutomation 2.0 is not on the list, click Browse and find the file, OPCDaAuto.dll.
7. Select the check box next to OPCAutomation 2.0 .
8. To accept the settings in the References dialog box, choose OK.
All of the OPC objects are now available to your project. You can find a specific object and its methods and properties in the Object Browser.
Note In Visual Basic 5, the Object Browser shows the object name for the default interfaces instead of the interface name. For example,
IOpcItemMgtDisp shows up as Group and IOpcItemDisp shows up as Item. The IOPCItemMgtDisp is the default interface for the Group object. The
IOpcItemDisp is the default interface for the Item object.
Including OPC Constants
The file "opcconst.txt" (see OPC Constants for Visual Basic), declares constants for Visual Basic that are defined in the OPC specification. They are
provided as part of this example. As the specification is revised these constants are subject to change and should be reviewed accordingly.
1. To add a text file to the project, choose Add File… from the Project menu.
2. Change the file type to All Types (*.*)
3. Select the file "opcconst.txt" and choose Open.
4. The project window shows a new module named OPC Constants.
5. To save the new project, choose Save Project from the File menu.
Creating a Class for OPC
There is some information that the client application needs to keep in order to work with the DeltaV OPC Data Access Server connection. In Barcode,
you will create a class to hold this information. You will also add procedures to this class to complete various tasks associated with OPC.
1. To add a class, select Class Module from the Project menu.
2. Open the properties window of the new class module.
Properties Window of New Class Module
3. Change the name of the class to "COPCServer".
4. Add the following declarations:
Option Explicit
Public WithEvents AnOpcServer As OPCServer
Public AnOpcServerBrowser As OPCBrowser
Connecting to the DeltaV OPC Data Access Server
The first thing the client application must do is open a connection to the DeltaV OPC Data Access Server. This is accomplished with the Connect
command found in the OPCServer object . The name of the DeltaV OPC Data Access Server is passed as a parameter. OLE uses this name to lookup the
information in the Windows registry. If you do not know the name of the OPCServer, you may optionally use the method GetOPCServers to retrieve all
OPCServers registered on the system.
1. Add a function to the OPCServer class called OpenServer. It should be a public function and should return an integer.
2. In the function OpenServer, add the following code:
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 36 of 50
OpenServer = True
Exit Function
ErrorHandler:
MsgBox "OpenServer: Error!" & vbCrLf _
& "Err.Number = " & Err.Number & vbCrLf _
& "Err.Description = " & Err.Description & vbCrLf _
& "Err.Source = " & Err.Source & vbCrLf
End Function
By using the Connect call, the variable Server now points to the default interface (IOPCServer) of the OPCServer object. This variable can be used
to access all the properties and methods associated with that interface. To get the second server interface, OPCBrowser, the Set command is called
on a variable of the correct type and given the OPCBrowser object created by calling the Server's CreateBrowser function.
3. Add a function to the COPCServer class called CloseServer. It should be a public function and should return an integer.
4. In the function CloseServer, add the following code:
Note To close a connection to the OPCServer cleanly, you must call Disconnect and set your objects to "Nothing".
5. Save the project and run it with full compile.
Although the new class has not been used, running with full compile will highlight any syntax errors so far.
Adding a Group
For this application we only need two groups. One for monitoring data and the other for data that is set in our application and sent to the DeltaV system.
The way the data is divided into groups is up to the discretion of the programmer. There are a few settings that are changed at the group level. They are:
Name - Name of the group. The name must be a unique group name, with respect to the naming of other groups created by this client.
UpdateRate - The rate, in milliseconds, at which group data is updated with the values in the DeltaV system.
Deadband - The amount that the data must change before it is reported as changed. The amount is given as a percentage of the engineering units of the
individual data values. In other words, if the PercentDeadband is 5% then a data value that ranges from 0 to 200 GPM must change at least 10 GPM
before it is reported.
TimeBias - A Time Zone offset in minutes.
LocaleID - Identifies a locale for national language support. The LCID for US-English is 409 hexadecimal.
ClientHandle - This value is any unsigned 32-bit integer. The DeltaV OPC Data Access Server will provide this handle when returning data in an
asynchronous connection. This allows the client application to identify the group to which the data belongs.
IsActive - Controls the active state of the group. A group that is active acquires data. An inactive group typically does not continue data acquisition
except as required for read/writes.
IsSubscribed - Controls asynchronous notifications to the group. A group that is subscribed receives data changes from the server.
The client application can change the active state of a group at any time. If the active state of the group is false, the DeltaV OPC Data Access Server will
not keep the values of its items up to date. The client application will not be notified of changes. Read requests to cache will return successfully however,
the data values will be stale and the quality statuses will be "bad" (for detailed description of statuses see Appendix B). Read requests to "device" are
sent directly to the DeltaV controller and always return the current values if no errors are encountered.
1. In the declarations section of the OPCServer class, add the following code:
OPCGroups is a collection of OPCGroup objects, and the methods that create, remove, and manage them.
This object also has properties for OPCGroup defaults. When OPCGroups are added, the DefaultGroupXXXX properties set its initial state. The
defaults can be changed to add OPCGroups with different initial states. Changing the defaults does not affect groups that have already been
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 37 of 50
created. Once an OPCGroup is added, its properties can be modified. This reduces the number of parameters required to call the Add method.
The OPC Groups provide a way for clients to organize data. For example, the group might represent items in a particular operator display or
report. Data can be read and written. Exception based connections can also be created between the client and the items in the group and can be
enabled and disabled as needed. An OPC client can configure the rate that a DeltaV OPC Data Access Server should provide the data changes to
the OPC client.
2. Add a function to the OPCServer class called AddGroup. It should be a public function and should return an integer.
3. Add the following parameters to the function AddGroup:
4. In the function AddGroup, add the following code:
The OPCServer will return the actual update rate for the group and the server handle. One reason the actual update rate may differ is if the
requested rate is less than one second. The Server Handle will be used in calls from the client to the OPCServer that request changes to the group.
5. Add a function to the OPCServer class called RemoveGroup. It should be a public function and should return an integer.
6. Add the following parameters to the function RemoveGroup:
7. In the function RemoveGroup, add the following code:
8. Add a support function for looking up the group handle from the name. The function should be called "LookUpGroup". It is a public function with
the following declaration:
9. In the LookUpGroup function, add the following code:
LookUpGroup = -1
Done = False
Count = 0
While Not Done
If Count > GroupCount Then
Done = True
ElseIf GroupName = Groups(Count).Name Then
LookUpGroup = Count
Done = True
Else
Count = Count + 1
End If
Wend
Exit Function
errHandler:
MsgBox Err.Description
Exit Function
End Function
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 38 of 50
10. Save the project and run with full compile to highlight errors.
Adding Items
Just as you add groups to the server's OPCGroup object, you add items to a group object. Items must be valid fields in the DeltaV database. The ItemID
is the DeltaV path to the item (area name is not included). An example path note "OPCSAMPLE/STEP_COUNT.CV". The same item may exist in
multiple groups. There are a few settings that are changed at the item level. They are:
RequestedDataType - This is the data type of the item that the client application would like to receive. For example, to request the String representation
of a Named Set use a requested data type of string (VT_BSTR) instead an integer value (VT_I4). Constants for the various data type are defined in OPC
Constants for Visual Basic.
ClientHandle - This value is any unsigned 32-bit integer. The DeltaV OPC Data Access Server will provide this handle when returning data in an
asynchronous connection. This allows the client application to identify the item to which the data refers.
IsActive - The client application can change the active state of an item at any time using the SetActiveState command. If an item is not active the DeltaV
OPC Data Access Server will not keep its value up to date. The client application will not be notified of changes. Read requests to cache will return
successfully however, the data value will be stale and the quality status will be "bad" (for detailed description of statuses see Appendix B). Read requests
to "device" always return the current value if no errors are encountered.
Note AccessPaths and Blobs are defined in the OPC specification but are not required for the DeltaV system. These variables are ignored.
The DeltaV OPC Data Access Server returns the following information about the item:
Canonical Data Type - This is the native data type of the item.
Server Handle - This is an unsigned 32-bit integer. Clients give this handle to the DeltaV OPC Data Access Server to identify an item. The DeltaV
OPC Data Access Server uses the group server handle with the item server handle to identify the item.
AccessRights - This is the access rights allowed to a given item. The return values are Read only, Write only or Read/Write.
Note The DeltaV OPC Data Access Server assumes that all items are read/write. If a client application attempts to write to a parameter that is in fact
read only in the DeltaV system, the write will fail, and the DeltaV OPC Data Access Server will return an error to the client.
1. Add 2 functions to the OPCServer class, AddItem and RemoveItem. They should be public functions and should return an integer.
2. Add the following parameters to the AddItem function:
3. In the AddItem function, add the following code:
AddItem = 0
On Error GoTo ErrorHandler
'Look up group
anOPCGroupHandle = LookUpGroup(GroupName)
If anOPCGroupHandle <= 0 Then
MsgBox "Error - Group Not Found"
Exit Function
End If
AddItemCount = 1
ReDim anOPCClientHandles(AddItemCount)
ReDim anOPCItemIDs(AddItemCount)
ReDim anOPCItemServerHandles(AddItemCount)
ReDim anOPCItemServerErrors(AddItemCount)
ReDim anOPCRequestedDataTypes(AddItemCount)
ReDim anOPCAccessPathss(AddItemCount)
anOPCClientHandles(1) = anOPCItemCollection.Count + 1
anOPCItemIDs(1) = ItemID
anOPCRequestedDataTypes(1) = DataType
anOPCAccessPathss(1) = ""
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 39 of 50
anOPCItemCollection.GetOPCItem(anOPCItemServerHandles(1)).RequestedDataType
= DataType
Else
MsgBox anOPCItemServerErrors(1) & ": Error adding item " & ItemID
Msg = AnOpcServer.GetErrorString(anOPCItemServerErrors(1))
MsgBox Msg
End If
Exit Function
ErrorHandler:
MsgBox "AddItem: Error!" & vbCrLf _
& "Err.Number = " & Err.Number & vbCrLf _
& "Err.Description = " & Err.Description & vbCrLf _
& "Err.Source = " & Err.Source & vbCrLf
End Function
4. Add the following parameters to the RemoveItem function:
5. In the RemoveItem function, add the following code:
RemoveItem = False
On Error GoTo ErrorHandler
anOPCGroupHandle = LookUpGroup(GroupName)
If (anOPCGroupHandle < 0) Then
MsgBox "Error - Group not found"
Exit Function
End If
RemoveItemCount = 1
anOPCItemServerHandles(1) = LookUpItem(anOPCGroupHandle, ItemID)
If (anOPCItemServerHandles(1) < 0) Then
MsgBox "Error - Item not found"
Exit Function
End If
anOPCItemCollection.Remove RemoveItemCount, _
anOPCItemServerHandles, anOPCItemServerErrors
'Test for Error
If anOPCItemServerErrors(1) >= 0 Then
'Item was removed
Else
MsgBox anOPCItemServerErrors(1) & ": Error removing item " & ItemID
Msg = AnOpcServer.GetErrorString(anOPCItemServerErrors(1))
MsgBox Msg
End If
RemoveItem = True
Exit Function
ErrorHandler:
MsgBox "RemoveItem: Error!" & vbCrLf _
& "Err.Number = " & Err.Number & vbCrLf _
& "Err.Description = " & Err.Description & vbCrLf _
& "Err.Source = " & Err.Source & vbCrLf
End Function
RemoveItem sets the ItemDisp interface to nothing. This releases the interface in the OpcServer.
6. Add a support function for looking up the group handle from the name. The function should be called "LookUpItem". It is a private function with
the following declaration:
7. In the function LookUpItem, add the following code:
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 40 of 50
done = True
ElseIf ItemID = Items(GroupHandle, Count).ID Then
LookUpItem = Count
done = True
Else
Count = Count + 1
End If
Wend
Exit Function
ErrHandler:
MsgBox Err.Description
Exit Function
This function takes the Server Handle for the group and the Item ID. If the client handle is not known, the application calls LookUpGroup with the
group name. LookUpGroup returns the client handle for the group.
8. Save the project and run with full compile to highlight any errors.
Using the New Class
The next step is to use the OPCServer class by declaring a variable of the class and calling its methods. In this application, you will define a global
variable, OPCServer of the type OPCServer. You need two groups for this application. The first one holds items for the target ingredient and target
amount that need to be added to this recipe. It also holds the actual ingredient and amount and a Done flag to send back to the DeltaV system. The
second group contains the step of the MIXTANKS SFC (Sequential Function Chart). The step will pause at "DRY_ADD" waiting for the user to
manually add the ingredient. This second group needs to request OnDataChange notifications. The OnDataChange procedure in the application can
display the current step and react when the step is "DRY_ADD".
When an application needs to manipulate a group or item, it makes the request with a handle. This handle is returned from the server when the group or
item is first created. In addition to adding global variables for each of the values needed, it is also necessary to have a variable to hold the server handles
for those variables.
1. In the code window for the Barcode module (Barcode.bas), set the Object to "General" and the Proc to "Declarations".
2. Add the following declarations, after the Option Explicit:
The Target Ingredient has two handles. The first is for the numeric value of the target ingredient. The second is for the text value of the target
ingredient. In the DeltaV system, the ingredient has been defined by a Named Set (also referred to as an enumeration). This is a value from 0 to
255 that displays an assigned text message. This application needs to display both values to the user. To accomplish this, you will add two items
with the only difference being the data type requested (string vs. integer).
3. In the Sub Main, add the following code before the line frmMain.show:
The group IngredientInfo is added with an update rate of 1000 milliseconds or 1 second. This is the fastest update rate possible with OPC. Since
this application requires very few data points, maintaining the best possible rate is not a performance issue. For large amounts of data, it would be
important to separate items in groups that require different update rates and therefore reduce loading.
In the Sub Main, add the following code before the line frmMain.Show:
In the call to AddItem, the ItemID is a string representing the path of the item in the DeltaV system, for instance "
OPCSAMPLE/TARGET_DRYINGR.CV". In the sample DeltaV configuration there is a module named OPCSAMPLE. This module has a
module level parameter named TARGET_DRYINGR. The ".CV" indicates the field of the parameter. The Current Value (CV) is the default field
if none is specified. The defined fields depend on the parameter type. For a list of possible parameter types and the fields that they contain, see
DeltaV Parameter Types and Field Definitions.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 41 of 50
Note One easy way of determining the path of an existing parameter is to use the Excel Add-In in the DeltaV system. The Add-In includes a
wizard that allows you to browse for the item to the field level. Select the check box Paste parameter path to left of result to see the full
parameter path.
Adding Reads and Writes to the opcServer Class
The OPCServer class must be expanded to include functions for accessing the values of the parameters. These functions must be called to populate the
fields on the Main form.
1. Add two functions to the OPCServer class, ReadItemValue and SetItemValue. They should be public functions and should return a variant.
2. Add the following parameters to the function ReadItemValue:
3. In the function ReadItemValue, add the following code:
ReadItemValue = 0
On Error GoTo ErrorHandler
DataNumItems = 1
DataServerHandles(1) = ItemServerHandle
Exit Function
ErrorHandler:
MsgBox "ReadItemValue: Error!" & vbCrLf _
& "Err.Number = " & Err.Number & vbCrLf _
& "Err.Description = " & Err.Description & vbCrLf _
& "Err.Source = " & Err.Source & vbCrLf
End Function
This function uses the SyncRead call of the OPCGroup interface. This call expects an array of server handles and it returns arrays of Values,
Qualities, Timestamps and Errors.
If the call to OPCRead fails an error is raised and execution jumps to the errHandler label. It is possible however, for the call to succeed but
individual items fail. To verify this, the values in the Errors array should be checked. If an error value is zero then the read was successful and the
value, quality and timestamp is meaningful. A positive non-zero result is success with qualifications. A negative non-zero result is failure and the
value, quality and timestamp should be ignored. If the error value is not zero, a call is made to the DeltaV OPC Data Access Server function
GetErrorString to get the text version of the error and display it to the user.
A complete description of how to decipher quality codes can be found in the OPC specification (See references).
4. Add the following parameters to the function SetItemValue:
5. In the function SetItemValue, add the following code:
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 42 of 50
SetItemValue = False
On Error GoTo ErrorHandler
DataServerHandles(1) = ItemServerHandle
DataValues(1) = Value
ErrorHandler:
MsgBox "SetItemValue: Error!" & vbCrLf _
& "Err.Number = " & Err.Number & vbCrLf _
& "Err.Description = " & Err.Description & vbCrLf _
& "Err.Source = " & Err.Source & vbCrLf
End Function
6. Open the code window for the form Main. Add the following code to the sub Timer1_Timer:
txtTargetIngName = gOpcServer.ReadItemValue("IngredientInfo", _
gTargetIngStrHandle, True)
txtTargetIngNum = gOpcServer.ReadItemValue("IngredientInfo", _
gTargetIngHandle, True)
txtTargetIngAmt = gOpcServer.ReadItemValue("IngredientInfo", _
gTargetAmtHandle, True)
Exception Reporting
When a group is added, the application can request to be notified when items in that group change value or quality. This request is made by simply
setting an attribute in the an OPCGroup object and creating an event handler to process the data change. It is possible to handle these events on two
levels, the OPCGroups or OPCGroup level. For this example, we will process data change notifications on the OPCGroups (OPCGroup collection) level.
1. Make sure events are enabled by double-checking that our definition of MyGroups contains the "WithEvents" declaration. In the declaration
section of the COPCServer class module, MyGroups declaration should be:
2. Create a public function which turns on data change notification for a specific group
Subscribe = False
On Error GoTo ErrorHandler
'Look up group
anOPCGroupHandle = LookUpGroup(GroupName)
If anOPCGroupHandle <= 0 Then
MsgBox "Error - Group Not Found"
Exit Function
End If
'Set the group's subscribe status appropriately. Default to "True".
MyGroups(GroupName).IsSubscribed = Status
Subscribe = True
Exit Function
ErrorHandler:
MsgBox "Subscribe: Error!" & vbCrLf _
& "Err.Number = " & Err.Number & vbCrLf _
& "Err.Description = " & Err.Description & vbCrLf _
& "Err.Source = " & Err.Source & vbCrLf
End Function
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 43 of 50
3. Create a private subroutine in the COPCServer class module.
Dim i As Integer
The GlobalDataChange procedure steps through the given array of items. If the Quality is good and the item is the Step of the SFC then the value is
written to the status bar to let the user know the current step. In the case that the step is "DRY_ADD" the application needs to do more work. It is not
allowed to call a DeltaV OPC Data Access Server function within the OnDataChange. It is also good practice to limit the length of time the
OnDataChange executes. To accomplish these requirements, a timer object was added to the Main form. The timer function reads the target information
and pops up a message box asking the user to add the ingredient (see Visual Basic Help - Timer object). You have already added the code to read the
target values when the timer fires. Now add the code to check if its time to add the dry ingredient.
Using Exception Reporting in the Application
Now that the support is in place for exception reporting you can add the code to create a group, request exception reporting and display the results to the
user.
1. In the Barcode module, add the global variables for keeping track of the step of the MIXTANKS SFC.
2. In the sub Main of the Barcode module, add the following code before the frmMain.Show command:
3. In the declarations section of the Barcode module, add a global variable for flagging the time to add dry ingredients:
4. In the Timer1_Timer function of the form frmMain, add the following:
Writing Back to the DeltaV System
The last step in the application is to write the actual data back to the DeltaV system and allow the MIXTANKS SFC to continue.
1. In the sub cmdUpdateDV_Click on the frmMain form add:
UpdateDeltaV
cmdUpdateDV.Enabled = False
txtIngNumber = ""
txtAmount = ""
2. To Barcode module, add the following procedure:
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 44 of 50
Exit Sub
ErrorHandler:
MsgBox "UpdateDeltaV: Error!" & vbCrLf _
& "Err.Number = " & Err.Number & vbCrLf _
& "Err.Description = " & Err.Description & vbCrLf _
& "Err.Source = " & Err.Source & vbCrLf
End Sub
After checking that the SFC is at the correct step, the UpdateDeltaV function reads the values from the actual fields on the form and (assuming they are
not empty) writes them to the DeltaV system. The last write sets the Done flag in the SFC to indicate that the SFC may continue.
Running the Client Application
This chapter describes the steps necessary to run the Barcode application with DeltaV software.
To run the application, you must first configure DeltaV software with the sample configuration. This configuration contains a few Named Sets and one
module. After these have been imported and downloaded to a DeltaV controller, the application can connect and interact with the OpcSample SFC.
Import the OPC-SAMPLE area using the DeltaV Explorer:
1. In Explorer, choose Import from the File menu.
2. Select the file barcode.fhx and choose OK.
3. Assign the module, OPCSAMPLE in the area OPC-SAMPLE to a controller and download it.
4. Once the OPCSAMPLE module is running in a controller the Barcode application can connect to the defined items and interact with the SFC. The
SFC will loop through the recipe continuously.
5. In Visual Basic, choose Make EXE File.. from the File menu.
6. Run the Barcode.exe file.
The application may take a few seconds to start up the first time. The DeltaV OPC Data Access Server does not run automatically when the DeltaV
system starts up. The DeltaV OPC Data Access Server will start when the first OPC client application issues a CreateObject call. The DeltaV OPC Data
Access Server runs as a background process (no window) and will continue to run until DeltaV services are shut down. To see if the DeltaV OPC Data
Access Server is running, open the Task Manager in Windows and look at the Process tab. The name of the executable is frsopcdv.exe.
DeltaV OPC Mirror
OPC Mirror connects OPC servers on multiple control systems and enables bi-directional data traffic from one system to another. OPC (OLE for Process
Control) is an industry-wide standard that allows control systems from different vendors to communicate without any custom development.
Note OPC Mirror supports reading data values from SIS modules, but does not support writing to SIS modules protected by its Secure Writes
Mechanism. For more information, see DeltaV SIS Overview.
Installing OPC Mirror
You can install OPC Mirror on a DeltaV workstation or a non-DeltaV system. To install the OPC Mirror application, run the OPCMirror.exe setup file
located in the DV_Extras\OPCMirror folder on the DeltaV installation disk #1.
Important During installation, you can specify the directory where OPC Mirror is installed. The default location is C:\Program Files\FRS\OPC Mirror.
Because OPC Mirror runs as a service in Windows, it must be started by a user whose security permissions are set to Full Control for this directory.
After installing OPC Mirror, complete the following tasks:
1. Assign the appropriate OPC Mirror licenses.
Note If the OPC Mirror installation program finds an OPC Mirror configuration database file from a previous installation, you are prompted to
import the database file into the current installation. If the previous installation of OPC Mirror licensed more OPC Data Access Servers than you
are licensing for the current installation, it is possible that errors may appear in DeltaV Diagnostics in the event that OPC Mirror attempts to
reestablish more connections than allowed for the current installation.
2. Start the OPC Mirror service by right-clicking the OPC Mirror icon in the System Tray, and then selecting Start OPC Mirror Service from the
shortcut menu. (You can also start the OPC Mirror service by using the Computer Management program in Windows.)
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 45 of 50
Note If the OPC Mirror setup program initiates a system restart during installation, you do not need to manually start the OPC Mirror service,
because it starts automatically on system startup, by default.
3. Start the OPC Mirror Configuration program to add OPC servers and items and to define server monitoring specifications. To start the OPC Mirror
Configuration program, right-click the OPC Mirror icon in the System Tray, and then select Configure from the shortcut menu, or select
Programs | OPC Mirror | OPC Mirror Configuration on the Start menu.
Uninstalling OPC Mirror
Before uninstalling OPC Mirror, you must first complete the following tasks:
If the OPC Mirror Configuration program is running, exit it by selecting Exit on the Pipe menu.
If the OPC Mirror Diagnostics program is running, exit it by selecting Exit on the File menu.
Stop the OPC Mirror service by right-clicking the OPC Mirror icon in the System Tray, and then selecting Stop OPC Mirror Service from the
shortcut menu.
Close the OPC Mirror Tray program by right-clicking the OPC Mirror icon in the System Tray, and then selecting Close from the shortcut
menu.
You can then uninstall OPC Mirror by selecting it in the Add or Remove Programs list in Windows Control Panel (Programs and Features in Windows
Vista), and then selecting Change/Remove.
Using DeltaV OPC Mirror
OPC defines two kinds of applications: servers and clients. Servers provide data services to control systems, industrial buses or proprietary devices.
Clients access servers to make use of their data.
The OPC specification also defines how OPC clients and servers communicate, but it does not define how servers interconnect with each other. To
connect servers, you need a client application like the OPC Mirror. The OPC Mirror linkage can be between DeltaV OPC Data Access Servers or any
other OPC servers. Any data item that an OPC server accepts when adding items is also acceptable in OPC Mirror.
OPC Mirror Connecting Two OPC Servers
OPC Mirror's standard Windows interface makes it easy to learn and it requires no custom code to transfer data between all standard OPC systems. After
it is configured, it runs quietly in the background, transferring data back and forth between OPC servers. Mirror can even handle large integration tasks.
OPC Mirror Connecting Two DeltaV OPC Data Access Servers
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 46 of 50
OPC Mirror Connecting a DeltaV OPC Data Access Server to a PROVOX Operator Console OPC Data Access Server
Redundant DeltaV OPC Mirror
To run redundant OPC Mirror clients, you must install OPC Mirror on both members of an Application Station pair with the Enable Redundancy for
Assigned Modules option enabled. You can then configure OPC Mirror so that it participates in switchover decision-making for the Application Stations.
The OPC Mirror clients inherit their active or standby redundancy roles from the core DeltaV redundancy subsystem.
A redundant OPC Mirror client can communicate with other OPC servers installed on the same Application Station or on another DeltaV or non-DeltaV
workstation. A redundant OPC Mirror client works together with the redundant DeltaV OPC Data Access Server and Application Station where it is
installed such that if a failure occurs with the active OPC Mirror, the entire Application Station where the active OPC Mirror is running will switch over
to allow the standby OPC Mirror to assume the active role. The active OPC Mirror can monitor OPC servers to which it is connected, and transfer data
between them; it does not transfer data from or monitor OPC servers connected separately to the standby OPC Mirror. Similarly, the standby OPC
Mirror can monitor only OPC servers to which it is connected; however, the standby OPC Mirror does not transfer data between the OPC servers to
which it is connected until it assume the active role.
You configure the active OPC Mirror with the data mapping between the appropriate OPC servers. After the active OPC Mirror is configured, the
configuration information is copied to the standby DeltaV OPC Mirror, and OPC Mirror is ready for redundant operation. The active OPC Mirror
monitors its configured OPC servers and transfers data as required. The standby OPC Mirror is in hot standby mode, meaning it can monitor its
configured OPC servers, but does not transfer data. Hot standby allows the standby OPC Mirror to assume the active role very quickly after failure of the
active OPC Mirror.
The primary differences between the active and standby OPC Mirror clients in a redundant configuration are the following:
The active OPC Mirror can transfer data between OPC servers; the standby OPC Mirror reads data from OPC servers to which it is connected, but
does not write data.
You can start the OPC Mirror Configuration program to define pipes or set server monitor configuration options only on the Application Station
where the active OPC Mirror is running.
Supported Configurations
You can set up redundant OPC Mirror clients with pipes connected between OPC servers in a variety of configurations. The illustrations below show
some typical configurations for running OPC Mirror redundantly.
In the following illustration, the active OPC Mirror is running on an Application Station named nodename, while the standby OPC Mirror runs on an
Application Station named nodename_S. (During the workstation configuration of an Application Station pair on which to run redundant OPC Mirror
clients, the DeltaV system appends the characters _S, by default, to the name of the second Application Station of the pair.) In this example, the OPC
Mirror client running on nodename_S would become the active OPC Mirror following a switchover.
A pipe is defined between the local DeltaV OPC Data Access Server on the Application Station (named OPC.DeltaV.1, by default) and a custom
OPC Data Access Server implementation. The active OPC Mirror reads and writes data, as specified, between these two servers. The standby OPC
Mirror reads (but does not write) data, until such time as a switchover causes it to become the active OPC Mirror.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 47 of 50
Redundant OPC Mirror in a Local-to-Local Configuration
In the following illustration, a pipe is defined between OPC.DeltaV.1, the local DeltaV OPC Data Access Server on the Application Station where the
active OPC Mirror is running, and an OPC Data Access Server on a remote workstation. The remote workstation can be either a DeltaV workstation
(such as another Application Station) or a non-DeltaV workstation. The OPC Data Access Server on the remote workstation can be either a custom OPC
server implementation or, if it is a DeltaV workstation, its local DeltaV OPC Data Access Server, OPC.DeltaV.1.
As in the previous configuration example, the active OPC Mirror reads and writes data, as specified, between the two servers. And the standby OPC
Mirror reads (but does not write) data, until such time as a switchover causes it to become the active OPC Mirror.
Redundant OPC Mirror in a Local-to-Remote Configuration
In the following illustration, a pipe is defined between OPC servers on two remote workstations. In this example, the local DeltaV OPC Data Access
Server on the Application Stations where the active and standby OPC Mirror are running is unused.
The remote workstations can be any mixture of DeltaV or non-DeltaV workstations. Consistent with the previous configuration example, either
OPC Data Access Server on the remote workstations can be a custom OPC server implementation or, if it is a DeltaV workstation, its local DeltaV
OPC Data Access Server, OPC.DeltaV.1.
As in the previous configuration examples, the active OPC Mirror reads and writes data, as specified, between the two servers. And the standby OPC
Mirror reads (but does not write) data, until such time as a switchover causes it to become the active OPC Mirror.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 48 of 50
Redundant OPC Mirror in a Remote-to-Remote Configuration
Installing OPC Mirror for Redundancy
To install OPC Mirror as a redundant subsystem, you must first set up a pair of Application Stations by creating an Application Station in DeltaV
Explorer, and then enable the Enable Redundancy for Assigned Modules option on the Redundancy page of its Properties dialog box. Also, you must
select OPC DA Server and OPC Mirror from the drop-down list for the Redundant OPC option.
Redundancy Page in Application Station Dialog Box
After setting up the Application Station pair, install OPC Mirror on each Application Station, run the OPCMirror.exe setup file located in the
DV_Extras\OPCMirror folder on the DeltaV installation disk #1.
Important To be used redundantly on a pair of Application Stations, OPC Mirror must be installed in the same directory path on each workstation in
the pair. By default, OPC Mirror is installed in C:\Program Files\FRS\OPC Mirror. If you specify a different location when installing OPC Mirror on one
of the Application Stations, you must also specify the same installation directory path on the other Application Station. Because OPC Mirror runs as a
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 49 of 50
service in Windows, it must be started by a user whose security permissions are set to Full Control for this directory.
After installing OPC Mirror, complete the following tasks:
1. Assign the appropriate OPC Mirror and OPC Mirror Redundancy licenses to the Application Stations.
Note If the OPC Mirror installation program finds an OPC Mirror configuration database file from a previous installation, you are prompted to
import the database file into the current installation. If the previous installation of OPC Mirror licensed more OPC Data Access Servers than you
are licensing for the current installation, it is possible that errors may appear in DeltaV Diagnostics in the event that OPC Mirror attempts to
reestablish more connections than allowed for the current installation.
2. Start the OPC Mirror service by right-clicking the OPC Mirror icon in the System Tray , and then selecting Start OPC Mirror Service from the
shortcut menu. (You can also start the OPC Mirror service by using the Computer Management program in Windows.)
Note If the OPC Mirror setup program initiates a system restart during installation, you do not need to manually start the OPC Mirror service,
because it starts automatically on system startup, by default.
Important After setting up OPC Mirror for redundancy and downloading the Application stations, if the value of the MirLic (OPC Mirror
Redundancy Enabled) or MirPAvail (OPC Mirror Partner Application Available) parameters in DeltaV Diagnostics is NO, stop the OPC Mirror
service (if necessary), and then restart it on both Application Stations.
3. Start the OPC Mirror Configuration program to add OPC servers and items and to define server monitoring specifications. To start the OPC Mirror
Configuration program, right-click the OPC Mirror icon in the System Tray, and then select Configure from the shortcut menu, or select
Programs | OPC Mirror | OPC Mirror Configuration on the Start menu.
To uninstall OPC Mirror, refer to the instructions in DeltaV OPC Mirror.
Running the OPC Mirror Configuration program
You can start the OPC Mirror Configuration program on the Application Station where the active OPC Mirror is running to define pipes or set server
monitor configuration options. To start the OPC Mirror Configuration program, click Programs | OPC Mirror | OPC Mirror Configuration or right-click
the OPC Mirror icon in the System Tray and select the Configure command.
Important After defining any pipes, you must exit the OPC Mirror Configuration program before they are activated and copied to the standby OPC
Mirror.
You cannot run the OPC Mirror Configuration program on the Application Station where the standby OPC Mirror is running. Any configuration settings
you make for the active OPC Mirror are automatically migrated to the standby OPC Mirror.
Configuration settings are stored in a configuration database file containing a last-changed timestamp value (in GMT or UTC) and a sequential
configuration-changed value. These values appear in the status bar of the OPC Mirror Configuration program as LastChangedTime and
SequenceNumber. After a switchover, OPC Mirror uses these values to synchronize the configuration databases of the active and standby OPC Mirror
for redundancy. If the LastChangedTime and SequenceNumber values of both configuration databases match exactly, the configuration databases are in
sync. If the configuration databases are out of sync, the configuration database with the most current SequenceNumber value is used to synchronize the
configuration databases, unless the SequenceNumber values are the same. In this case, the configuration database with the most current
LastChangedTime value is used.
Using Server Monitoring with Redundant OPC Mirror
If you use the Enable Server Monitor option when configuring OPC Mirror, you can monitor the application state of local or remote OPC servers with an
existing connection to the active or standby OPC Mirror. Optionally, you can enable server monitoring for either or both OPC Mirror client. In either
case, you can specify that server monitoring responds to a failure of any or all OPC servers connected to the OPC Mirror client.
The specifications you set determine when a request will be made for the Application Station where the active OPC Mirror is running to switch over to
the Application Station where the standby OPC Mirror is running or if the Application Station where the standby OPC Mirror is running is made
unavailable for switchover.
For more information about using server monitoring with OPC Mirror clients, see the online Help for the OPC Mirror Configuration program.
DeltaV OPC Pager
DeltaV OPC Pager pages users when a monitored OPC variable triggers an event based on user-defined limits. Users configure alerts, which monitor
OPC variables. When the Alert conditions become true, DeltaV OPC Pager will send out a page. DeltaV OPC Pager can also be used to send pages
manually to users. OPCPager.exe is an OPC client that can access any OPC server.
Important The DeltaV OPC Pager is not supported for redundancy. You should not install DeltaV Pager on either Application Station in a pair on
which redundancy has been enabled for assigned modules in a virtual controller, OPC Data Access Server, OPC Mirror, or Redundant DeltaV Connect,
because inconsistent and/or erroneous data may result after a switchover.
DeltaV OPC Pager requires a Hayes-compatible modem. Windows Administrator privileges are required for installation.
To install DeltaV OPC Pager, navigate to the DV_Extras\OPCPager folder on the DeltaV installation disk #1 and double click OPCPager.exe.
DeltaV OPC Alarms and Events Server
The DeltaV OPC Alarms and Events Server provides an interface to the DeltaV Alarms and Events subsystems. OPC client applications use the DeltaV
Alarms and Events Server to collect DeltaV alarm and event information from the DeltaV Alarms and Events subsystems.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020
Page 50 of 50
Important The DeltaV OPC Alarms and Events Server is not supported for redundancy. You should not use a DeltaV Alarms and Events Server on
either Application Station in a pair on which redundancy has been enabled for assigned modules in a virtual controller, OPC Data Access Server, OPC
Mirror, or Redundant DeltaV Connect, because inconsistent and/or erroneous data may result after a switchover.
Event Filtering
The DeltaV OPC Alarms and Events Server allows client applications to collect every type of event supported by the DeltaV Alarms and Events
subsystem:
Process alarms
Status changes
Operator tracking messages
Operator manual action requests
Batch Historian events
Campaign Manager events
Batch Executive events
Operator annotations
Note Batch Historian, Batch Executive and Campaign Manager events logged in the Event Chronicle (Ejournal) identify limited significant events such
as batch start and completion times. For more information see Batch Executive Events, Batch Historian Events, and Campaign Manager Events.
Rather than list the actual events (such as thousands of individual alarm conditions) to which they want to subscribe, client applications subscribe to
events through the use of event filters such as event type, area source, or severity. The DeltaV OPC Alarms and Events Server supports event filters
specified in the OPC Alarms and Events Specification. Client applications can collect any or all alarms and events based on the filters they create. For
example, one client might subscribe to all setpoint changes in a particular plant area and another might subscribe to all HiHi alarms within a plant area.
System Requirements
The DeltaV OPC Alarms and Events Server runs on the ProfessionalPLUS workstation or on an Application Station. OPC Alarms and Events client
applications can run on the ProfessionPLUS, Application Station or any other workstation connected to a network. Like all OPC applications, COM and
DCOM are necessary networking elements.
Client applications must be written in C++.
Using the DeltaV OPC Alarms and Events Server
The DeltaV OPC Alarms and Events Server exposes all of the alarms and events associated with the plant area assigned to the workstation on which the
server is licensed (ProfessionalPLUS workstation or Application Station).
Use the DeltaV Explorer to:
Assign, to the workstation, the plant areas that contain the alarms and events that you want to expose. (For example, to expose every alarm in
every plant area, assign every plant area to the workstation on which the DeltaV OPC Alarms and Events Server resides. Or, to expose only alarms
and events in Plant Area 1, assign only Plant Area 1 to the workstation on which the DeltaV OPC Alarms and Events Server resides, and so on.)
Download the changes to the workstation.
Refer to the DeltaV Explorer online help for complete instructions on assigning plant areas and downloading changes to the workstation. Note that it is
not necessary to click the Enabled check box on the Alarms and Events Properties dialog box to make the alarms and events available to the OPC alarms
and events server. This checkbox is only for the Event Chronicle.
The DeltaV OPC Alarms and Events Server is fully compliant with the OPC Alarms and Events Specification version 1.02.
Note The OPCAreaBrowser object is an optional object in the OPC Alarms and Events Specification version 1.02. This object provides a way for
clients to browse the process areas implemented by the server and to filter event subscriptions by process areas.
The DeltaV install automatically installs the server software, DVOPCAE.exe, to the DeltaV directory DeltaV\bin (DeltaV\bin\DVOPCAE.exe). The
DeltaV OPC Alarms and Events server (DVOPCAE.exe) is launched when a client application connects to it.
For more information and to download the OPC Alarms and Events Specification, refer to the OPC website at http://www.opcfoundation.org/.
file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhB8E1.htm 05/12/2020