---
title: Configuring a Modbus TCP collector
slug: how-tos/RYM_-con
docTags: XvgE82X7SfoIRBJdtS4Hy,GOo15ntkoXThxPf_Z8vVm
createdAt: 2025-09-22T18:47:54.996Z
---

The **Modbus TCP collector** in Factry Historian allows you to connect to a Modbus TCP server and collect process values. Once configured the collector will historize those values so they are available for trending, reporting, and further analysis in Factry Historian.

## Prerequisites

- You have permissions in Factry Historian to *manage* collectors. See [Privileges](docId\:K2NnYEcUxqQsiuCLmpfKH).
- An installed Modbus collector. If you have not done so already, first [install the collector](docId\:Iv4_SD56TdxcqKRKCj4kv).
- A working Modbus TCP connection to the Modbus server. If you are running into issues or setting this up for the first time, follow our guide to [test a Modbus TCP connection](docId\:f44BsGWVgI69fcHVnkBoj).
- A configured [time-series database](docId\:F8UdoT0apxmjws-t-GcPV) to write the collected data to.

## Configure the collector

After installing the collector, you should see it in the Collectors overview in Factry Historian. Its <font color="#46abdd">**initial**</font> state indicates the collector has established a connection to Factry Historian and is awaiting configuration.

![](https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/Ylo6Pky3fmCIEUcTh_NgA_image.png)

To configure the collector, select it from the Collectors overview and click the **Edit** button. Configure the following fields:

### Endpoint

This is the host and port of the Modbus TCP server the collector will connect to. You may write it with a scheme or simply as `host:port`. Examples:

:::BlockQuote
tcp\://\<hostname>:\<port>
:::

For example:

:::BlockQuote
tcp\://localhost:502
:::

This field must be provided. The collector cannot connect without a valid endpoint.

### ByteOrderDefault

Defines the default byte-and-register ordering the collector uses to reconstruct multi-register values (32/64-bit) from 16-bit Modbus registers. Modbus returns 16-bit words, how those words and their bytes are combined determines whether a value is interpreted correctly. Keep a conservative global default and override it per-measurement when a device requires different ordering.

Supported values (exact tokens):

- **AB-(CD)-(EF-GH)**
  Big-endian byte and register order (common default).
- **BA-(DC)-(FE-HG)**
  Little-endian byte and register order.
- **(HG-FE)-(DC)-BA**
  Inverted register order, little-endian bytes.
- **(GH-EF)-(CD)-AB**
  Inverted register order, big-endian bytes.

The collector uses **AB-(CD)-(EF-GH)** unless you explicitly change it. Set this once when most devices use the same ordering; prefer per-measurement overrides for outliers.

:::hint{type="info"}
If multi-register reads show wrong sign, swapped halves, or incorrect scaling, verify the device’s byte/register order rather than globally changing the default.
:::

Then, click **Save**.

### Expected outcome

After you have configured the collector, a green **Start** button will appear in the top right corner of the collector page.

1. Click **Start** to launch the collector.

If the connection is successful, the collector status will change to <font color="#15803D">**Collecting**</font>.

### Troubleshooting

If the collector fails to connect or you see frequent timeouts:

- Verify network connectivity from the collector host to the Modbus server and that the configured port (typically 502) is open.
- Confirm **ByteOrderDefault** (or a per-measurement override) matches the device's register/byte order.
- Reduce concurrent requests or distribute measurements across multiple collectors if the server is overloaded.
- Inspect collector logs for specific error codes and timings to determine whether failures are network, device, or polling-strategy related.

## Best practices

### Timestamps

Make sure all clocks (collector, server, devices) are synchronised (for example using NTP) so timestamps are correct.

### Multiple devices through a single Modbus gateway/server

If you connect multiple devices through a single Modbus gateway or device:

- **Avoid polling too many devices at the same time**, stagger polling intervals or distribute measurements across collectors.

## Limits

A single Modbus TCP collector can handle thousands of measurements depending on polling rates, network quality and device responsiveness. If you hit hard limits (CPU, RAM, network) at the Modbus server or gateway, consider splitting measurements across additional collectors as a last resort.
