# ModBus TCP

### Modbus TCP Data Connector

The **Modbus TCP Data Connector** enables Tricloud Nexus to connect with industrial devices and control systems that use the Modbus TCP protocol - a widely adopted standard for communication between PLCs, sensors, meters, and other plant floor equipment. Like all data connectors in Tricloud Nexus, the Modbus TCP connector is designed to run at the Edge, providing fast, reliable data acquisition directly from your local network devices - even if the site is temporarily offline.

***

### Key Features

* **Edge-Based Operation:** Runs locally on Edge devices for real-time, low-latency integration with Modbus TCP devices or servers.
* **Flexible Scan & Publish Intervals:** Control how frequently data is polled from Modbus devices and published into your asset hierarchy.
* **Configurable Byte & Word Order:** Ensure correct interpretation of multi-byte and multi-word values, supporting both little and big endian formats.
* **Easy Integration:** Connects to standard Modbus TCP slaves - no special drivers or custom software required.
* **Consistent Data Model:** All values collected are normalized into the Tricloud Nexus unified measurement format, ready for analytics, storage, or cloud integration.

***

### Configuring ModBus TCP Data Connector

**1. Add a New Connector**

* Select the **Area** node where you want to configure Modbus TCP integration.
* Go to the **Data connectors** tab.
* Click **+ New data connector**, choose **Modbus TCP**, and enter a name (e.g., `ModBusTcpServer`).

<figure><img src="/files/iMuGksLTesecXjCIHo3y" alt="" width="563"><figcaption><p>Add a new Data Connector</p></figcaption></figure>

**2. Configure Connection Settings**

<figure><img src="/files/BwimPqGttddXwXZqmH85" alt="" width="374"><figcaption><p>Configuration of ModBus TCP Connector</p></figcaption></figure>

* **Name:** Friendly name for your connector (e.g., `ModBusTcpServer`).
* **Enabled:** Toggle to activate or deactivate this connector.
* **Slave Connection:** The IP address (or hostname) of the Modbus TCP slave device (e.g., `123.10.10.123`).

**3. Configure Polling and Publishing**

* **Scan Interval (ms):** How often (in milliseconds) the connector will poll the Modbus device for data. (e.g., `1000` ms = once per second)
* **Publish Interval (ms):** How often (in milliseconds) collected data is published into the Tricloud Nexus system. You may use the same value as the scan interval, or set a higher/lower value to control data update rates.
  * **Note:** The publish interval should not be smaller than the scan interval. In most cases, set publish interval equal to the minimum scan frequency. For heavy workloads, a higher publish interval can optimize communication and performance.

**4. Byte & Word Order**

* **Byte Order:** Choose how bytes are ordered for multi-byte values - options are *Little* or *Big* endian. Select the setting that matches your Modbus device’s configuration.
* **Word Order:** Choose how words are ordered for multi-word (e.g., 32-bit or 64-bit) values - *Big* or *Little*. This ensures correct interpretation of all data types.

***

#### Example Modbus TCP Connector Configuration

| Setting               | Example Value   |
| --------------------- | --------------- |
| Name                  | ModBusTcpServer |
| Slave Connection      | 123.10.10.123   |
| Scan Interval (ms)    | 1000            |
| Publish Interval (ms) | 1000            |
| Byte Order            | Little          |
| Word Order            | Big             |

***

### Best Practices

* **Align scan and publish intervals** to your process requirements; higher scan rates increase data resolution, but also network and processing load.
* **Verify byte and word order** in your device documentation to ensure accurate data reads - incorrect settings can result in swapped or misinterpreted values.
* **Use clear connector names** to simplify troubleshooting and system management.
* **Test your configuration** with live equipment before moving to production.
* **Buffering:** Remember, the connector will continue to collect and buffer data locally at the Edge during network outages, ensuring data continuity.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tricloudnexus.io/management-portal/designer/assets/data-connectors/modbus-tcp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
