---
title: Reading OPC UA with Edge Server
description: Configure an OPC UA client on the ControlCom Edge Server to read nodes from any OPC UA server into platform variables.
source: https://documentation.controlcomtech.com/build/edge-server/clients/opc-ua
---

# Reading OPC UA Data with ControlCom Edge Server

An OPC UA client connects the Edge Server to an OPC UA server (Kepware, Ignition, Siemens, B\&R, or any other compliant server) and reads selected nodes into platform variables. You configure it from the platform in the device's SDK Configuration editor; the Edge Server picks the configuration up on its next restart.

> **Workflow Stage: Collect**

## Prerequisites

The Edge Server must already be onboarded as a ControlCom Gateway. The [Edge Server getting started guide](https://documentation.controlcomtech.com/build/edge-server/getting-started) covers deployment and onboarding.

Each node you read needs a variable on the gateway to receive it. Create those first (see [Creating a Variable](https://documentation.controlcomtech.com/build/edge-server/creating-a-variable)); you select each variable by its Topic Property Path when you add an item below. The item editor also has a **Create New Variable** button if you prefer to create them as you go.

## Creating an OPC UA Client

1. Open **Devices** under **System** in the sidebar and select the onboarded gateway.
2. Open the **Edge Server** tab. The **SDK Configuration** editor opens on its **Clients** tab.
3. Click **Add Client** and choose **OPC UA** in the **Add New Client** dialog.

The new client opens in a side panel and also appears as a card on the Clients tab; click the card to reopen it later. New clients start disabled.

![Edge Server Clients tab](https://documentation.controlcomtech.com/images/devices/edge-server-clients-screen.png)

*Edge Server tab with no clients yet. Click Add Client to begin*

![Add New Client dialog](https://documentation.controlcomtech.com/images/devices/edge-server-add-client-screen.png)

*Add New Client dialog with Modbus TCP, Modbus RTU, OPC UA, BACnet, and Ethernet/IP options*

The client panel has three tabs: **Connection**, **Settings** and **Items**.

### Connection

1. Enter a **Client Name**.
2. Enter the **OPC Endpoint URL** of the server, for example `192.168.1.100:4840` or `opc.tcp://192.168.1.100:4840`. The default OPC UA port is `4840`.
3. Turn on **Enable Client**.

### Settings

The Settings tab holds maintenance actions: **Remove Client** deletes the client from this configuration, **Export Variables** downloads the item list as a CSV for bulk editing, and **Import Variables** loads an item list from a CSV.

### Items

An item is one node read from the server. Click **Add Item**, then select the new entry in the list on the left.

On the **General** tab:

1. Enter the **Node ID** of the node to read, for example `ns=2;s=Temperature` or `ns=3;i=1001`.
2. Enter the **Attribute ID**. It defaults to `13`, the node's Value attribute, which is what you want in nearly every case. Other attributes are `1` (NodeId), `2` (NodeClass) and `3` (BrowseName).
3. Select the **Topic Property Path**, which is the variable that receives the value. The item's data type (number, boolean or string) follows the selected variable.
4. Optionally select a **Write Variable** to let the platform write to this node when a matching command is sent. The default is **No Write Allowed**.

On the **Scaling** tab (number items only), **Scale** (defaults to `1`) multiplies the raw value, **Offset** (defaults to `0`) is added after scaling, and **Decimals** (defaults to `2`) rounds the result. If the server reports `857` and the real value is `8.57`, set Scale to `0.01`.

On the **Misc** tab, **Send if Stale After (ms)** forces a publish when the value has not changed in that time (defaults to `10000`, ten seconds), and **Deadband Percentage** (defaults to `5`, number items only) suppresses changes smaller than that share of the previous value.

On the **Transforms** tab you can add [Value Transforms](https://documentation.controlcomtech.com/build/edge-server/data-processors#value-transforms) that rewrite the value before it is published.

## Saving

Click **Save Configuration** in the editor header, then confirm with **Save Configuration** in the **Save SDK configuration?** dialog. The configuration is stored on the platform; the gateway applies it on its next restart.

## Deployment

The Edge Server reads its configuration when it starts, so a restart is what puts the new client into service. There are two ways to trigger one.

From the platform, open the gateway's **Details** tab and click **Restart** in the **Send command** panel. The Edge Server restarts and reconnects with the new configuration. [Edge Server Management](https://documentation.controlcomtech.com/platform/devices/edge-server#sdk-commands) describes the full set of SDK commands.

On the gateway itself, restart the container as described in the [Edge Server getting started guide](https://documentation.controlcomtech.com/build/edge-server/getting-started).

![Restarting Device](https://documentation.controlcomtech.com/images/devices/device-details-page.png)

*The Details tab, with the Send command panel used to restart the Edge Server*
