.NET Based OPC UA Client/Server SDK  3.3.3.537
Full Client

The Full Client is an extended example developed using the Unified Automation OPC UA Client SDK .NET showing several features of OPC UA.

Connect

On startup, the Full Client shows three empty windows.

full_client.png

Enter the URL of a Discovery Server into the input field named "Discovery URL". Pressing the arrow of the drop-down menu "Endpoints" calls FindServers on the Discovery URL and all Endpoints on all running servers are displayed in the drop-down menu. Select an endpoint and click on the "Connect" Button.

full_client2.png

When choosing an endpoint with Security Policy "None", the connection is established immediately. If you try to connect to a secure endpoint for the first time, you'll receive an error (BadCertificateUntrusted) because the Client and the Server have to trust each other's certificates first.

  1. Locate the Client's certificate store (%CommonApplicationData%\UnifiedAutomation\CertificateStores) and move the Server's certificate from Rejected/certs to Trusted/certs. The location of these folders is set in the file app.config which can be found in the Visual Studio Project for the Full Client.
  2. Locate the Server's certificate store and trust the Client's certificate. Refer to the documentation of the Server for how to achieve this.

When clicking on "Connect" now, the connection should be established. The "Connect" button becomes a "Disconnect" button and can be used to close the connection to the server. This can also be done by choosing Server → Disconnect from the menu bar.

Reverse Connect

For reverse connection choose the "Reverse" option in the "Connection Type" drop-down. Enter the URL were the client should listen for open Server connections into the input field named "Client Listening URL" and leave the field. The client will now start listen at these URL for open server connections and fill the "Discovery URL" drop-down with all found Server Discovery URLs. Now choose one or enter one by yourself and press the "Connect" button. To select an Endpoint, press the arrow of the drop-down menu "Endpoints" as described above and connect. Note that in this case the Server needs to be configured to establish a reverse connection. Refer to the documentation of the Server for how to achieve this. Reverse connect is needed, when the server is behind a firewall and no port can be opened.

full_client1.png

Browse/Subscribe

Now you can browse the Address Space in the upper left window (Browse Window). Click on a Node to display the Node's Attributes in the upper right window (Attribute Window). Drag and drop variables from the Browse Window to the bottom window (Monitoring Window) for monitoring.

full_client3.png

Choose Subscription → Enable Publishing from the menu bar to enable/disable Publishing. When selecting Subscription → Set Publishing Interval a dialog window opens. Enter the desired Publishing Interval in milliseconds at "Requested Publishing Interval" and click "Apply". The corresponding Publishing Interval set by the server is then displayed at "Revised Publishing Interval".

full_client4.png

When selecting one or more variables in the monitoring window and performing a right click, a context menu opens.

full_client5.png

You can remove the selected items and change the Sampling Interval for these items by choosing a value from the list.

Write

Click on "Write Values" to open a dialog window to write the value of the selected variables.

full_client6.png

Select the field in the "Write Value" column and click on it again after a short delay to enter the value to be written. Click on "Apply" to actually write the values. When entering the value in the wrong format or leaving one of the input fields empty, an error message will be displayed in the "Write Value" column. Clicking on "OK" writes the values and closes the window.