> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/configure-ios/communication-protocol-ios/opc-ua-da/connect-the-hardware.md).

# Connect the Hardware

## OPC UA

### Connect devices using standard Ethernet cables

OPC UA communication operates over **Ethernet (TCP/IP)** and uses the simulator’s **built‑in LAN ports**. To establish a connection between OPC servers (devices or gateways) and OPC clients (SCADA, HMI, or engineering tools), simply connect all devices using standard Ethernet cables connected to the same network infrastructure (switch or router).

### Set IP addresses and subnets

For reliable OPC communication, all devices must follow standard IP networking rules:

* OPC clients and OPC servers must be reachable over the network and typically reside in the same IP subnet, unless proper routing is configured.
* Each physical device or computer must have a unique IP address to prevent network conflicts.
* Multiple OPC servers may run on the same device and share a single IP address, as long as they expose different server endpoints or program identifiers.

Example of valid subnet configuration:

* OPC Client (SCADA): `192.168.10.10 / 255.255.255.0`
* OPC Server 1 (PLC Gateway): `192.168.10.20 / 255.255.255.0`
* OPC Server 2 (Simulator): `192.168.10.30 / 255.255.255.0`

### Set the communication port

OPC UA typically uses **TCP port 4840** by default for binary TCP communication. This port can be changed if required by your application or security policies.

* Multiple OPC UA servers can run on the same device if they use different endpoint URLs or port numbers.
* OPC UA clients must be configured to connect to the correct endpoint and port for each server.

Ensure that:

* Firewalls allow inbound and outbound traffic on the selected OPC UA port.
* The client is configured with the correct security policy and endpoint URL.

### Connect the OPC UA client to the OPC UA Server on the simulator

To connect an OPC UA client to the OPC UA Server running on the simulator, configure the client with the following server address format: `opc.tcp://xxx.xxx.xxx.xxx:4840`

Where:

* `xxx.xxx.xxx.xxx` is the IP address of the simulator
* `4840` is the default OPC UA TCP port. If required, the TCP port can be modified. Ensure that the OPC UA client uses the same port value configured in the server.

## OPC DA

### Connect devices using standard Ethernet cables

OPC DA communication operates over **Ethernet (TCP/IP)** and uses the simulator’s **built‑in LAN ports**. To establish a connection between OPC servers (devices or gateways) and OPC clients (SCADA, HMI, or engineering tools), simply connect all devices using standard Ethernet cables connected to the same network infrastructure (switch or router).

### Set IP addresses and subnets

For reliable OPC communication, all devices must follow standard IP networking rules:

* OPC clients and OPC servers must be reachable over the network and typically reside on the same IP subnet, unless proper routing is configured.
* Each physical device or computer must have a unique IP address to avoid network conflicts.
* Multiple OPC servers may run on the same device and share a single IP address, provided they expose different server endpoints (OPC UA) or program identifiers (OPC DA).

Example of valid subnet configuration:

* OPC Client (SCADA): `192.168.10.10 / 255.255.255.0`
* OPC Server 1 (PLC Gateway): `192.168.10.20 / 255.255.255.0`
* OPC Server 2 (Simulator): `192.168.10.30 / 255.255.255.0`

### OPC DA‑specific networking considerations

OPC DA communication relies on **Microsoft COM/DCOM**, which operates over IP networking and is tightly coupled to the Windows operating system. As a result, additional configuration is required.

To establish an OPC DA connection:

* Both the OPC DA client and server must run on **Windows systems**.
* Machines should belong to the same Windows domain or a trusted workgroup.
* Devices must be connected via standard Ethernet networking.
* Proper **DCOM configuration**, user permissions, and firewall rules must be in place.

### Set the communication ports

OPC DA does not use a single fixed TCP port. Instead, DCOM relies on:

* **TCP port 135** (RPC Endpoint Mapper)
* A range of **dynamically assigned high TCP ports**

Ensure that:

* Firewalls allow DCOM traffic or are configured with restricted, predefined port ranges.
* DCOM security settings (launch, access, and identity permissions) are correctly configured on the OPC DA server machine.

### Connect the OPC DA client to the OPC UA Server on the simulator

Although the simulator runs an **OPC UA Server**, it is possible to connect a **classic OPC (OPC DA) client** by using the [Cogent DataHub® gateway](https://cogentdatahub.com/products/datahub-opc-gateway/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/configure-ios/communication-protocol-ios/opc-ua-da/connect-the-hardware.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
