How to Connect to an OPC UA Data Source
OPC UA servers are only discovered automatically if they are already registered
using Local Discovery Server (LDS).
Datasource will have to be first created and configured.
Before staring!, here are some premises that were taken into account for the realization of this set up.
This section refers to the OPC UA specification. For information on the different OPC specifications visit the OPC Foundation website.
In this example we use an OPC UA ANSI C simulation server from Unified Automation to demonstrate how to connect an OPC UA sever. This can be downloaded for free from their website (requires you to create a free account)
Data sources can only be created underneath a Connector so please make sure that a Connector has already been created (see previous section for details)
Accessing data sources is an administrative task so you must be logged into DataStudio as an administrator. To get more information about accessability visit the section How to create a Profile.
Follow this simple steps to connect to an OPC
Navigate to the Connector and right click to display the context menu and select Admin → New → External Interfaces → Datasource to open the Create Object wizard.Figure 1. Adding a Datasource
In the Create Datasource wizard, enter a name and description for the
Datasourceand click Next.Figure 2. Create Datasource Wizard
In the second part of the wizard the Server type can be selected from the drop-down menu (select OPC UA). For OPC UA servers which are not automatically discovered, the endpoint URL must be entered. This is normally of the form
opc.tcp:<hostmachine name>:<port number>but you can check this in the console window of the UA server.Figure 3. Create Datasource Wizard - Server Type
More configuration options for the OPC
Datasource are available in the wizard
but for this example we will use the default configuration. Click Create to
Datasource in the I/O Model panel.