90
3/8/14 Wonderware ArchestrA OPC UA Client Service Guide

ArchestrA OPC UA Client Service Guide - Wonderware · PDF fileUnderstanding the OPC UA Connectivity ... This guide describes the ArchestrA OPC Unified Architecture (OPC UA) Client

  • Upload
    ngonhu

  • View
    805

  • Download
    56

Embed Size (px)

Citation preview

3/8/14

WonderwareArchestrA OPC UA Client Service Guide

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.

© 2014 by Invensys Systems, Inc. All rights reserved.

Invensys Systems, Inc.26561 Rancho Parkway SouthLake Forest, CA 92630 U.S.A.(949) 727-3200

http://www.wonderware.com

For comments or suggestions about the product documentation, send an e-mail message to [email protected].

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

ArchestrA OPC UA Client Service Guide

Contents

Welcome ....................................................7Documentation Conventions ........................................................... 7Technical Support ............................................................................ 8

Chapter 1 About the ArchestrA OPC UA Service...............9Understanding the OPC UA Standard ........................................... 9

About Classic OPC and OPC UA ................................................ 10Classic OPC ............................................................................. 10OPC UA ................................................................................... 10

Comparing OPC UA with Classic OPC ...................................... 11Understanding the OPC UA Connectivity ................................. 11

About OPC UA Connectivity Capabilities ............................. 12About OPC UA Connectivity in

the ArchestrA Framework .................................................... 12Defining the UA Client ........................................................... 13About the ArchestrA SOA Framework .................................. 13

Chapter 2 Configuring the ArchestrA UA Client Service........................ 15

Creating a UA Client Service Instance ......................................... 16Configuring the UA Client Service ............................................... 18

Configuring the UA Client Service Instance Parameters ......... 18Configuring the Namespace Aliases .......................................... 22

Editing the Namespace Alias Table ....................................... 24Modifying the Instance Parameters of

the UA Client Service Configuration ..................................... 25

4 Contents

ArchestrA OPC UA Client Service Guide

Assigning the UA Client Service to a Node .................................. 26Deploying the UA Client Service Instance ................................... 27

Manually Deploying the UA Client Service Instance ............... 27Auto-deploying the UA Client Service Instance ........................ 28

Exporting and Importing UA Client Service Configuration ........ 28Exporting UA Client Service Configuration .............................. 29Importing UA Client Service Configuration .............................. 30

Chapter 3 ArchestrA UA Client Run Time................................................. 31

Item Syntax .................................................................................... 31Syntax of OPC UA Items ............................................................ 31Syntax of Diagnostic Items ......................................................... 35

Global Diagnostic Items .......................................................... 36Connection Diagnostic Items .................................................. 39Subscription Diagnostic Items ............................................... 42UA Client Diagnostic Items .................................................... 43

Exposing the UA Client Service .................................................... 45Connecting the UA Client to the OPC UA Server ........................ 45

Registering Items ........................................................................ 46Managing Subscriptions ............................................................. 48

Creating and Deleting a Subscription .................................... 48Managing Items ...................................................................... 51Browsing UA Server Items ..................................................... 52Subscribing Items in Object Viewer ....................................... 55Subscribing Items in InTouch HMI ....................................... 58

Read Transaction ........................................................................ 59Write Transaction ....................................................................... 60Unregistering Items .................................................................... 61

Value, Timestamp, and Quality (VTQ) Data ................................ 63

Chapter 4 Managing Digital Certificates........................ 65Generating a Self-Signed

OPC UA Compliant Certificate and Key Pair ........................... 66Creating a Self-Signed

OPC UA Compliant Certificate and Key Pair ........................... 69Using the Self-Signed

OPC UA Compliant Certificate and Key Pair ........................... 72

5

ArchestrA OPC UA Client Service Guide

Appendix A Mapping OPC UA Run Time Data ......................................... 73

Mapping OPC UA Data Types to ArchestrA Data Types ............ 73Conversion Rules for Writing a Value .......................................... 75Mapping OPCUAQuality to MxQuality ........................................ 76

Appendix B ArchestrA Services..................................... 79Core Services .................................................................................. 80User-Defined Services .................................................................... 82

Glossary................................................... 83

Index....................................................... 87

6 Contents

ArchestrA OPC UA Client Service Guide

7

ArchestrA OPC UA Client Service Guide

Welcome

This guide describes the ArchestrA OPC Unified Architecture (OPC UA) Client Service within the ArchestrA Service Bus (ASB) Service-Oriented Architecture (SOA). It is a guide to configuring and providing data connectivity through the ArchestrA OPC UA Client Service, also called the UA Client.

Documentation ConventionsThis documentation uses the following conventions:

Convention Used for

Initial Capitals Paths and file names.

Bold Menus, commands, dialog box names, and dialog box options.

Monospace Code samples and display text.

8 Welcome

ArchestrA OPC UA Client Service Guide

Technical SupportWonderware 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.

9

ArchestrA OPC UA Client Service Guide

Chapter 1

About the ArchestrA OPC UAService

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.

Understanding the OPC UA StandardOPC UA defines a common infrastructure model to facilitate the exchange of data between OPC UA-supported systems and devices, using OPC UA-defined and vendor-defined data types. The ArchestrA OPC UA Service uses OPC UA to exchange data. For more information on the ArchestrA Services, see "About the ArchestrA SOA Framework" on page 13.

10 Chapter 1 About the ArchestrA OPC UA Service

ArchestrA OPC UA Client Service Guide

About Classic OPC and OPC UAOPC UA is a parallel standard to the classic OPC standard. It does not replace the classic OPC standard, but complements it by addressing its limitations.

Classic OPCOPC 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 UAOPC 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.

Understanding the OPC UA Standard11

ArchestrA OPC UA Client Service Guide

Comparing OPC UA with Classic OPCOPC UA differs significantly from its predecessor, OPC. The table below explains the key differences between classic OPC and OPC UA.

For more information on OPC UA, see http://www.opcfoundation.org.

Understanding the OPC UA ConnectivityOPC UA provides connectivity to a variety of servers, clients, and devices across various operating systems to exchange data. It connects to third-party data sources.

An OPC UA Server is a discoverable software resource with a well-defined service description. Any OPC UA Client can search, bind, and connect to the OPC UA Server service. The Service Oriented Architecture (SOA) is a set of patterns for creating loosely-coupled services that provide flexibility and responsiveness for software components to leverage the functionalities of one another.

Classic OPC OPC UA

Uses the COM/DCOM technology of Microsoft to communicate. It does not have configurable time-outs. It depends on the DCOM time-out, which is configured in the system.

Uses a services architecture to export data, which improves the ease of communication and connectivity.

Is dependent on Windows operating systems.

Is platform independent and can connect to a wide variety of devices and platforms.

Has limited security. Has built-in security.

No built-in capabilities to handle problems, such as lost messages.

Has built-in capabilities to handle problems, such as lost messages.

12 Chapter 1 About the ArchestrA OPC UA Service

ArchestrA OPC UA Client Service Guide

About OPC UA Connectivity CapabilitiesOPC UA connects to data sources at every level of the industrial automation hierarchy. It connects to controllers, sensors, HMI products, manufacturing systems, and planning systems. The diagram below illustrates the levels to which OPC UA servers and clients can connect.

About OPC UA Connectivity in the ArchestrA Framework

The ArchestrA framework hosts and manages the ArchestrA core services, and other user defined services including the OPC UA Client service. This framework enables the UA clients to access the standard OPC UA servers, to exchange data.

For example, Wonderware HMI products can connect to the standard OPC UA servers through the UA Client to exchange data.

Understanding the OPC UA Standard13

ArchestrA OPC UA Client Service Guide

Defining the UA ClientIn the ArchestrA SOA framework, the OPC UA connectivity is provided by the following set of loosely-coupled applications:

• ArchestrA UA Client

• Third-party external OPC UA Server

For more information on ArchestrA SOA framework, see "About the ArchestrA SOA Framework" on page 13.

The UA Client service connectivity can be used for:

• Allowing the Wonderware Application Server (Application Server) to exchange data with third-party OPC UA servers.

• Using the OPC Foundation software that has been branded as the .NET Stack for the OPC Unified Architecture .NET deliverables.

About the ArchestrA SOA FrameworkThe ArchestrA SOA framework, also known as the ArchestrA Service Bus (ASB), consists of ArchestrA core services and user defined services. ArchestrA core services are the building blocks of ArchestrA SOA framework. This framework manages the user services. The ASB is a standard for information exchange unique to Invensys products. ArchestrA Services are the building blocks of the ASB. For more information on the ArchestrA services, see "ArchestrA Services" on page 79.

14 Chapter 1 About the ArchestrA OPC UA Service

ArchestrA OPC UA Client Service Guide

15

ArchestrA OPC UA Client Service Guide

Chapter 2

Configuring theArchestrA UA Client Service

This chapter provides conceptual and workflow information about configuring and deploying the UA Client, and exchanging UA Client configuration information to and from the ASB Service repository. The UA Client workflow is as follows:

1 Creating an instance of the UA Client in the UA Client Editor, via the ArchestrA IDE. For more information, see "Creating a UA Client Service Instance" on page 16.

2 Configuring the UA Client, which includes modifying the instance parameters on the UA Client service. For more information, see "Modifying the Instance Parameters of the UA Client Service Configuration" on page 25.

3 Assigning the UA Client to one or more nodes. For more information, see "Assigning the UA Client Service to a Node" on page 26.

4 Deploying the UA Client, either manually or automatically using the auto-deploy feature. For more information, see "Deploying the UA Client Service Instance" on page 27.

The following diagram illustrates the UA Client workflow:

Creating UA Client instance Configuring UA Client Assigning UA Client Deploying UA Client

16 Chapter 2 Configuring the ArchestrA UA Client Service

ArchestrA OPC UA Client Service Guide

You must create and configure the UA Client to establish communication with a standard OPC UA Server, and then assign and deploy the UA Client instance.

You can create one or more instances of the UA Client to establish a connection with any OPC UA Server. In this chapter, the Configuration tool from within the ArchestrA IDE is used to connect to an OPC UA Server.

Creating a UA Client Service InstanceYou must create an instance of the UA Client in the ArchestrA IDE and then configure the UA Client.

To create an instance of the UA Client

1 Start the ArchestrA IDE.

2 On the Galaxy menu, click Configure, and then click ArchestrA Services. The Configure ArchestrA Services window appears.

3 In the Services tab, expand the Galaxy tree structure to view the list of installed services and their instances.

Creating a UA Client Service Instance17

ArchestrA OPC UA Client Service Guide

4 Right-click ASBOPCUAClientService, and then click Create. You can also click ASBOPCUAClientService, and then press CTRL+N. The new instance appears in the tree structure.

18 Chapter 2 Configuring the ArchestrA UA Client Service

ArchestrA OPC UA Client Service Guide

Configuring the UA Client ServiceAfter you have created the instance of the UA Client, you can configure its parameters in the General tab.

Configuring the UA Client Service Instance Parameters

To configure or modify the UA Client instance parameters

1 Right-click the UA Client configuration instance name, and click Check-out.

Note: Click the Refresh button to view configuration information previously stored in the database.

Configuring the UA Client Service19

ArchestrA OPC UA Client Service Guide

2 Configure or modify the instance parameters in the General tab as follows:

a In Scope Name box, type the name of the OPC UA Server. The maximum length of the scope name is 32 characters. You can use alphanumeric characters, however, the initial character must be an alphabet. The only valid special character is the underscore (_). This field is case insensitive. If you enter invalid characters, the background of the Scope Name box is highlighted in red as shown below:

b In the OPC UA Server Details area, do the following:

• In the OPC UA Server Node box, type the computer name (Node name) or the IP address of the OPC UA Server. The endpoint URL(s) of that Node or Server is automatically displayed in the Endpoint URL box. If you do not have the Node name information, you can manually enter the OPC UA Server endpoint.

Note: You can also click the Browse button to browse, and then select the computer name or IP address of the OPC UA Server.

• In the Endpoint URL box, type the OPC UA Server endpoint, if you have not already entered the details of the OPC UA Server in the Discovery Server Node box.You can also select an endpoint URL from the Endpoint URL drop-down, if the Node selected in the OPC UA Node box has more than one endpoint URLs.

Note: Click the Refresh button to refresh the endpoint list, if you want to view the list of the latest sever endpoint URIs.

• In the Application URI box, type the name of the OPC UA Server. This is an optional field and is required only if you have not provided the endpoint URL.

20 Chapter 2 Configuring the ArchestrA UA Client Service

ArchestrA OPC UA Client Service Guide

• Select the Security Message Mode. This field is set to None by default.The description of each mode is given in the below table:

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.

• Select the Security Policy. This field is set to None by default. The description of each mode is given in the below table:

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.

Option Description

None Indicates that no security is applied.

Sign and Encrypt Indicates that all messages are signed and encrypted.

Sign Indicates that all messages are signed but not encrypted.

Option Description

None Indicates that no security is applied.

Basic 256 Indicates that Basic 256 security policy is applied.

Basic128Rsa15 Indicates that Basic128Rsa15 security policy is applied.

Configuring the UA Client Service21

ArchestrA OPC UA Client Service Guide

c In the User Credentials area, do the following:

• Select the Anonymous User check box to allow login without the user credentials. This field is selected by default.

Or,

• Clear the Anonymous User check box, type a user name and a password in the User Name box and the Password box respectively.

• User Credentials: You can create a secure connection with the OPC UA Server depending on how the server accepts the connection.

For example, if a UA Client wants to connect to an OPC UA Server that does not support anonymous connections, the UA client must provide a valid User Name and Password.

d In the Service Details area, under the Port Configuration area, do the following:

• Select the Auto-assign port numbers check box. When the service is deployed, the port numbers are auto selected for the IData and the IBrowse endpoint configuration.

By default, the Auto-assign port numbers check box is selected; the IData Port box and the IBrowse Port box are disabled.

Or,

• Clear the Auto-assign port numbers check box, and then type port numbers of the IData and IBrowse service providers in IData Port box and IBrowse Port box respectively.

22 Chapter 2 Configuring the ArchestrA UA Client Service

ArchestrA OPC UA Client Service Guide

• Auto-assigning port numbers: You can automatically assign port numbers to the IData and IBrowse service providers, whenever you create an UA Client instance. The ArchestrA framework identifies the ports that are not used by other services, and then assigns those ports to the UA Client. These ports are in the range 10000 to 15000.

3 Right-click the instance, and then click Save And Check-in.

Configuring the Namespace AliasesThe OPC UA Namespaces are defined and exposed by the OPC UA Servers. Each namespace is identified by an Id. For more information, see "Item Syntax" on page 31. You can define an alias name for a namespace, based on the following:

• The alias name must be defined and exposed by the OPC UA Servers.

• The alias name must be identified with a Namespace Id data structure.

• The alias name must be in accordance with the ArchestrA naming constraint.

• The alias name must be in string format, such that it works well in the ArchestrA IData namespace.

• There is at most one alias for each namespace.

• The same alias name is not given to two UA Clients.

• The alias name must not conflict with any other namespace display name.

Configuring the UA Client Service23

ArchestrA OPC UA Client Service Guide

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.

24 Chapter 2 Configuring the ArchestrA UA Client Service

ArchestrA OPC UA Client Service Guide

The OPC UA Namespace tab displays information retrieved from the OPC UA Server, as shown below:

Editing the Namespace Alias TableYou can use the Context menu in the Namespace Alias table to do the following:

• Edit the default namespace,

• Edit the alias names, and

• Override the Node Id type

To edit the Namespace

1 Right-click on Namespace URI you want to set as default, and then select Set as Default Namespace. The Index is appended with a * to indicate the default Namespace URI.

2 In the Alias box of the selected Namespace, type an alias name for the Namespace URI.

Column Name Description

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.

Configuring the UA Client Service25

ArchestrA OPC UA Client Service Guide

3 Right-click on Node Id Type you want to edit, and then select Override Node Id type as String or Override Node Id type as Integer. The data type of that Node Id is changed accordingly.

4 Right-click the instance, and then click Save And Check-in.

Modifying the Instance Parameters of the UA Client Service Configuration

After you have created the instance of the UA Client, you can configure modify its parameters in the General tab. For information on modifying the UA Client service instance parameters, see "Configuring the UA Client Service Instance Parameters" on page 18. For information on modifying the Namespace alias table, see "Editing the Namespace Alias Table" on page 24.

26 Chapter 2 Configuring the ArchestrA UA Client Service

ArchestrA OPC UA Client Service Guide

Assigning the UA Client Service to a NodeYou must assign a node to the UA Client service configuration instance before deploying it.

To assign the UA Client Service Instance

1 Select the configuration instance that you want to assign. The available nodes appear in the Assignments area on the right pane.

2 In the Assignments area, select the node you want to assign to the configuration instance, and then click Update. A message appears in the status bar, indicating whether the node is assigned or not.

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.

Deploying the UA Client Service Instance27

ArchestrA OPC UA Client Service Guide

Deploying the UA Client Service InstanceAfter configuring the UA Client service instance, you can deploy it. You can deploy the UA Client either manually or automatically with the Application Server Platform Object.

Manually Deploying the UA Client Service Instance

To manually deploy the UA Client Service instance

1 Select the configuration instance that you want to deploy. The configured instance parameters and the available nodes appear on the right pane.

2 Assign the UA Client service to a node. For more information, see "Assigning the UA Client Service to a Node" on page 26.

3 On the left pane, right-click the instance, and then click Deploy. A message appears in the status bar, indicating whether the configuration instance has been successfully deployed or not. If deployment is unsuccessful, you can refer to the Invensys logger.

28 Chapter 2 Configuring the ArchestrA UA Client Service

ArchestrA OPC UA Client Service Guide

Note: When you assign a UA Client service instance on a remote node, and then deploy the instance, it is deployed on the remote node.

Auto-deploying the UA Client Service InstanceThe UA Client instance can be automatically deployed with the Application Server Platform Object. The ASB services, which are assigned to a specific node and, configured in the Galaxy are automatically:

• Deployed, when that Galaxy is deployed

• Shut down, when the platform object is undeployed

• Shut down and restarted, when the platform object is redeployed

To auto-deploy the UA Client Service instance

• Right-click on the Application Server Platform Object, and then click Deploy.

Exporting and Importing UA Client Service Configuration

You can minimize the configuration errors when creating a duplicate UA Client service configuration, by importing the deployable UA Client service configuration. You can save the configuration as a backup file and can use it, for example, if the ASB Galaxy database is under maintenance. The configuration file is a .aaSCfg file, which you can import from one Galaxy to the other. The exported configuration file contains information of the UA Client instance parameters, the Namespace aliases, except the Node details.

Exporting and Importing UA Client Service Configuration29

ArchestrA OPC UA Client Service Guide

Exporting UA Client Service ConfigurationYou can export the UA Client service configuration to another Galaxy.

To export UA Client Services

1 Right-click on a configured OPC UA Client service instance, and then click Export.

2 In the Select a Service Configuration File dialog box, name the file and then save it with .aaSCfg extension.

30 Chapter 2 Configuring the ArchestrA UA Client Service

ArchestrA OPC UA Client Service Guide

Importing UA Client Service ConfigurationYou can import the UA Client Service configuration to another Galaxy.

To import UA Client Services

1 Right-click on the Galaxy menu, and then click Import.

2 In the Select a Service Configuration File dialog box, browse the .aaSCfg file.

3 Click Open. A new UA Client service instance is created with the imported parameters.

31

ArchestrA OPC UA Client Service Guide

Chapter 3

ArchestrA UA ClientRun Time

Item SyntaxItem 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.

Syntax of OPC UA ItemsThis section describes various options for using the UA Client syntax.

The IData services are deployable services that implement the IData interface. These services interact with a variety of data sources, while exposing the data sources within the framework of an IData standard protocol. So, in order to provide a regular experience, a common item name syntax was agreed upon across all the IData providers.

32 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

You can use the UA Client syntax options defined in the following table, based on your requirement:

Scenario Syntax

To access the data for items in the default Namespace

<domain>:UAItemReference

Or

<domain>://UAItemReference

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.

• UAItemReference is the identifier of the item (the complete path of the OPCUA Server item, follwed by the NodeId) in the OPC UA Server. UAItemReference is resolved by the OPC UA Server, and the case is preserved. This is case sensitive.

For example: Topserver:PLCport.PlCobject.N40:0

To access the data for items with the complete Namespace URI

<domain>:UANS(UANamespaceURI)UAItemRef(UAItemReference)

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.

• UANamespaceURI is the true namespace URI in OPC UA Server. This is case sensitive.

• UAItemRef stands for UAItemReference, and is a keyword.

• UAItemReference is the identifier of the item (the complete path of the OPCUA Server item, follwed by the NodeId) in the OPC UA Server. UAItemReference is resolved by the OPC UA Server, and the case is preserved. This is case sensitive.

For example: Sampleserver:UANS(http://test.org/UA/Data/)UAItemRef(10847)

Item Syntax33

ArchestrA OPC UA Client Service Guide

To access the data for items with the Namespace alias

<domain>:/UANamespaceAlias/UAItemReference

Or

<domain>:UANS(UANameSpaceAlias)UAItemRef(UAItemReference)

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.

• UAItemRef stands for UAItemReference, and is a keyword.

• UAItemReference is the identifier of the item (the complete path of the OPCUA Server item, follwed by the NodeId) in the OPC UA Server. UAItemReference is resolved by the OPC UA Server, and the case is preserved. This is case sensitive.

For example: Sampleserver:UANS(Data)UAItemRef(10847)

Scenario Syntax

34 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

To access diagnostic items

<domain>:UADiagnosticItemReference

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 diagnostic items using the diagnostic Namespace alias

<domain>:/UANamespaceAlias/UADiagnosticItemReference

Or

<domain>:UANS(UANameSpaceAlias)UAItemRef(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.

• 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)

Scenario Syntax

Item Syntax35

ArchestrA OPC UA Client Service Guide

Syntax of Diagnostic ItemsThe system items are used to monitor the run time status of the items of a service. These items provide the internal status of the UA Client service. For example, you can know the number of clients (Object Viewer, ArchestrA IDE Browser, InTouch HMI, and so on.) connected to the UA Client service.

Each system item, described below, provides the specific status of a service. You must subscribe for these items, or register the items and then call the read method, to view the status.

The diagnostic items are contained in a special namespace, which is named as $SYS$DIAG. The following illustrates the full path to a diagnostic item:

<domain>:/$SYS$DIAG/<Object Path>/<Item>

where:

• domain is substituted with the name of a deployed and a running scope name.

• $SYS$DIAG is a special namespace containing diagnostic items in the service.

• Object Path is substituted with a one or more object qualifiers, separated by ‘/’.

• Item is substituted with the name of a specific diagnostic item.

The following are the types of diagnostic system items:

• Global diagnostic items

• Connection diagnostic items

• Subscription diagnostic items

• UA Client diagnostic items

36 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

Global Diagnostic ItemsThe global diagnostic items provide the service level information of all the client connections. For example, if there are 3 connections to the IData interface and 2 connections to the IBrowse interface, the value of the ConnectionCount global diagnostic item is 5. This means, there are 5 connections at the service level. You can use the following syntax to access a global diagnostic item:

<domain>:/$SYS$DIAG/Global/<Item>

where:

• Global represents that the item is a global item.

• Item is one of the diagnostic item names from the following table:

Item Name TypeRead/ Write Description

SolutionName String Read Displays the name of the solution on which this service is running.

NodeName String Read Displays the name of the node on which this service is running.

InstanceName String Read Displays the name of this service instance.

ServiceVersion String Read Displays the software version of the service.

IDataVersion String Read Displays the URI of the IData interface namespace.

IBrowseVersion String Read Displays the URI of the IBrowse interface namespace.

ServiceName String Read Displays the Scope Name, which is registered to Discovery Service.

StartDateTime DateTime Read Displays the Date and Time the service was started (Time is in UTC).

UpTime Integer 32 Read Displays the elapsed time, in seconds, since the service was started.

ConnectionCount Integer 32 Read Displays the number of incoming ASB client connections.

ItemCount Integer 32 Read Displays the number of registered items in all the connections.

Item Syntax37

ArchestrA OPC UA Client Service Guide

SubscriptionCount Integer 32 Read Displays the number of subscriptions in all the connections.

MonitoredItemCount Integer 32 Read Displays the number of monitored items in all the subscriptions/connections.

MonitoredItemErrCount Integer 32 Read Displays the number of items with bad quality in all the subscriptions/connections.

TotalReads Integer 32 Read Displays the number of read transactions in all the connections since the service was started or last reset.

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

TotalItemReads Integer 32 Read Displays the number of read items in all the connections since the service was started or last reset. (Does not include the subscription updates or items in the diagnostic namespace.)

TotalItemReadErrors Integer 32 Read Displays the number of read item errors in all the connections since the service was started or last reset. (Does not include the subscription updates or items in the diagnostic namespace.)

TotalWrites Integer 32 Read Displays the number of write transactions in all the connections since the service was started or last reset.

TotalWriteErrors Integer 32 Read Displays the number of write transaction errors in all the connections since the service was started or last reset. (An error is counted if one or more item writes have failed, or the entire write could not be executed.)

TotalItemWrites Integer 32 Read Displays the number of write items in all the connections since the service was started or last reset. (It does not include the items from the diagnostic namespace.)

Item Name TypeRead/ Write Description

38 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

Note: If you want to configure security for writing a value to an item, such as ResetTotals, you must use an ArchestrA attribute and bind it to a UA Client Item.

TotalItemWriteErrors Integer 32 Read Displays the number of write item errors in all the connections since the service was started or last reset. (It does not include the items from the diagnostic namespace.)

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.

ConnectionEvents Integer 32 Read Displays the number of connections added or deleted since the service started. This counter changes to 0 after the value reaches Int32_Max.

MaxConnectionIndex Integer 32 Read Displays the maximum connection index number, within all the available connections. The value of this index is in the range 0 to n. A value of -1 indicates that there are no connections. (For example, if the value is 10, then 0 to 10 inclusive can be used in the system item syntax “conn=x” or “conn=x:y” where x it the connection index)

ResetTotals Boolean Read/Write

Resets the following diagnostic items:

• TotalReads

• TotalWrites

• TotalItemReads

• TotalItemWrites

• TotalReadErrors

• TotalItemReadErrors

• TotalWriteErrors

• TotalItemWriteErrors

Item Name TypeRead/ Write Description

Item Syntax39

ArchestrA OPC UA Client Service Guide

Connection Diagnostic ItemsThe connection diagnostic items provide the information of a specific connection in the ASB. You can use the following syntax to access a connection diagnostic item:

<domain>:/$SYS$DIAG/Conn=<ConnIndex>/<Item>

where:

• Conn represents that the item is a connection item.

• ConnIndex is a connection index in the range of 0 to n.

• Item is one of the diagnostic item names from the following table:

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.

Item Name TypeRead/ Write Description

ItemCount Integer 32 Read The number of registered items in this connection.

SubscriptionCount Integer 32 Read The number of subscriptions in this connection.

MonitoredItemCount Integer 32 Read The number of monitored items in this subscription Id or Group.

MonitoredItemErrCount Integer 32 Read The number of monitored items with bad quality in this subscription Id or Group.

TotalReads Integer 32 Read The number of read transactions in this connection since the connection was started or last reset.

TotalReadErrors Integer 32 Read Displays the number of read transaction errors in this connection since service was started or last reset. (An error is counted if one or more item reads have failed, or the entire read could not be executed.)

TotalItemReads Integer 32 Read Displays the number of read items in this connection since the connection was started or last reset. (This does not include the subscription updates or items in the diagnostic namespace.)

40 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

TotalItemReadErrors Integer 32 Read Displays the number of read item errors in this connection since the service was started or last reset. (Does not include the subscription updates or items in the diagnostic namespace.)

TotalWrites Integer 32 Read Displays the number of write transactions in this connection since the connection was started or last reset.

TotalWriteErrors Integer 32 Read Displays the number of write transaction errors in this connection since the service was started or last reset. (An error is counted if one or more item writes have failed, or the write operation could not be executed.)

TotalItemWrites Integer 32 Read Displays the number of items written in this connection since the connection was started or last reset. (This does not include the items from the diagnostic namespace.)

TotalItemWriteErrors Integer 32 Read Displays the number of write item errors in this connection since the service was started or last reset. (This does not include items from the diagnostic namespace.)

SubscriptionEvents Integer 32 Read Displays the number of subscription add or delete operations since the service was started. This counter changes to 0 after the value reaches Int32_Max.

Item Name TypeRead/ Write Description

Item Syntax41

ArchestrA OPC UA Client Service Guide

MaxSubscriptionIndex Integer 32 Read Displays the maximum subscription index number within all the connections that currently created. The value of this index is in the range 0 to n. A value of -1 indicates that there are no subscriptions currently. (i.e. if value is 10, then 0 to 10 inclusive can be used in the system item syntax “conn=x:y” where y is the subscription index).

ResetTotals Boolean Read/Write

Resets the following diagnostic items:

• Reset TotalReads

• TotalWrites

• TotalItemReads

• TotalItemWrites

• TotalReadErrors

• TotalItemReadErrors

• TotalWriteErrors

• TotalItemWriteErrors

Item Name TypeRead/ Write Description

42 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

Subscription Diagnostic ItemsThe subscription item contains diagnostic information for a specific subscription. You can use the following syntax to access a subscription diagnostic item:

<domain>:/$SYS$DIAG/Conn=<ConnIndex>:<SubIndex>/<Item>

where:

• ConnIndex is a connection index in the range 0 to n.

• SubIndex is a subscription index in the range of 0 to n.

• Item is one of the diagnostic item names from the following table:

Note: If the ConnIndex or SubIndex 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.

Item Name TypeRead/ Write Description

Enabled Boolean Read Displays the monitored item that is published when Enabled is True.

PublishInterval Integer 64 Read Displays the rate at which the monitored items are published for this subscription, in milliseconds

TotalPublishes Integer 32 Read Displays the total number of publishes since the subscription was created.

TotalUpdates Integer 32 Read Displays the total number of values published since subscription was created.

ActiveItemCount Integer 32 Read Displays the number of active items in this subscription.

LastPublishDuration Integer 32 Read Displays the duration of the last publish in this subscription, in milliseconds.

For example, if the value of MaxNotificationPerPublish is 2000, it calls the Publish() method for 5 times to update 9000 values. In this case, the value LastPublishDuration is the total duration for updating 9000 items after which, the PublishComplete code is returned to the UA Client.

Item Syntax43

ArchestrA OPC UA Client Service Guide

UA Client Diagnostic ItemsThe UA Client object contains diagnostic items for the entire service. You can use the following syntax to access a global diagnostic item:

<domain>:/$SYS$DIAG/UAClient/<Item>

where, <Item> is one of the diagnostic item names from the following table:

MaxQueueSize Integer 64 Read Displays the maximum queue size configured in this subscription.

MonitoredItemCount Integer 32 Read Displays the number of monitored items in this subscription Id or Group.

MonitoredItemErrCount Integer 32 Read Displays the number of monitored items with bad quality in this subscription Id or Group.

PublishQueueSize Integer 32 Read Displays the current number of monitored item values queued and pending that are to be published to the subscribing client.

PublishQueueOverruns Integer 32 Read Displays the number of queue overrun occurrences since subscription creation or last reset. These counter increments by 1, if one or more item values are folded at a point in time.

ResetTotals Boolean Read/Write

Resets the following diagnostic items:

• TotalPublishes

• TotalUpdates

• PublishQueueOverruns

Item Name TypeRead/ Write Description

Item Name TypeRead/ Write Description

IsConnected Boolean Read If at least one UA Server session is established, IsConnected is True.

If no sessions are established, IsConnected is False.

TotalConnectionRetries Integer 32 Read Displays the number of connection retries since the service started.

44 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

ServerUri String Read Displays the URI of the UA Server.

KeepAliveInterval Integer 32 Read Displays the Keep Alive interval in milliseconds.

SecurityPolicy Integer 32 Read Displays the security policy of the UA Server:

0, if None is selected

1, if Basic256 is selected

2, if Basic128Rsa15 is selected

MessagePolicy Integer 32 Read Displays the message policy of the UA Server:

0, if None is selected

1 if Sign is selected

2 if Sign&Encrypt is selected

NamespaceAliases String Read Displays the array of Namespace aliases.

NamespaceURIs String Read Displays the array of Namespace URIs.

DefaultNamespace String Read Displays the default Namespace configured by the user.

IsAnonymousUser Boolean Read Displays as Anonymous User for UA Server session = True; the user credentials are provided for the UA Server session.

UserName String Read Displays the User Name, which is configured for secured session with the UA Server.

Note: This is empty if IsAnonymousUser=True)

CertificateExpiry DateTime Read Displays the date and time of application certificate expiry (Time in UTC).

CertificateSubject String Read Displays the subject name of the Certificate.

ResetTotals Boolean Read/Write

This resets TotalConnectionRetries item, if ResetTotals item is True.

Item Name TypeRead/ Write Description

Exposing the UA Client Service45

ArchestrA OPC UA Client Service Guide

Exposing the UA Client ServiceThe UA Client Service can only be directly connected from its local Galaxy. If a remote Galaxy access is required, you need to use the paired galaxy approach provided by System Platform.

For a UA Client service instance hosted by a Galaxy, it is recommended to configure Application Objects of the Security Groups with appropriate read/write privileges. These Application Objects have Field attributes binding to the UA Client item references. Remote Galaxy references must bind to the Application Object Field Attribute to write a data value, and thus are constrained to the Application Server security privileges for each user.

With in a Galaxy, for example, you can bind references to the UA Client items directly in InTouch HMI and ArchestrA Graphic I/O animation links. This practice bypasses the security in the Application Server Object model.

Connecting the UA Client to the OPC UA ServerAny ASB client, such as the MxConsumer inside the Application Server, can connect to a UA Client, which in turn connects to an OPC UA Server for exchanging data, by creating subscriptions and monitored items in that UA Client. The UA Client assigns a set of monitored items to the subscriptions. The monitored items generate the notifications that are sent to the UA Client upon the receipt of a publish request.

The UA Client uses the following to exchange data:

• Endpoint address (URL) of the OPC UA Server instance to establish a connection and exchange data.

• The Discovery Service to connect the UA Client and the OPC UA Server.

• A subscription, which is a client-defined location in the server, to return notifications to the client.

46 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

Registering ItemsTo 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.

Note: The UA Client is implemented for value attribute only.

• 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).

Note: The RegisterNodes() method is optional. You can disable the RegisterNodes() method using Registry key.

• On receiving the Node Id, the UA Client assigns an Id to the item and returns the Id through the API, and then adds the entries to the maps.

The input parameters for the RegisterNodes() API are defined in the following table:

The result parameters for the RegisterNodes() API are defined in the following table:

Parameter Description

requestHeader Indicates the common parameters for all requests submitted on a session.

nodesToRegister [ ] Provides the list of Node Ids to register.

Parameter Description

requestHeader Returns the status of the operation and digonstic information.

Connecting the UA Client to the OPC UA Server47

ArchestrA OPC UA Client Service Guide

The result codes of the RegisterNodes service are defined in the following table:

registeredNodeIds [ ] Provides the list of Node Ids, which the UA Client uses for subsequent access operations. The size and order of this list matches the size and order of the NodesToRegister request parameter.

Symbolic Id Description

Bad_NothingToDo Indicates that no action is required because, the UA Client has passed a list of operations with no elements.

Bad_TooManyOperations Indicates that the request could not be processed because, it specified too many operations.

Bad_NodeIdInvalid Indicates that the syntax of the Node Id is not valid.

Parameter Description

48 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

Managing SubscriptionsYou 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:

Creating and Deleting a Subscription

To create a subscription

1 If the OPC UA Server is available, an ASB client requests to create a subscription with a set of parameters. See "Parameters for deleting a subscription" on page 50.

Note: If the OPC UA Server is not available, the UA Client service detects that the connection to the OPC UA Server is not established, and then adds the subscription to the local cache.The cached subscriptions are added to the Server after it reconnects.Skip the steps 2 and 3.

2 The Subscription Manager manages the subscription(s) being added or removed by an ASB client. The Subscription Manager does the following:

• Creates a subscription on the OPC UA Server.

• Generates a SubscriptionId (unique for the entire client).

• Returns the client-generated SubscriptionId.

3 The ASB client receives a callback for each subscription, based on the publishing interval specified while creating the subscription. The callback contains VTQ data of the monitored items. The Client service retains the item notifications, based on the maximum queue size of the subscription containing the monitored item.

Connecting the UA Client to the OPC UA Server49

ArchestrA OPC UA Client Service Guide

Parameters for creating a subscriptionThe description of parameters to be supplied for creating a subscription are given below:

Parameter Type Description

ConnectionId ArchestrAServices.Contract.ConnectionId

Connection Id that is displayed when the client connects to the client service using the Open() method.

nPublishingInterval Unsigned Integer 64 Defines the cyclic rate (in milliseconds) that the subscription is being requested, to return notifications to the Client. The negotiated value for this parameter returned in the response is used as the default sample interval for monitored items assigned to this subscription.

The value 0 indicates that the interval is invalid.

Maxqueuesize Integer 64 Specifies the number of updates per item.

For example, if a subscription has 5 items and the maximum queue size per item is 10, then the maximum queue size of the subscription is 50.

In the configuration file, the value of default queue size is 10. If the IData Client specifies zero as queue size, the UA Client automatically revises it to the queue size specified in configuration file.

The OPC UA interface has queue size at item level of type UInt32. This queue size value is passed to the OPC UA Server when an item is created.

50 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

To delete a subscription

• If the OPC UA Server is available:

• The ASB client can delete the subscription by providing the SubscriptionId. When a subscription is deleted, the monitored items are also deleted from the subscription.

Each UA Client instance can subscribe items through multiple subscribtion groups from an OPC UA Server. The OPC UA Server can reside on the same or a remote node. The UA Client service supports net.TCP endpoints of the server.

• If the OPC UA Server is not available:

The ASB client requests to delete a subscription by providing a set of parameters. The UA Client service detects:

• That the connection to the OPC UA Server is not established.

• If the subscription is handled by the SDK (the subscription is cached to the list of subscriptions to be deleted after it reconnects).

or,

• If it is a subscription to be added to the server after reconnect (the UA Client service removes the subscription entry from the list of cached subscriptions).

Parameters for deleting a subscriptionThe description of parameters to be supplied for deleting a subscription are given below:

Parameter Type Description

ConnectionId ArchestrAServices.

Contract.ConnectionId

Connection Id that is displayed when the ASB client connects to the UA Client using the Open() method.

SubscriptionId Integer 64 Subscription Id that is generated when a Subscription group is added in UA Client. When you delete the Subscription group, Subscription Id is deleted automatically.

Connecting the UA Client to the OPC UA Server51

ArchestrA OPC UA Client Service Guide

Managing ItemsThe Item Manager in the UA Client manages the monitored items for each subscription. The activites during an item management are defined below:

Adding Items1 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.

Note: If the MonitortedItem is already added to the subscription, and you add the same item again, the item is not added for second time but is modified with the given parameters (samplingInterval, Active, ValueDeadband) latest values.

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.

52 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

Parameters for monitoring the itemsThe MonitoredItem contains the following parameters:

Browsing UA Server ItemsYou can browse the UA Server items associated with the UA Client, by providing the IBrowse service in the UA Client service. You can use the IBrowse service client (such as the Attribute Browser in the ArchestrA IDE) to browse the external UA Server tags.

You can use the Invensys IBrowse client, which can facilitate browsing any OPC UA third party server, to view the items in the server supported hierarchy.

The clients (OPC UA Browser service or test client) using the ASB services do not need to store the item names to subscribe them at run time. The clients can browse the OPC UA Server to select the items that need to be subscribed.

The ASB client service implements the IBrowse interface in order to have the browser capabilities. If an ASB client has to browse the server items in the OPC Server, that client must create another session with the OPC UA Server.

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.

Parameter Description

SamplingInterval Defines the fastest rate (in milliseconds) at which the MonitoredItem(s) must be accessed and evaluated.

Active Defines the state of the MonitoredItem.

ValueDeadband Contains the absolute change in a data value that causes to generate a notification. This parameter applies only to variables with any Number data type.

Connecting the UA Client to the OPC UA Server53

ArchestrA OPC UA Client Service Guide

Browsing the UA Server Items in the IDE BrowserYou can browse the system items in the IDE Browser as shown in the below diagram.

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 IsArray property indicates whether the selected item is of Array data type or not. In the Attribute browser, the array items are shown with [] suffix (eg: /$SYS$DIAG/UAClient/NamespaceAliases[]).

54 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

To browse items in the IDE Browser

1 Start the ArchestrA IDE, and connect to the Galaxy in which you have created the UA Client instance.

2 Create an Application object instance.

3 In Deployment view, right-click and open an object, and then click the Browse button associated with Input Source field. The IDE Browser window appears.

4 Select a namespace from Namespace drop-down list. The tag names (objects) corresponding to the selected namespace are displayed in Instances pane.

Note: The Namespace list box contains the ASB services, which are configured in UA Client Service instance.

Connecting the UA Client to the OPC UA Server55

ArchestrA OPC UA Client Service Guide

5 Click a Tagname to view its attributes, which include the display name of the attribute, Data type, Category, and Security classification.

6 Click OK.

Subscribing Items in Object ViewerThe Subscription Manager in the UA Client service manages the subscriptions, which are used to report notifications to the UA Client. These subscriptions inturn have a set of monitored items assigned to them, by the Client. The monitored items generate notifications that are to be reported to the Client by the subscription, upon a Publish request. You can use the Object Viewer, which is one of the clients that can subscribe items, to monitor for the UA Client.

56 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

To subscribe items in Object Viewer

1 Start the ArchestrA IDE or ArchestrA System Management Control (SMC).

2 Open Object Viewer.

Connecting the UA Client to the OPC UA Server57

ArchestrA OPC UA Client Service Guide

3 In the Attribute Reference drop-down box, type the Scope Name of the UA Client that is configured with the Application Server, and Item Id in the following format:

Scope Name:Item Id

4 Click GO. The Value, Timestamp, and Quality (VTQ) data of the items are displayed in the Watch window.

58 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

Subscribing Items in InTouch HMI

To subscribe items in InTouch HMI

1 Start the InTouch HMI application.

2 Create an InTouch HMI tag to access UA Client, for obtaining data from an external OPC UA Server.

3 In the Tagname Dictionary dialog box, enter the Access Name as Galaxy.

4 In the Item box, type the Scope Name of the UA Client that is configured with the Application Server, and Item Id in the following format:

Scope Name:Item Id

5 Click Save and then click Close.

Note: For more information on the connectivity settings required for the UA Client, see the Application Server Guide or Readme file.

Connecting the UA Client to the OPC UA Server59

ArchestrA OPC UA Client Service Guide

Read TransactionThe 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

ConnectionId This is the Connection Id that the ASB client receives when it connects to the OPC UA Server through the UA Client.

ItemIdentity[] Collection Displays an array of item identifiers to return values.

60 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

The results that the ASB client receives are given below:

• 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 TransactionAn 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

ItemStatus array Displays an array of item status indicators, if applicable.

RuntimeValues Displays the array of values returned to the client

Archestra Result Indicates the result of the read() transaction.

Parameter Description

ConnectionId Displays the Connection Id, which the ASB client receives when it connects to the OPC UA Server through the UA Client.

ItemIdentity[ ] Displays the array of items, whose values are to be written.

WriteValue[ ] Displays the values of the corresponding items.

Connecting the UA Client to the OPC UA Server61

ArchestrA OPC UA Client Service Guide

The results that the ASB client receives in the call back are given below:

• The expected ArchestrAResult in case of error are given below: (For more information, refer to OPC UA Part 4 - Services 1.01 Specification)

• InvalidConnectionId

• MonitoredItemsNotFound

• OperationFailed

• The expected ItemStatus in case of error is given below:

• OperationFailed

Note: The secured Write() APIs are not supported by the UA Client.

Unregistering ItemsThe ASB client can request to unregister an item in the UA Client by passing its Id or Name and Connection Id.

Note: Currently, the UA Client is implemented only for the value attribute.

On receiving the Item Id or Item Name, the UA Client checks if the item is registered. The Client then executes the UnregisterNodes() method for the items that are registered and are not under the Subscription group. The Client then deletes the entries for valid register items in as shown in the following tables.

The input parameters for the UnregisterNodes() API are given below:

Parameter Description

ArchestrAResult Displays the result of the write transaction indicating the status and error code.

out ItemStatus[ ] Displays the array of status corresponding to each write item provided.

Parameter Description

ConnetionId Displays the Connection Id, which is obtained when the ASB client connects to the UA Client using the Open() method.

62 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

The result parameter for the UnregisterNodes() API are given below:

The input parameters for the UnregisterNodes() API are given below:

The result parameter for the UnregisterNodes() API are given below:

The result codes for UnregisterNodes() API are given below:

ItemList Displays the array of ItemIdentity.

Parameter Description

Status Collection Displays the status corresponding to the Item list.

Parameter Description

requestHeader Displays the common parameters for all requests submitted on a session.

nodesToUnRegister [ ] Displays the list of NodeIds to be unregistered.

Parameter Description

responseHeader Returns the status of the operation and diagnostic information.

Parameter Description

Bad_NothingToDo There was nothing to do because the client passed a list of operations with no elements.

Bad_TooManyOperations The request could not be processed because it specified too many operations.

Parameter Description

Value, Timestamp, and Quality (VTQ) Data63

ArchestrA OPC UA Client Service Guide

Value, Timestamp, and Quality (VTQ) DataEach data point, that the UA Client returns, carries the VTQ data to the ASB client.

The Value, Timestamp, and Quality data is based on the following:

• Value

• Data value depends on the item type and is coerced to the appropriate ArchestrA data type.

• Timestamp

• Device timestamp in UTC is forwarded to the ASB client.

• Server timestamp in UTC is ignored. If the Device timestamp is not available, the Server timestamp is forwarded to the ASB client.

• The UA Client stamps the data if both Device and Server timestamps are not available.

• Quality

• Based on OPC UA Specification Part 4. of the Unified Architecture Specifications, Quality is termed as Status Code, which is a numerical value used to report the outcome of an operation performed by an OPC UA Server. The quality is forwarded as is to the other ASB clients.

• Quality generated by the UA Client due to connection failure has a value of 0x80050000 (BadCommunicationError).

• The StatusCode is a 32-bit unsigned integer. The top 16 bits represent the numeric value of the code that are used for detecting specific errors or conditions. The bottom 16 bits are bit flags that contain additional information but do not affect the meaning of the StatusCode.

OPC UA Servers return good/success StatusCodes if the operation is completed normally and the result is always valid. Whereas, different StatusCode values are used to provide the Client with additional information. OPC UA Servers use uncertain/warning Status Codes if they could not complete the operation in the manner requested by the Client, however, the operation did not fail entirely.

64 Chapter 3 ArchestrA UA Client Run Time

ArchestrA OPC UA Client Service Guide

65

ArchestrA OPC UA Client Service Guide

Chapter 4

Managing Digital Certificates

You can generate and use a self-signed OPC UA compliant digital certificate and a key pair. This digitial certificate can be associated to the UA Client service for exchange data with any OPC UA compliant server.

The UA Configuration utility is used for illustration purpose in this chapter. You can also use other means to generate and manage the digital certificate, if you are familiar with the OPC UA standard and digital certificate management. A self-signed digital certificate is used in this example.

Note: In a secured environment where the digital certificate is required to be signed by a Certificate Authority, please consult your IT department for the procedure.

66 Chapter 4 Managing Digital Certificates

ArchestrA OPC UA Client Service Guide

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/

Note: You may need to register for an account to download the package.

Generating a Self-Signed OPC UA Compliant Certificate and Key Pair67

ArchestrA OPC UA Client Service Guide

2 Install the setup, as given below:

a Unzip the zip file and double-click the run setup.exe file. The Open File - Security Warning dialog box appears.

b Click Run. The License Agreement dialog box appears.

c Read the License Agreement, and then click I Agree to continue. The Select Installation Folder dialog box appears.

68 Chapter 4 Managing Digital Certificates

ArchestrA OPC UA Client Service Guide

d Accept the default settings and continue. The installation process is complete, and the Installation Complete dialog box appears.

3 Click Close to exit.

Creating a Self-Signed OPC UA Compliant Certificate and Key Pair69

ArchestrA OPC UA Client Service Guide

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.

2 Click the Manage Application tab, and then click Create Application Certificate. The Create Certificate dialog box appears.

Note: You can use the default server in Application To Manage box.

3 In Create Certificate dialog box, do the following:

a Store Type: From the Store Type drop-down list, select Directory if your UA Client is running on the local computer.

b Store Path: It is recommended to create a temporary directory to store and copy the certificate and the private key. For example, C:\Tmp\TestUACert

c CA Key File: This field is optional if you are creating a self-signed certificate.

d CA Password: This field is optional, if you are creating a self-signed certificate.

70 Chapter 4 Managing Digital Certificates

ArchestrA OPC UA Client Service Guide

e Application Name: This field contains the name of your UA Client service. Enter ASB OPC UA Client Service that matches the name used in Subject Name and Application URI.

f Application URI: Select the Application URI box, and enter the application URI in the below format:

urn:localhost:ASB OPC UA Client Service

g Subject Name: Select the Subject Name box and enter the subject name in the below format:

CN=ASB OPC UA Client Service

h Domains: Select the Domains box and enter "localhost" in the Domains box.

i Key Format: Select PFX from the drop-down list.

Important: Items f, g, and h need to be compliant with the OPC UA standard.

Creating a Self-Signed OPC UA Compliant Certificate and Key Pair71

ArchestrA OPC UA Client Service Guide

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.

72 Chapter 4 Managing Digital Certificates

ArchestrA OPC UA Client Service Guide

Using the Self-Signed OPC UA Compliant Certificate and Key Pair

To use the self-signed OPC UA Compliant Certificate and Key Pair

1 Install the ASB bits by installing Wonderware System Platform 2014 Patch 01. Create an ArchestrA Galaxy. For more information, see the ArchestrA Installation Guide.

2 Install the UA Client on every computer on which you want to deploy the UA Client service instance.

3 Create the UA Client service configuration. For more information, see "Creating a UA Client Service Instance" on page 16.

4 Copy the certificate file aaUAClient.der from C:\Tmp\TestUACert\certs directory into the path %CommonApplicationData%\ArchestrA\CertificateStores\OPCUAClient\certs, on every computer on which you want to deploy the UA Client service instance.

By doing this, you have replaced the file with same name in that directory.

Note: The path to store program data is %CommonApplicationData%. By default, this location is C:\ProgramData\.

5 Copy the private key file aaUAClient.pfx from C:\Tmp\TestUACert\private directory into the path %CommonApplicationData%\ ArchestrA\CertificateStores\OPCUAClient \private, on every computer on which you want to deploy the UA Client service instance.

By doing this, you have replaced the file with the same name in that directory

Note: The path to store program data is %CommonApplicationData%. By default this location is C:\ProgramData\.

6 On the computer where the targeted OPC UA Server may be running, copy the certificate file aaUAClient.der from C:\Tmp\TestUACert\certs directory into the directory where you want to add the trusted cert for the OPC UA Server.

7 Deploy the UA Client service instance to the node.

73

ArchestrA OPC UA Client Service Guide

Appendix A

Mapping OPC UARun Time Data

This Appendix lists the mapping of OPC UA data types with ArchestrA data types, the conversion rules for writing values, and the mapping of OPCUAQuality with MxQuality.

Mapping OPC UA Data Types to ArchestrA Data Types

The conversion table below shows how the OPC UA data types are mapped to the ArchestrA data types:

IData Contract Supported Types OPC UA Types ArchestrA Types

TypeByte Byte MxInteger

TypeChar Byte MxInteger

TypeInt16 Short MxInteger

TypeUInt16 UShort MxInteger

TypeInt32 Int MxInteger

MxDataQualityType

MxDataTypeEnum

MxQualifiedEnum

MxSecurityClassificationEnum

74 Appendix A Mapping OPC UA Run Time Data

ArchestrA OPC UA Client Service Guide

TypeUInt32 UInt MxInteger

TypeInt64 Long MxInteger

TypeUInt64 ULong MxInteger

TypeFloat Float MxFloat

TypeDouble Double MxDouble

TypeString String, LocalizedText MxString

MxReferenceType

MxBigString

MxInterNationalizedString

TypeDateTime DateTime MxTime

TypeDuration Duration MxElapsedTime

TypeGuid Guid MxString

TypeByteString ByteString MxInteger[]

TypeLocalizedText String (The format of IData TypeLocalizedText is different from the OPC UA LocalizedText.)

MxString

TypeBool Bool MxBoolean

TypeSByte SByte MxInteger

TypeErrorStatus Long (ErrorCode) TypeErrorStatus

TypeByteArray Byte[] MxInteger[]

TypeCharArray Byte[] MxInteger[]

TypeInt16Array Short[] MxInteger[]

TypeUInt16Array UShort[] MxInteger[]

TypeInt32Array Int[] MxInteger[]

MxDataQualityType[]

MxDataTypeEnum[]

MxQualifiedEnum[]

MxSecurityClassificationEnum[]

TypeUInt32Array UInt[] MxInteger[]

TypeInt64Array Long[] MxInteger[]

IData Contract Supported Types OPC UA Types ArchestrA Types

Conversion Rules for Writing a Value75

ArchestrA OPC UA Client Service Guide

Conversion Rules for Writing a ValueThe conversion rules to write a value to the OPC UA Server are given below:

• When the item is registered with a UA Client, it reads the data type of the item from OPC UA Server. This is a one time operation.

• The UA Client converts the value received from IData Client to the item's data type, and then sends it to the OPC UA Server.

• For more information on Conversion rules, see OPCUA Spec (Table 113 - Conversion Rules) on page 129.

• If there is an error in conversion, the value is not sent to the OPC UA Server. The error code is reported to the IData Client.

TypeUInt64Array ULong[] MxInteger[]

TypeFloatArray Float[] Float[]

TypeDoubleArray Double[] MxDouble[]

TypeStringArray String[] MxString[]

MxReferenceType[]

MxBigString[]

MxInterNationalizedString[]

TypeDateTimeArray DateTime[]

DateTime[] MxTime[]

TypeDurationArray Duration[] MxElapsedTime[]

TypeGuidArray Guid[] MxString[]

TypeByteStringArray ByteString[] MxString[]

Note: Array of ByteString is not supported in Mx, so value is read as MxString array. Write() operation is not supported for a two dimensional array.

TypeLocalizedTextArray String[] MxString[]

TypeBoolArray Bool[] MxBoolean[]

TypeSByteArray SByte[] MxInteger[]

IData Contract Supported Types OPC UA Types ArchestrA Types

76 Appendix A Mapping OPC UA Run Time Data

ArchestrA OPC UA Client Service Guide

For example: If data is subscribed as Int32 in a UA Client, the destination data is registered as Int16 in OPC UA Server.

Mapping OPCUAQuality to MxQualityThe conversion table below shows how OPCUAQuality is mapped to MxQuality:

IDATA Client

UA Client OPC UA ServerValue from IDATA Client

Write Operation

Write Status

-2,147,483,648 Fail Failure Overflow Error - conversion fail (Format Error when writing in string)

Value does not change

-32,768 Success Success Value converts to Int16 Value changes

32,767 Success Success Value converts to Int16 Value changes

2,147,483,647 Fail Failure Overflow Error - conversion fails (Format Error when writing in string)

Value does not change

OPCUA StatusCode MxStatusDetail MxStatusCategory MxQuality

Bad MX_E_UnknownError MxCategoryOperationalError

OPC_QUALITY_BAD

BadAttributeIdInvalid MX_E_InvalidReference MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadConfigurationError MX_E_InvalidReference MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadConnectionClosed MX_E_PlatformCommunicationError

MxCategoryCommunicationError

OPC_QUALITY_NOT_CONNECTED

BadDataTypeIdUnknown

MX_E_WrongDataType MxCategoryOk OPC_QUALITY_BAD

BadDeviceFailure MX_E_UnknownError MxCategoryOk OPC_QUALITY_DEVICE_FAILURE

BadIndexRangeInvalid MX_E_InvalidIndex MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadIndexRangeNoData MX_E_InvalidIndex MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadMonitoredItemIdInvalid

MX_E_InvalidReference MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

Mapping OPCUAQuality to MxQuality77

ArchestrA OPC UA Client Service Guide

BadMonitoringModeInvalid

MX_E_InvalidReferenceMxCategoryConfigurationError

MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadNoCommunication MX_E_PlatformCommunicationError

MxCategoryCommunicationError

OPC_QUALITY_NOT_CONNECTED

BadNodeIdInvalid MX_E_InvalidReference MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadNodeIdUnknown MX_E_InvalidReference MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadNotConnected MX_E_PlatformCommunicationError

MxCategoryCommunicationError

OPC_QUALITY_NOT_CONNECTED

BadNotReadable MX_E_NotReadable MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadNotWritable MX_E_NotWriteable MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadOutOfRange MX_E_IndexOutOfRange MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadOutOfService MX_E_PlatformCommunicationError

MxCategoryCommunicationError

OPC_QUALITY_OUT_OF_SERVICE

BadOutOfMemory MX_E_Overflow MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadRequestTimeout MX_E_RequestTimedOut MxCategoryCommunicationError

OPC_QUALITY_OUT_OF_SERVICE

BadSensorFailure MX_E_UnknownError MxCategoryOk OPC_QUALITY_SENSOR_FAILURE

BadTypeMismatch MX_E_IncorrectDataType MxCategoryOk OPC_QUALITY_BAD

BadUserAccessDenied MX_E_UserNotHavingAccessRights

MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

BadWaitingForInitialData

MX_E_ObjectInitializing MxCategoryPending MAGELLAN_QUALITY_INITIALIZING

BadWriteNotSupported MX_E_NotWriteable MxCategoryConfigurationError

OPC_QUALITY_CONFIG_ERROR

Good MX_S_Success MxCategoryOk OPC_QUALITY_GOOD

GoodLocalOverride MX_S_Success MxCategoryOk OPC_QUALITY_LOCAL_OVERRIDE

UncertainDataSubNormal

MX_E_UnknownError MxCategoryOk OPC_QUALITY_SUB_NORMAL

OPCUA StatusCode MxStatusDetail MxStatusCategory MxQuality

78 Appendix A Mapping OPC UA Run Time Data

ArchestrA OPC UA Client Service Guide

UncertainEngineeringUnitsExceeded

MX_E_UnknownError MxCategoryOk OPC_QUALITY_EGU_EXCEEDED

UncertainLastUsableValue

MX_E_UnknownError MxCategoryOk OPC_QUALITY_LAST_USABLE

UncertainSensorNotAccurate

MX_E_UnknownError MxCategoryOk OPC_QUALITY_SENSOR_CAL

UncertainSubNormal MX_E_UnknownError MxCategoryOk OPC_QUALITY_UNCERTAIN

OPCUA StatusCode MxStatusDetail MxStatusCategory MxQuality

79

ArchestrA OPC UA Client Service Guide

Appendix B

ArchestrA Services

The ArchestrA SOA framework, also known as the ArchestrA Service Bus (ASB), consists of ArchestrA core services and user defined services. The following diagram illustrates the exchange of data between the UA clients and servers, and the Application Server.

80 Appendix B ArchestrA Services

ArchestrA OPC UA Client Service Guide

Core ServicesThe 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:

• Local Discovery Service: The Local Discovery service is a centralized server that maintains information about the available services on the node within ArchestrA. The endpoint cache of the discovery service is populated with information about the services that can be discovered. All the core services are registered with the Local Discovery Service.

• Global Discovery Service: The Global Discovery service does not have any defined primary and secondary replication endpoints. Each Local Discovery Service is connected to a primary and a secondary Global Discovery Service that is either running on the same node or on a different node.

• Service Host Service: The services running within the ArchestrA Services are written as WCF service libraries and packaged as DLLs. All the service DLLs in the same process are co-hosted services. Co-hosting is the process by which the Service Host hosts more than one ArchestrA service DLLs. When a service consumes an interface on another service, the efficiency of this relationship is enhanced by co-hosting the two services. The Service Host takes advantage of this identity by using reflection to locate the interfaces in co-hosted services and present these interfaces directly to the calling client in place of the interfaces on a WCF client proxy.

Global Discovery Service

Local Discovery Service

Service Host Manager Service

Configuration Service

Deploy Agent Service

Content Provider Service

User Authentication

Service

Watchdog Services

Software Update Service

Core Services81

ArchestrA OPC UA Client Service Guide

• Service Manager Service: The Service Manager is one of the core ArchestrA run-time services. Using the configuration as input, the Service Manager deploys various services on to a node.

• Configuration Service: The Configuration service provides interface which allows users to manage services within the Service Repository, that is it allows the user to create and modify the services within the Service Repository.

• Deploy Agent Service: The Deploy Agent service deploys the service on to the node to which the service is assigned. It has the capability to deploy or un-deploy a service, and provide the configuration details to the Service Manager.

• Content Provider Service: The Content Provider service is started by the Watchdog service. The following are the activities of a Content Provider service:

• The Content Provider service searches for the requested package file in the repository node and reads the package information and transfers the package information to the requester.

• The Deploy Agent service requests for the package information to the Content Provider service. On this request, the Content Provider service sends the package information to the Deploy Agent service.

• System Authentication Service: The System Authentication service involves validating security credentials during the process of establishing a connection between the ArchestrA service and its client.

• Software Update Service: The Software Update service retrieves the code module package from the service repository, by calling the Content Provider service, if the package is not yet installed. The Software Update service also installs the code modules on the remote nodes, based on the instructions defined in the package description.

82 Appendix B ArchestrA Services

ArchestrA OPC UA Client Service Guide

User-Defined ServicesYou can build a service to perform a specific operation. The following diagram illustrates the user-defined services within the ArchestrA SOA framework.

The examples of user-defined services hosted in the ASB framework are:

• UA Client Service: OPC UA Client service connects to an external OPC UA Server. It allows external OPC UA data to be consumed by an ASB Client.

• GRBrowsing Service: ASB GR Browsing service is an ArchestrA Service (WCF service) that is hosted and managed by the ASB Infrastructure. It allows you to browse the Application Server namespaces from one Galaxy to other Galaxy.

• MxDataProvider Service: ASB MxData Provider service allows the Application Server to access and exchange object attribute data, from one Galaxy to other Galaxy.

83

ArchestrA OPC UA Client Service Guide

Glossary

Application URL The URL (Uniform Resource Locator) of an application.

ArchestrA The distributed architecture for supervisory control and manufacturing information systems. It is an open and extensible technology based on a distributed, object-based design.

ArchestrA Service Bus (ASB)

ArchestrA Service Bus is a framework for service communication or service-oriented architecture.

Basic 256 security policy

Security policy deals with configurations that require medium to high security.

Basic 128 RSA 15 security policy

Security policy deals with configurations that require medium security.

CA Certificate Authority.

Cache A cache is a component that transparently stores data so that future requests for that data can be served faster.

Check in IDE operation for making a configured object available for other users to Check out and use.

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.

84 Glossary

ArchestrA OPC UA Client Service Guide

DLL Dynamic Link Library

Endpoint A physical address available on a network that allows to access one or more services provided by a server.

Endpoint URI The address or URI (Uniform Resource Identifier) of the OPC UA Server.

Galaxy The entire application. The complete system consisting of a single logical name space and a collection of Platform objects and other objects. One or more networked PCs that constitute an automation system. This is referred to as the Galaxy Namespace.

Host The parent of a child Instance in the deployment view.

Instance An object, which is a unique representation of a template that exists in run time.

Integrated Development Environment (IDE)

The Integrated Development Environment (IDE) is the interface for the configuration side of Application Server. In the IDE, you manage templates, create Instances, deploy and un-deploy objects, and other functions associated with the development and maintenance of the system.

Key pair Key pair is combination of public and private keys. The public key is used to encrypt plaintext or to verify a digital signature; whereas the private key is used to decrypt plain text or to create a digital signature.

Message The data unit conveyed between and server that represents a specific service request or response.

Message Exchange The object to object communications protocol used by ArchestrA and the Application Server.

Namespace URI URI(Uniform Resource Identifier) of the Namespace/area in the OPC UA Server.

Node A node is the fundamental component of an address space.

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.

OPC UA Client The Unified Architecture (UA) from the OPC Foundation is the next generation OPC standard.

OPC UA Server Service

OPC UA Server service allows a Standard OPC UA Client to connect to the Application Server and access data inside the Application Server.

OPC Unified Architecture

The Unified Architecture (UA) from the OPC Foundation is the next generation OPC standard.

Node A node is the fundamental component of an address space.

Glossary85

ArchestrA OPC UA Client Service Guide

Reference A string that refers to an object or to data within one of its attributes.

Server A software application that implements and exposes the services specified in this set of specifications.

Service A service is similar to a method call in a programming language or an operation in a web services WSDL contract.

Service host This hosts one or more run-time services dynamically.

Service Manager This manages all service activities on the node.

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.

Template An object containing configuration information and software templates used to create a derived template and/or Instance.

Transaction Exchange of information or services between two or more applications, servers, or entities.

WCF Windows Communication Foundation.

86 Glossary

ArchestrA OPC UA Client Service Guide

87

ArchestrA OPC UA Client Service Guide

Index

AAbout

Classic OPC 10OPC UA 10OPC UA connectivity 12OPC UA connectivity capabilities 12

ArchestrA Core ServicesConfiguration Service 81Content Provider Service 81Deploy Agent Service 81Global Discovery Service 80Local Discovery Service 80Service Host Service 80Service Manager Service 81Software Update Service 81System Authentication Service 81Watchdog Service 80

ArchestrA data typesmapping 73

ArchestrA Framework 12ArchestrA IDE 16, 56ArchestrA OPC UA Services

about 9ArchestrA SOA framework 13ASB client 50, 51, 59, 63

attributeproperties 53

Ccode module package 81comparing

OPC UA and Classic OPC 11configuration file 28, 46, 49configuring

UA Client Service 18connecting

UA Client to OPC UA Server 45conversion rules

Writing a value 75

Ddeploying

the UA Client instance 27, 28Diagnostic Items 35

Connection Diagnostic Items 35, 39Global Diagnostic Items 35, 36Subscription Diagnostic Items 35, 42UA Client Diagnostic Items 35, 43

Digital Certificatesmanaging 65

88

ArchestrA OPC UA Client Service Guide

GGalaxy 28, 29, 30, 54, 72, 82

ASB Galaxy database 28

IIData 31IData Client 59, 75IData Service 31, 59IDE Browser 54

browsing items 53instance parameters

configuring 18auto-assigning port numbers 22user credentials 21

modifying 25Item Syntax 31

Diagnostic Items 35OPC UA Items 31

itemsadding 51deleting 51managing 51parameters for monitoring 52registering 46unregistering 61

Kkey pair 69

creating 69generating 66using 72

Mmapping

OPCUAQuality to the MxQuality 76MxQuality 76

NNamespace Alias 22

configuring 22Namespace alias table 23

editing 24

OOPC UA and Classic OPC

about 10OPC UA connectivity

in ArchestrA Framework 12

understanding 11OPC UA data types 73OPC UA Standard

understanding 9

RRegisterNodes()

input parameters 46result parameters 46

Sself-signed OPC UA compliant certificate

creating 69generating 66using 72

subscribing itemsInTouch HMI 58Object Viewer 55

subscriptions 48creating 48, 49deleting 50managing 48parameters 49

Ttransactions

Read 59Write 60

UUA Client

Run time 31UA Client Service

configuring 15exposing 45instance 16instance parameters 25

UA Client Service configuration 28exporting 29Importing 30

UA Client Service instanceauto-deploying 28creating 16deploying 27deploying manually 27

UA Server Items 52browsing 52browsing in IDE Browser 53, 54

89

ArchestrA OPC UA Client Service Guide

UnregisterNodes()input parameters 62result parameters 62

VVTQ

data 48, 63quality 63timestamp 63value 63

90

ArchestrA OPC UA Client Service Guide