---
title: OPC UA Client Advanced
slug: manufacturing-connect-edge/opc-ua-client-advanced
docTags: 
createdAt: 2022-06-03T14:19:31.000Z
---

Review the following information for setting up and configuring the OPC UA Client Advanced.&#x20;

# Manufacturing Connect Edge Compatible Series&#x20;

| Compatibility parameter      | Compatible items                                                                                                            |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Driver type**              | Ethernet                                                                                                                    |
| **Functionality&#x20;**      | - Recommended driver to use to connect to an OPC UA Server.
- Has subscribe and polling modes.                              |
| **Replaces Gen 1 driver(s)** | OPC UA Client<br />OPC UA Client Poll<br />Learn more about [Gen1 and Gen2 Driver Differences](docId:-9115fVEfZe7BsO1p2lTd) |

# Step 1: Set up and Configure the PLC Device

To find the network parameters of the driver, you have the option of using the [Device Discovery Tool](docId:9iWansZfHJey9YTgR4f-S). Otherwise, set up the device for Ethernet access and collect the network parameters.&#x20;

**To use the device discovery tool:**

1. &#x20;Navigate to **DeviceHub&#x20;**> **Devices**.
2. Click **Add New Device**.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/y_fa3OTvkiOCXn6CN9L2h_addnewdevice.png" size="80" width="1078" height="645" caption="Add New Device icon" position="center" showCaption="true"}
3. Click the **Device Type** drop-down list and select **OPCUA**.
4. Click the **Driver Name** drop-down list, and select **OPC UA Client Advanced**.
5. Click **Device Discovery**.&#x20;
   Th&#x65;*&#x20;Device Discovery* dialog box appears.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/jYG0hPnkovERIKbN1NR2-_connectdeviceopcua.png" size="80" width="1165" height="739" caption="Device Discovery opti" position="center" showCaption="true"}
6. Select only one of the following fields to use for discovering the device.&#x20;
   - **Discovery Server URL (Servers and Endpoints Discovery)**: No prior setup/configuration is needed to use this field. Replace **localhost** with the appropriate IP address or domain name that will be used to search for the device. Ensure the correct port number is entered.&#x20;
   - **Server URL (Endpoints Discovery)**: You'll need to enable/configure the server to use this field. Replace **localhost** with the appropriate IP address or domain name that will be used to search for the device. Ensure the correct port number is entered.
7. Delete all text from the field not being used.&#x20;
8. Click **Start discovery**. When the search is complete, available servers with corresponding security policies will be listed.&#x20;
9. Click the appropriate server/security policy, and then click **Update form with discovery results**.
   The *Connect Device* dialog box appears with *Server URL*, *Security Policy*, and *Security Mode* pre-filled based on the discovery results.&#x20;
10. In the **Driver Mode** field, select either **Polling&#x20;**&#x6F;r **Subscription**.&#x20;
11. Move onto Step 2 and continue configuring the device with the remaining parameters.&#x20;

# Step 2: Set up the PLC Device in Manufacturing Connect  Edge DeviceHub

Configure the following parameters when you [Connect a Device](docId\:RFVIJdxz7DBAd8mwbismA) with this driver. Update default values to the specific set up of your device.&#x20;

| Parameter                                       | Value                                     |
| ----------------------------------------------- | ----------------------------------------- |
| **Type**                                        | OPC UA                                    |
| **Driver**                                      | OPC UA Client Advanced                    |
| **Driver Mode**                                 | Polling or Subscription                   |
| **Server URL**                                  | The server endpoint URL defined in Step 1 |
| **Security Policy**                             | The policy you defined in Step 1          |
| **Security Mode**                               | The mode you defined in Step 1            |
| **Certificate**                                 | Auto-generated                            |
| **Private Key**                                 | Auto-generated                            |
| **Auth Mode**                                   | Anonymous, Certificate, or UserName       |
| **Disable Error Certificate Host Name Invalid** | false or true                             |
| **Default Root**                                | Start node to browse the server           |

# Configure the List of Registers

Browse for tags to add to this FreeTag device. See [Browse Tags](docId\:OLXXOdRwNLM-IkP2gPS-4) to learn more.&#x20;

Alternatively, when you [Add Tags](docId\:h5heqIcXrCY3NCH9KBg9I), for **Register Name** map the OPC server tags to the client using this format: `ns=1;s=tagname`.

Example: `ns=2;s=Demo.Static.Scalar.Boolean`

The following data types are supported:&#x20;

- `bool`
- `sbyte`
- `byte`
- `int16`
- `uint16`
- `int32`
- `uint32`
- `int64`
- `uint64`
- `float32`
- `float64`
- `string`
- `BLOB`
- `bool[]`
- `sbyte[]`
- `byte[]`
- `int16[]`
- `uint16[]`
- `int32[]`
- `uint32[]`
- `int64[]`
- `uint64[]`
- `float32[]`
- `float64[]`
- `string[]`
- `BLOB[]`

Refer to the following tag parameters.&#x20;

## Tag Parameters

- **Name**: Enter a name based on this format: `ns=1;s=tagname`.
  - Example: `ns=2;s=Demo.Static.Scalar.Boolean`
- **Value Type**: Select a data type from the drop-down list.&#x20;
- **Polling Interval**: Enter a value in seconds. This determines how often the tag should poll the register for data.
- **Tag Name**: Enter a name for the tag.&#x20;
- **Description** (Optional): Enter a description for the tag. &#x20;
- **Tag Formula**: Enter a formula for the tag to process the generated data. Two variables are permitted: `value` (current tag value) and `timestamp` (current tag UNIX time in milliseconds). The following math functions are available:
  - sin
  - cos
  - sqrt
  - tan
  - power: power(`x`) performs the operation `10^x`.
  - log: log(`x`) is the natural logarithm (the logarithm is in base `e`).&#x20;
  - exp: exp(`x`) performs the operation `e^x`.
- **Only Publish on Change of Value**: Select the checkbox to customize NATS messages to be published only when the *value&#x20;*&#x70;arameter changes from a previous value to a new one. *Change of Value* only applies to boolean, numeric (such as int or float), and simple string data types. It does not apply to complex types, such as JSON or array. Poll-once topics will not be affected by *Change of Value* settings. These topics will still only see a single message.&#x20;
- **Meta Data**: Metadata summarizes basic information about data. This feature allows you to define key-value pair data for the device output payload later on. It can then be used to find, use, and reuse particular instances of data.&#x20;

:::hint{type="info"}
**Note**: If you use special characters in meta data key names, the special characters are replaced with underscore characters in the payload. This can cause two key names to be combined into one. For example, configuring the key names a\*\*b and a&\&b will cause only one key name to be created (a\_\_b).&#x20;
:::

