dOPC Client Toolkit
Close
dOPC and UA

With version 5.0 dOPC now supports also OPC UA (Unified Architecture). We have implemented the fastest OPC UA protocol which is OPC UA Binary (opc.tcp://...). This protocol must be supported on any OPC UA server. For further information about OPC UA please take a further look at this Wiki. For the OPC UA specifications (specially Part 4: Services) please click here

As dOPC developer you can easily change to OPC UA. Just precede the server name with "opc.tcp://..." to instruct dOPC to use UA connections. Apart from that the handling is the same as with a 'classic' or XML DA OPC server. 

The dOPC Client Toolkit supports OPC UA in 2 ways: 

1. TdOPCDAClient 

With the TdOPCDAClient it is possible to develop Data Access Client (DA) not only for UA. The TdOPCDAClient is also compatible with OPC COM (Classic) and OPC XML DA. You just have to enter the connection string (Property: ServerName) to change from one server type to a other. Our dOPC Explorer is a good example it. The dOPC Explorer is complete written with the help of the TdOPCDAClient and the TdOPCServerBrowser component. Here is an example how you can connect to an OPC UA server:

uses dOPCDA; procedure OPCUAConnect(OPCClient : TdOPCUAClient); begin OPCClient.ServerName := 'opc.tcp://opcua.demo-this.com:51210/UA/SampleServer'; OPCClient.Active := true; ShowMessage('Connected to server'); end;

2. TdOPCUAClient 

For the start point to develop OPC UA clients it is recommended to use the TdOPCDAClient component, because it uses the TdOPCUAClient component internally, but it is much easier to handle. 

However, with the TdOPCUAClient it is possible to connect to any OPC UA Server via the binary protocol (opc.tcp://...). The usage of the our UA component is very easy. All connecting and disconnecting activities are done in the component. But please note: With this component it is not possible to connect to other OPC server like OPC Classic COM server or OPC XML DA server. 

Here is an example how you can connect to an OPC UA server:

uses ua.client; procedure OPCUAConnect(OPCClient : TdOPCUAClient); begin OPCClient.URL := 'opc.tcp://opcua.demo-this.com:51210/UA/SampleServer'; OPCClient.Active := true; ShowMessage('Connected to server'); end;

The TdOPCUAClient supports all OPC UA Service calls which are in detailed descript in the OPC UA Specification (Part 4: Services) You can download the specification at: https://www.opcfoundation.org 

It is recommended to read the OPC UA Specification Part 4 first

Below you will find an example how you can make an service call with the TdOPCUAClient component. 

The example shows you how to call the GetEndpoints service. For further information about this service, please look at: OPC UA Specification Part 4 Discovery Service Set "GetEndpoints".

uses ua.datatypes; procedure CallGetEndpoints(UAClient: TdOPCUAClient; Info: TStrings); var S: uaGetEndpoints; Endpoint: uaEndpointDescription; begin S := uaGetEndpoints.Create(UAClient); try S.Request.EndpointUrl := UAClient.Url; S.Run; for Endpoint in S.Response.Endpoints do Info.Add('+ '+Endpoint.EndpointUrl); finally S.Free; end; end;

You can call all other OPC UA service calls in the same way. 

Here is an template how to use:

var ServiceCall: ua<NameOfServiceCall> // NameOfServiceCall = Service descripted in Part 4 begin ServiceCall := ua<NameOfServiceCall>.Create(<TdOPCUAClientObject>) try ServiceCall.Request.<InputParam> := <InputParamValue> ServiceCall.Run; ServiceCall.Response.<OutputParam> finally ServiceCall.Free; end; end;

Below you will find all OPC UA Service calls ua<NameOfServiceCall> which are supported by the dOPC Client Toolkit and in detail descript in the OPC UA Specification Part 4 Services.

OPC UA Service call
Description
Finds the servers known to the discovery server.
Returns the servers known to a Discovery Server
Gets the endpoints used by the server.
Registers a server with the discovery server.
Is implemented by Discovery Servers
Creates a secure channel with a server.
Closes a secure channel.
Creates a new session with the server.
Activates a session with the server.
Closes a session with the server.
Cancels an outstanding request.
Adds one or more nodes to the server address space.
Adds one or more references to the server address space.
Delete one or more nodes from the server address space.
Delete one or more references from the server address space.
Browse the references for one or more nodes from the server address space.
Continues one or more browse operations.
Translates one or more paths in the server address space.
Registers one or more nodes for repeated use within a session.
Unregisters one or more previously registered nodes.
This service is used to issue a Query request to the Server
look at OPC UA Spec Part 4 Services
Is used to read one or more attributes or nodes.
look at OPC UA Spec Part 4 Services
Is used to write values to one or more attributes or nodes
look at OPC UA Spec Part 4 Services
Is used to call a list of methods
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
look at OPC UA Spec Part 4 Services
Kassl GmbH Copyright © 2019. All rights reserved.