Getting Started

OPC is best understood by example. The following guide provides you with some very basic overview concepts, along with some simple exercises to learn OPC technology by demonstration.

Launching the OPC UA Server & Client

  1. Several OPC UA Servers and Clients have been installed as part of this package. First, we will launch the DA Server and then the DA Client

    1. Open the Source code in Visual Studio .NET 2013 so you can see the Data Access projects:
      image128.gif

    2. Compile the solution.

    3. Both applications can be found here :
      <source root>\SampleApplications\Bin\Debug\.

    4. First, launch the server: DA Server: QuickStarts.DataAccessServer.exe

    5. Second, launch the client: DA Client: QuickStarts.DataAccessClient.exe

  2. Both applications should now be open on-screen.

Connecting a Client to a Server

  1. The DA Server will show its endpoint at the top of the window. See DA Server GUI. Using the mouse, simply highlight the endpoint and then copy it to the Windows clipboard.

  2. Switch to the Generic UA Client and then paste the endpoint into the endpoint field. See DA Client GUI.
    TIP: The following step-by-step tutorial shows HTTPS connectivity.

  3. Click the Connect button, which is displayed at the far-right of the endpoint address field.

  4. The Server will validate the client's request and the connection should be established.

  5. If the connection is rejected by the server, then this will almost certainly be a certificate trust issue. See Troubleshooting section for tips on fixing this problem.

Browsing the Server's Address Space

A powerful feature of OPC is the ability for a Client to browse the Server and see the data that is currently available. All data is stored in a structure similar to a file and folder concept, except in OPC these are called "Nodes".

  1. In this exercise we will use the DA Client only.

  2. The main visible area of the client window shows the navigation area.

  3. Simply expand/collapse the visible nodes to continue the navigation experience. See Address Space Navigation for more details.

Reading Data

You can acquire data on-demand by using a Read, which allows you to read 1..n Nodes in a single call. This is very useful for obtaining a "snapshot" of the current values. Many OPC Servers will actually obtain the data from the underlying device/system prior to returning the values to the client.

  1. In this exercise we will use the DA Client only.

  2. Simply locate a Node within the main navigation area and then click on it, this will automatically invoke a Read.

  3. The attributes and values associated with the selected node will be displayed on the right-side of the window.

Exercises

Writing Data

In addition to acquiring data, Clients can provide data to a Server too via a Write operation. You can write to 1..n Nodes within a single call, and can specify the value and/or quality for each node.

  1. In this exercise we will use the DA Client only.

  2. Simply locate a Node within the main navigation area and then right-click (to activate the context menu) and choose Write.

  3. Specify a value to write and then click OK.

  4. The value will be immediately written to the node; some nodes are read-only whereas others are read/write so be prepared to see dialogs indicating a write failure.

Exercises

Subscribing to Data

Subscriptions are the most powerful and optimized method of continuous data acquisition. You cannot compare a subscription to continuous Read operations. Subscriptions cause a Server to poll a device on-behalf of the Client, and when the Server detects that a Node's value has changed then the Server will send the new information to the Client. This method reduces the load on the Client, reduces the load on the Server, and can also reduce the load on the underlying device, particularly when multiple Clients are subscribing to the same nodes (and at the same frequency).

  1. In this exercise we will use the DA Client only.

  2. Simply locate a Node within the main navigation area and then right-click (to activate the context menu) and choose Monitor.

  3. The node will show updated values as they occur in the bottom area of the client window.

Exercises

Security

To learn how to configure an application to trust or not-trust other applications simply refer to the Securing Applications Tutorial.

Summary

There are many, many other features of OPC that are not described here, although some are mentioned throughout this help documentation.

For more information about OPC Unified Architecture features and capabilities see About Unified Architecture.