OPC Manual
OPC Manual
ArchestrA OPC UA
Client Service Guide
3/8/14
All rights reserved. No part of this documentation shall be reproduced, stored in a retrieval system, or
transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without the
prior written permission of Invensys Systems, Inc. No copyright or patent liability is assumed with respect
to the use of the information contained herein. Although every precaution has been taken in the
preparation of this documentation, the publisher and the author assume no responsibility for errors or
omissions. Neither is any liability assumed for damages resulting from the use of the information
contained herein.
The information in this documentation is subject to change without notice and does not represent a
commitment on the part of Invensys Systems, Inc. The software described in this documentation is
furnished under a license or nondisclosure agreement. This software may be used or copied only in
accordance with the terms of these agreements.
All terms mentioned in this documentation that are known to be trademarks or service marks have been
appropriately capitalized. Invensys Systems, Inc. cannot attest to the accuracy of this information. Use of
a term in this documentation should not be regarded as affecting the validity of any trademark or service
mark.
Alarm Logger, ActiveFactory, ArchestrA, Avantis, DBDump, DBLoad, DT Analyst, Factelligence,
FactoryFocus, FactoryOffice, FactorySuite, FactorySuite A2, InBatch, InControl, IndustrialRAD,
IndustrialSQL Server, InTouch, MaintenanceSuite, MuniSuite, QI Analyst, SCADAlarm, SCADASuite,
SuiteLink, SuiteVoyager, WindowMaker, WindowViewer, Wonderware, Wonderware Factelligence, and
Wonderware Logger are trademarks of Invensys plc, its subsidiaries and affiliates. All other brands may
be trademarks of their respective owners.
3
Contents
Welcome .................................................... 7
Documentation Conventions ........................................................... 7
Technical Support ............................................................................ 8
Glossary................................................... 83
Index....................................................... 87
Welcome
Documentation Conventions
This documentation uses the following conventions:
Technical Support
Wonderware Technical Support offers a variety of support options to
answer any questions on Wonderware products and their
implementation.
Before you contact Technical Support, refer to the relevant section(s)
in this documentation for a possible solution to the problem. If you
need to contact technical support for help, have the following
information ready:
• The type and version of the operating system you are using.
• Details of how to recreate the problem.
• The exact wording of the error messages you saw.
• Any relevant output listing from the Log Viewer or any other
diagnostic applications.
• Details of what you did to try to solve the problem(s) and your
results.
• If known, the Wonderware Technical Support case number
assigned to your problem, if this is an ongoing problem.
Chapter 1
The Unified Architecture (UA) from the OPC Foundation is the next
generation OPC standard that provides a cohesive, secure and reliable
cross-platform framework for access to real time data. The ArchestrA
OPC UA Services implement the UA standard as a client service.
Classic OPC
OPC originally stood for OLE (Object Linking and Embedding) for
Process Control. Later, the OPC Foundation dropped the acronym and
identified “OPC” as a word in its own right.
OLE is a Microsoft technology that allows an application to export
content in the form of an object to another application, and then
import it with additional content. Typically, the changes in the master
file automatically update the application or document that references
it. With OLE, the visual display of data from other applications is
possible within a host application, even when the host application
cannot generate such content by itself.
OPC provides a common interface for real-time communication
between different control devices and related software products from
different technology vendors.
There are several different OPC specifications for different
communication functions, the primary specifications being Data
Access (OPC DA), Historical Data Access (OPC HDA), and Alarms and
Events (OPC AE).
OPC UA
OPC UA unifies the different classic OPC specifications by means of a
unified architecture. It retains all the classic OPC functionalities while
leveraging the services technology. It also provides robust, reliable,
high-performance communication, suitable for automation.
OPC UA supports binary encoding for high-performance data
exchange, and incorporates a number of other improvements.
Chapter 2
Configuring the
ArchestrA UA Client Service
Creating UA Client
Configuring UA Client Assigning UA Client Deploying UA Client
instance
3 In the Services tab, expand the Galaxy tree structure to view the
list of installed services and their instances.
Note: You can also click the Browse button to browse, and then select
the computer name or IP address of the OPC UA Server.
Note: Click the Refresh button to refresh the endpoint list, if you want
to view the list of the latest sever endpoint URIs.
Option Description
Sign and Encrypt Indicates that all messages are signed and
encrypted.
Note: If the Security Message Mode option is not None, the OPC UA
Server’s digital certificate must be trusted and be made available on the UA
Client computer. For more information on digital certificates, see "Creating a
Self-Signed OPC UA Compliant Certificate and Key Pair" on page 69.
Option Description
Note: If the Security Policy option is not None, the OPC UA Server’s
digital certificate must be trusted and be made available on the UA Client
computer. For more information on digital certificates, see "Creating a
Self-Signed OPC UA Compliant Certificate and Key Pair" on page 69.
The OPC UA Namespace tab displays the Namespace alias table for
the Namespace URI’s present in the OPC UA Server, that the UA
Client connects to.
If you have configured the endpoint URL in the General tab, and then
switch to the OPC UA Namespace tab, one of the following happens:
• If the server URL or Application URL is available, the Namespaces
are retrieved from the server and displayed in the table.
• If the server URL is unavailable or invalid, an empty Namespace
alias table is diaplayed.
When the OPC UA Server is running, if you want to view the
Namespace list in the Namespace alias table, you must checkout the
UA Client service instance and then click the Refresh button.
Tip: You can resize the rows in the Namespace alias table.
Index Displays the Namespace index for the Namespace URI present in the
OPC UA Server. The default Namespace is appended with * after the
Index.
The items configured in the default Namespace need not be subscribed
in the syntax using the alias or the Namespace name.
Alias Displays the alias name for the Namespace URI available in the OPC
UA Server.
You can change this name during configuration. The Alias box cannot be
blank. You can use the "_" and "#" special characters in the alias name.
You cannot create duplicate alias names.
Node Id Type Displays the Node Id type of the Namespace in the OPC UA Server.
Node Id type can be of String, or Integer data type. This information is
obtained from the OPC UA Server and cannot be edited. For more
information on overriding the Node Id, see "Editing the Namespace Alias
Table" on page 24.
Namespace URI Displays the Namespace URI imported from the OPC UA Server.
This information cannot be edited.
Note: The Update button is enabled only when you select a node. You
cannot delete a node that is already assigned to a service instance. To
delete such a node, you must first unassign the node from the service
instance.
2 In the Select a Service Configuration File dialog box, name the file
and then save it with .aaSCfg extension.
Chapter 3
ArchestrA UA Client
Run Time
Item Syntax
Item syntax is the standard format, by which you can use the OPC UA
items or diagnostic items, to obtain information from the OPC UA
Server.
You can use the UA Client syntax options defined in the following
table, based on your requirement:
Scenario Syntax
Scenario Syntax
Scenario Syntax
To access <domain>:UADiagnosticItemReference
diagnostic items
Or
• <domain>://UADiagnosticItemReference
Where:
• domain is the Scope Name defined in the UA Client Editor. This is
case insensitive. You can provide the Scope Name from the UA
Client Editor or the IDE Browser. For more information see "In the
Service Details area, under the Port Configuration area, do the
following:" on page 21, and "Browsing the UA Server Items in the
IDE Browser" on page 53.
• UADiagnosticItemReference is the identifier of the diagnostic item
in the diagnostic namespace.
For example: Topserver://$SYS$DIAG/global/MonitoredItemCount
To access <domain>:/UANamespaceAlias/UADiagnosticItemReference
diagnostic items
Or
using the
diagnostic <domain>:UANS(UANameSpaceAlias)UAItemRef(UADiagnosticItemRe
Namespace alias ference)
Where:
• domain is the Scope Name defined in the UA Client Editor. This is
case insensitive. You can provide the Scope Name from the UA
Client Editor or the IDE Browser. For more information see "In the
Service Details area, under the Port Configuration area, do the
following:" on page 21, and "Browsing the UA Server Items in the
IDE Browser" on page 53.
• UANS stands for UANamespace, and is a keyword.
• UANamespaceAlias is the Namespace alias name used to identify
the namespace in the OPC UA Server. This is configured on the UA
Client Editor. UANameSpaceAlias is replaced by the true
namespace URI in UA Client service, before it is sent to the server.
This is case insensitive. For more information on defining the
Namespace Aliases, see "Configuring the Namespace Aliases" on
page 22.
• UADiagnosticItemReference is the identifier of the diagnostic item
in the diagnostic namespace.
For example:
Topserver:UANS($SYS$DIAG)UAItemRef(global/MonitoredItemCount)
Read/
Item Name Type Write Description
StartDateTime DateTime Read Displays the Date and Time the service
was started (Time is in UTC).
Read/
Item Name Type Write Description
TotalReadErrors Integer 32 Read Displays the number of errors for the read
transaction in all the connections since
the service was started or last reset. (An
error is counted if one or more item read
transactions have failed, or the entire
read could not be executed.)
Read/
Item Name Type Write Description
IDataPort Integer 32 Read Displays the port number used for the
IData endpoint.
IBrowsePort Integer 32 Read Displays the port number used for the
IBrowse endpoint.
Note: If the ConnIndex does not exist, the value 0 is updated for an
item of type Integer/Float and a “” (blank) is updated for an item of
type string. The quality of these items stays as Good.
Read/
Item Name Type Write Description
Read/
Item Name Type Write Description
Read/
Item Name Type Write Description
Read/
Item Name Type Write Description
Read/
Item Name Type Write Description
Read/
Item Name Type Write Description
Read/
Item Name Type Write Description
Registering Items
To register the items with the OPC UA Server, the UA Client does the
following:
• The UA Client can first request to register an item. Later, the
Client adds the item to a subscription, using the
AddMonitoredItem() method, by passing the Connection Id and the
ItemId of the item to be added.
• The UA Client retrieves the Namespace Index using the
Namespace URI configured in the UA Client configuration file. The
UA Client removes the alias name from the item name, and forms
the Node Id using the other part of the item name. If the item
name does not contain the alias name of the Namespace URI, the
UA Client uses the first Namespace URI configured in the UA
Client configuration file.
• On every register items call, the UA Client prepares the Node Ids
based on the item names, and then calls the RegisterNodes() API
to register the Node Ids with the OPC UA Server. The
RegistNodes() method is a synchronous call, which returns the
Node Ids back to the UA Client (the size and order of returned list
matches the size and order of the input Node Id list).
Parameter Description
The result parameters for the RegisterNodes() API are defined in the
following table:
Parameter Description
Parameter Description
Symbolic Id Description
Managing Subscriptions
You can create or remove subscriptions for the items of a UA Client,
based on the availability of the OPC UA Server. The sequence of steps
in creating and deleting a subscription is given below:
To delete a subscription
Managing Items
The Item Manager in the UA Client manages the monitored items for
each subscription. The activites during an item management are
defined below:
Adding Items
1 Any ASB client requests the Item Manager to add items to the
subscription.
2 The UA Client provides the ConnectionId, the SubscriptionId and
the list of MonitoredItems.
3 The UA Client checks if the item to be added is registered
(contained in its map of registered items).
• If the item is not registered, the UA Client:
• First registers the items, and then
• Adds them into the subscriptions
• If the ASB client requests to add items when the server is
down, the UA Client:
• Internally caches the items to be added
• Adds the cached items to server when (it is available) the
connection is created successfully
4 The Subscription Manager passes this request to the Item
Manager of the corresponding subscription. The Item manager
does the following:
• Creates a unique list of monitored item cache pertaining to
a subscription.
• Returns the list of monitored items that can be added the
OPC UA Server.
Deleting Items
• If an ASB client requests to delete items when the server is down,
the UA Client checks if the items are:
• Added to Server: The UA Client caches the items to be deleted
and removes the items from the server when the connection is
created successfully.
• Internally cached for adding to server after the connection
is successful: The UA Client removes the items from the list of
items to be added to server.
Parameter Description
Note: This session is different from the session created by the Client
through IData. The session created through IData is used for run time
to subscribe the items, and can not be used for browsing.
In the IDE Brower, the left pane displays the objects, and the right
pane displays the attributes corresponding to the selected object.You
can browse the attributes related to Conn=0 and Sub=0.
You can also browse the global system items, and the UA Client
specific system items. You can view the following properties of an
attribute, of the Namespace, you have selected:
• Display Name
• Data Type
• Category
• Security Classification (Read Only or Read/Write)
Note: The Namespace list box contains the ASB services, which are
configured in UA Client Service instance.
6 Click OK.
Read Transaction
The IData Client can read value of one or more items by invoking the
read transaction. To read a transaction, the IData Client does the
following:
• The IData service successfully authenticates and authorizes the
verifying user, prior to actually performing the read transaction.
Otherwise, the read transaction is not performed and an
appropriate error is returned to the IData Client.
• The UA Client calls the Read() method to perform a single
on-demand read of one or more data item values. This transaction
is performed in the security context of the session user.
• Every item passed must be registered before performing the read
operation. If an item is passed by its Name identity and is not
registered, the Read() method registers the item first and then
reads the value.
• If an item is passed by its Id identity, which is not registered, the
value is not read for that item. An ArchestrA Error code is
displayed to its corresponding status array.
For the data types supported for the read transaction, see .
• For the constructed attribute values with indexed elements, such
as an array, the UA Client allows an ASB client to read the
following:
• Entire set of indexed values as a composite
• Individual elements, or
• Ranges of elements of the composite
Parameters for reading a transaction
The input parameters for the Read() API are given below:
Parameter Description
The results that the ASB client receives are given below:
Parameter Description
• The expected status code in case of error are given below: (Refer to
OPC UA Part 4 - Services 1.01 Specification for more information)
• Bad_NodeIdInvalid
• Bad_NodeIdUnknown
• Bad_AttributeIdInvalid
• Bad_IndexRangeInvalid
• Bad_IndexRangeNoData
• Bad_DataEncodingInvalid
• Bad_DataEncodingUnsupported
• Bad_NotReadable
• Bad_UserAccessDenied
Write Transaction
An ASB client can write a value to one or more items by invoking the
write transaction. The write transaction is synchronous, and the ASB
client is expected to receive a response in containing the results of the
write transaction.
Input parameters for the Write() API are given below:
Parameter Description
The results that the ASB client receives in the call back are given
below:
Parameter Description
Unregistering Items
The ASB client can request to unregister an item in the UA Client by
passing its Id or Name and Connection Id.
Parameter Description
Parameter Description
The result parameter for the UnregisterNodes() API are given below:
Parameter Description
The input parameters for the UnregisterNodes() API are given below:
Parameter Description
The result parameter for the UnregisterNodes() API are given below:
Parameter Description
Parameter Description
Chapter 4
Generating a Self-Signed
OPC UA Compliant Certificate and Key Pair
To install self-signed OPC UA compliant certificate/key pair
1 Download "OPC UA SDK 1.01 Test Applications Setup [331.0
Stable]" from OPC UA Foundation.
You can download the package from the OPC UA Foundation web
site, at: http://www.opcfoundation.org/
Creating a Self-Signed
OPC UA Compliant Certificate and Key Pair
To create self-signed OPC UA compliant certificate/key pair
1 Start the UA Configuration Utility by clicking the Start button on
the Windows task bar and pointing to Programs. Point to the OPC
Foundation folder that contains the UA Configuration Utility, click
UA, and then click on UA Configuration Tool.
Note: You can use the default server in Application To Manage box.
4 Click OK. The certificate and the private key files are generated
under “certs” and “private” subdirectories in the
C:\Tmp\TestUACert directory.
Note: To rename the certificate file, and the private key files, do the
following:
In C:\Tmp\TestUACert\certs directory, rename the certificate file as
aaUAClient.der.
In C:\Tmp\TestUACert\private directory, rename the private key file as
aaUAClient.pfx.
Appendix A
Mapping OPC UA
Run Time Data
IDATA Client
Appendix B
ArchestrA Services
Core Services
The following are the ArchestrA core services included in the
ArchestrA SOA framework:
• Watchdog Service: The Watchdog service is a Windows service
running on a computer, and starts automatically with Windows.
The Watchdog Service starts, monitors, and manages other core
services based on its configuration. As shown in the following
diagram, the Watchdog service controls the other core services:
Watchdog Services
User-Defined Services
You can build a service to perform a specific operation. The following
diagram illustrates the user-defined services within the ArchestrA
SOA framework.
Glossary
Basic 256 security Security policy deals with configurations that require medium to high
policy security.
Basic 128 RSA 15 Security policy deals with configurations that require medium
security policy security.
CA Certificate Authority.
Check out IDE operation for the purpose of editing an object. It makes the item
unavailable for other users to check out.
Standard UA Client A software application that sends messages to OPC UA servers
conforming to the services specified in this set of specifications.
Deployment The operation which instantiates an AutomationObject Instance in the
ArchestrA run time. This action involves installing all the necessary
software and instantiating the object on the target platform with the
object’s default attribute data from the Galaxy Repository.
Digital certificate Digital certificate is a means of authenticating the communication
between a client and a server in a network. The client and the server
exchange their digital certificates to establish a secure communication.
Each digital certificate comprises of a key pair.
Reference A string that refers to an object or to data within one of its attributes.
Session The time period during which exchange of information takes place
between two or more communication devices, or between
communication devices and users.
Subscription Subscription describes that the items in client are updated when the
value is changed in a data source.
SOA Service Oriented Architecture.
Index
A attribute
About properties 53
Classic OPC 10
OPC UA 10 C
OPC UA connectivity 12 code module package 81
OPC UA connectivity capabilities 12 comparing
ArchestrA Core Services OPC UA and Classic OPC 11
Configuration Service 81 configuration file 28, 46, 49
Content Provider Service 81 configuring
Deploy Agent Service 81 UA Client Service 18
Global Discovery Service 80 connecting
Local Discovery Service 80 UA Client to OPC UA Server 45
Service Host Service 80 conversion rules
Service Manager Service 81 Writing a value 75
Software Update Service 81
System Authentication Service 81 D
Watchdog Service 80 deploying
ArchestrA data types the UA Client instance 27, 28
mapping 73 Diagnostic Items 35
ArchestrA Framework 12 Connection Diagnostic Items 35, 39
ArchestrA IDE 16, 56 Global Diagnostic Items 35, 36
ArchestrA OPC UA Services Subscription Diagnostic Items 35, 42
about 9 UA Client Diagnostic Items 35, 43
ArchestrA SOA framework 13 Digital Certificates
ASB client 50, 51, 59, 63 managing 65
G understanding 11
Galaxy 28, 29, 30, 54, 72, 82 OPC UA data types 73
ASB Galaxy database 28 OPC UA Standard
understanding 9
I
IData 31 R
IData Client 59, 75 RegisterNodes()
IData Service 31, 59 input parameters 46
IDE Browser 54 result parameters 46
browsing items 53
instance parameters S
configuring 18 self-signed OPC UA compliant certificate
auto-assigning port numbers 22 creating 69
user credentials 21 generating 66
modifying 25 using 72
Item Syntax 31 subscribing items
Diagnostic Items 35 InTouch HMI 58
OPC UA Items 31 Object Viewer 55
items subscriptions 48
adding 51 creating 48, 49
deleting 51 deleting 50
managing 51 managing 48
parameters for monitoring 52 parameters 49
registering 46
unregistering 61 T
transactions
K Read 59
key pair 69 Write 60
creating 69
generating 66 U
using 72 UA Client
Run time 31
M UA Client Service
mapping configuring 15
OPCUAQuality to the MxQuality 76 exposing 45
MxQuality 76 instance 16
instance parameters 25
N UA Client Service configuration 28
Namespace Alias 22 exporting 29
configuring 22 Importing 30
Namespace alias table 23 UA Client Service instance
editing 24 auto-deploying 28
creating 16
O deploying 27
OPC UA and Classic OPC deploying manually 27
about 10 UA Server Items 52
OPC UA connectivity browsing 52
in ArchestrA Framework 12 browsing in IDE Browser 53, 54