You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Connecting to a Kepware OPC UA Server involves configuring KepServerEx, creating and managing security certificates, and establishing connections within your solution. You will enable OPC UA support in KepServerEx, define endpoint settings, and export its certificate. Then, you will generate separate certificates for engineering and runtime components using the utility (UaClientConfigHelperNet4.exe). These certificates must be imported into KepServerEx to establish trust. You will create an OPC UA channel within your solution, configure a node using the Kepware URL, and test the connection. Finally, you will define points and assign OPC UA tags, discoverable through a browsing interface. This process allows you to bridge Kepware's industrial data with your software platform for centralized monitoring, control, and automation.

On this page:


System Requirements

To use this feature, the following system requirements must be met.

  • KepServerEx V5 (or higher).
  • OPC UA Protocol

How to Use

The procedure for a successful OPC UA connection is divided into three main steps.

  • KepServerEx OPC UA Server Configuration
  • Creating certificates for Engineering and Runtime
  • Importing client certificates on OPC UA

KepServerEx Configuration

In the KepServerEx Solution properties, enable support for OPC UA. Use the command “Reinitialize” after changing the settings so they can be applied.

In the Server EndPoints tab, set the endpoint parameters (network adapter, port number, and security policies), and copy the URL for later use.

For the security policies configuration, you need to enable one (or both) of the following:

  • Basic256.
  • Basic128Rsa15.

On the Instance Certificates page, click the Export server certificate... button and select a folder to save the certificate for the OPC UA Server.


Engineering and Runtime Configuration

In your Solution, go to Devices → Channels and create a new OPC UA channel.

On Devices → Nodes, paste the OPC URL (copied from the previous section) in the PrimaryStation configuration popup. Fill in the remaining parameters accordingly.

For the Server Endpoint URL, you should NOT change from 127.0.0.1 to localhost. The Endpoint needs to be the same one used in the Server Instances Tab.

Then, click the Certificates button to launch the UaClientConfigHelperNet4.exe tool. Make sure the file is launched with Administrator privileges.

You can also launch the certification tool (with admin rights) from the product's installation folder.

..\fs-9.1\UaClientConfigHelperNet4.exe.

Follow the steps below to create a certificate:

  • With the exe opened, browse for the application (\fs-9.1\TManagerExe.exe).
  • Click Create UA Configuration, Edit UA Configuration, and click Certificates.
  • Click the Create button.
  • Click Server Certificates, the Import button, and select the server certificate created by the Kepware application.
  • Click Export.
  • Click OK, and Save and Close.

The steps above are illustrated in the image below.


Importing Client certificates and Testing Connection

Back at KepServerEx, import the two certificates created in the previous section. Go to the OPC UA Configuration Manager → Trusted Clients Tab.


Once the certifications have been trusted, we can test our connection. On the Solution's Devices → Nodes page, open the PrimaryStation configuration popup and click Test. If this was done correctly, you should see an "OK" status.


Lastly, on Devices → Points, create a row for our OPC Node and assign a Tag to it. In the Address column, you will be able to browse for every available Tag found on the Server in a TreeView style popup.



OPCServer Available Data

f the data available in the OPC Server originates from internal data (server information and diagnostics) or from a simulation channel, it can be exchanged by exception, allowing the Enable Read Polling checkbox in the FS Node to be unchecked.

If you are using the Kepware OPC UA Client or another device, you will need to enable the FS Node Enable Read Polling checkbox.


Running a Test

We suggest running a test to ensure the connection and data exchange are working properly and that the internal data from the OPC Server Kepware, such as _System._Time_Second or any simulation value, is being read.


In this section:

Error rendering macro 'pagetree'

null

  • No labels