OPC UA Sample Server

One of the main features of GENESIS64 is the OPC UA communication support. The OPC Foundation released the Sample Binaries so that users can test the UA Sample Server and UA Sample Client against other OPC UA Servers. This topic tells you how to install, set up, and use the OPC UA Sample Server and OPC UA Sample Client. The OPC UA SDK 1.00 Sample Binaries Setup is a set of interfaces, libraries and executable files that allow developers to quickly create UA applications with the .NET programming environment.

Installation

  1. Before installing the OPC UA Sample Server, make sure that the UAC (User Account Control) is disabled and you are logged in as User with administrative privileges.

NOTE: You can disable the UAC in User Accounts window under Control Panel of your Windows operating system. If the SDK installer does not run, then you must turn on IIS6 compatibility mode. You can do it from the 'Turn windows features on or off' dialog and check the IIS6 Management components.

  1. Before you can install the OPC UA SDK 1.00 Sample Binaries you have to download the installation from the OPC Foundation Web site (http://www.opcfoundation.com). (OPC UA SDK 1.00 Sample Binaries Setup (x86)).

NOTE: You must be a member of the OPC Foundation to have rights to download this installation.

  1. Once the installation is downloaded, unzip the archive files, run the Setup.exe, and go through the installation. You will see an OPC Foundation folder in the Windows Start menu after successful installation.

Running OPC UA Sample Server

  1. Check if the sample configuration files are located in the proper, default directory: c:\Program Files (x86)\OPC Foundation\UA SDK\v1.0\Samples\Bin\.
    If the files are located in a different directory instead -- c:\Users\All Users\OPC Foundation\Config\ -- the application will crash during start. In this case, simply copy the configuration files into properly directory.
  2. To avoid unexpected behavior, before starting the OPC UA Sample Server, stop the OPC UA Discovery server .
  3. Start the OPC Sample Server by going to the Windows Start menu and select Programs -> OPC Foundation -> UA SDK 1.00 -> UA Sample Server. If the OPC Sample Server is running, the system tray icon will appear. You can double-click it.

Figure 1 - UA Sample Server Window

Running OPC UA Sample Client

  1. To start up the OPC Sample Client, go the Start menu to Programs -> OPC Foundation -> UA SDK 1.00 -> UA Sample Client.

Figure 2 - UA Sample Client Window

  1. Now, we will try to display some data from remote OPC UA Server. Make sure that the OPC UA Discovery Server is running on this computer.

NOTE: For more about OPC UA Discovery Server see the OPC UA Sample Server topic.

  1. Go back to the UA Sample Client and open up the drop-down list and select New. You should see the Discover Servers window for local computer.

Figure 3 - Discover Servers

  1. Click on drop-down list near Host Name and select Browse. Select the Domain in drop-down list and click on the Refresh button. Select the OPC UA Server you want to connect to.

NOTE: It may take some time until the Discovery Hosts scan the whole network.

  1. Once you have selected the computer in Host Name, click on the Discover button and the list of all available OPC UA Servers on that computer shows up. Select an OPC UA Server and click OK.

Figure 4 - Discovered Servers

  1. The Server Configuration window appears. Here you can set various parameters. For our purposes, simply click OK.

Figure 5 - Server Configuration

  1. The connection string will be entered into the URL command. Click the Connect button to connect the OPC UA Server. It opens the Open Session window where you can specify the Session Name, Authentication Mode with User name, and Password. Click OK.

NOTE: Accept the client Certificate on the server. You may do this initially before the client connects to the server. You can also try look up the client certificate in the rejected certificates on the server machine. The certificate may appear as Entrusted, but accepting it will not harm your computer. Accepting it is important for the OPC UA client application to communicate to the OPC UA Sample Server.

  1. Now you can browse the OPC UA Server using the tree in the right-hand pane. Browse for a tag to connect to and to display.
  2. A dialog window with Subscription Parameters pops up. Click OK. Now you can see that you can continuously read the value of the selected item.

Figure 6 - Subscription Setting

  1. For more details about OPC UA SDK 1.00 Sample Binaries, see the readme file which is part of the installation.