> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-vi-scada/datran-opc-da/opc-client.md).

# Connect DATRAN to another OPC server

Use DATRAN's OPC Client Interface to link DATRAN nodes to items in another OPC DA server: data servers, groups and OPC client items.

The OPC Client Interface allows DATRAN VI to access information from OPC servers and programs that provide an OPC server data access interface. Any node in the DATRAN VI tree base database can be linked to an OPC item in an OPC server. When the data in the OPC server changes, the change will be reflected in the DATRAN VI tree base database as well. When the linked value in the DATRAN VI tree base database is changed, the new value is automatically poked to the OPC server to reflect the change. This enables the DATRAN system to be used as a point of integration for a SCADA system which has multiple data sources from different vendors.

{% hint style="info" %}
**Applies to:** DATRAN OPC Client Interface 1.0, with DATRAN VI V6.60 or later. It connects to OPC DA 1.0 and 2.0 servers. This service has individual licensing requirements and a software key is required from QTech.
{% endhint %}

The OPC Client Interface achieves this using **Data Servers**, **Groups** and **OPC Client Item**.

## 1. Add a data server

Add a Data Server link to the OPC Client Interface configuration.

| Property        | Default    | What it is                                                                                                                                                                                                                                                                                                                                 |
| --------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| OPC Server Name | (required) | This specifies the name of the OPC server e.g. `Intellution.DVIOPC`, `Archestra.FSGateway.1`, etc. This property is not case sensitive. A list of OPC servers that have been installed on the same computer as OPC Client Interface is available by double clicking on the OPC Client Interface node. Select the **OPC Server Names** tab. |
| Computer Name   | Blank      | This specifies the name or IP address of the computer where the OPC server is installed. The value of this property can be left blank if the OPC server is installed on the same computer as where OPC Client Interface is installed.                                                                                                      |
| Normal Delay    | 0 ms       | This specifies the delay between Data Server creation (via New Data Server button) or redefinition (via Apply Data Server button) and actually attempting the connection to the OPC server.                                                                                                                                                |
| Reconnect Time  | 1 minute   | This specifies the length of time between reconnection attempts when a connection to an OPC server fails.                                                                                                                                                                                                                                  |
| Start up Delay  | 0 ms       | This specifies the delay between program startup and actually attempting a connection to the OPC server.                                                                                                                                                                                                                                   |

If the OPC server is accessible, the **State** will change to "The OPC server is running normally". If the **State** remains **Disconnected** then the connection could not be made: see [The OPC Client shows Disconnected or can't reach a remote server](https://help.qtech.co.nz/datran/datran-vi-scada/datran-opc-da/troubleshooting/client-disconnected.md).

The data server also shows read-only information from the OPC server: the items it has (**Available Items**), **Bandwidth Usage**, its current and start times, **Group Count**, the time of its last update, the OPC versions it supports, **Vendor Info** and **Version**.

## 2. Add a group

Add a default Group to the **Groups** node. It is recommended that one group be used for one OPC server unless there is a specific need to have certain OPC Client Items on different Update Rates. The higher the Update Rate, the higher the Bandwidth Usage will be.

## 3. Link a DATRAN node to an item

1. Insert a `_OPC_Client_Item_` underneath a node where you wish the value to be replaced.
2. By creating an `_OPC_Client_Item_` node its parent node will be connected to another OPC server. This should have at least 3 of its editable properties setup i.e. Data Server, Group and Item ID:

| Property            | Default       | What it is                                                                                                                                                                   |
| ------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Data Server         | (required)    | This should contain a string of one of the Data Servers that has already been setup.                                                                                         |
| Group               | (required)    | This should contain a string of one of the Groups that is under the Data Server that has been specified. This is case sensitive.                                             |
| Item ID             | (required)    | This should contain a string of one of the Available Items under the Data Server. The format is usually `Topic:Item` e.g. `Site 1: Point 1`.                                 |
| Enabled             | True          | If this is false then this OPC Client Item will not be updated. Also, when this is false changes in values will not be poked to the OPC server.                              |
| Read Only           | False         | If this is true (1) then the corresponding item in the OPC server will never be written to.                                                                                  |
| Requested Data Type | Empty/Default | This specifies the type of data to be returned by the OPC server. Passing Empty/Default means the OPC Client Item will accept the OPC server's canonical (native) data type. |

The item also shows read-only details: **Access Rights** (read, write or both), **Blob Size**, **Native Data Type**, **Quality** and **Time stamp** (when the value last changed in the OPC server).

If the item shows an error, see [An OPC Client Item shows an error or doesn't update](https://help.qtech.co.nz/datran/datran-vi-scada/datran-opc-da/troubleshooting/item-error.md).
