# PFC200 Modbus TCP Master: Unstable connection when accessing multiple RTU devices behind TCP/RTU gateway – how to handle Unit-IDs correctly?

**URL:** <https://www.wago.community/t/pfc200-modbus-tcp-master-unstable-connection-when-accessing-multiple-rtu-devices-behind-tcp-rtu-gateway-how-to-handle-unit-ids-correctly/2509>\
**Category:** CODESYS\
**Tags:** pfc200\
**Created:** [January 15, 2026, 2:55pm UTC](https://www.wago.community/t/pfc200-modbus-tcp-master-unstable-connection-when-accessing-multiple-rtu-devices-behind-tcp-rtu-gateway-how-to-handle-unit-ids-correctly/2509 "2026-01-15T14:55:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvogt](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/mvogt/32/2101_2.png) [@mvogt](https://www.wago.community/u/mvogt)\
**Post date:** [January 15, 2026, 2:55pm UTC](https://www.wago.community/t/pfc200-modbus-tcp-master-unstable-connection-when-accessing-multiple-rtu-devices-behind-tcp-rtu-gateway-how-to-handle-unit-ids-correctly/2509/1 "2026-01-15T14:55:09Z")

</div>

Hello everyone,

I am working with a **WAGO PFC200 (750-8212)** as **Modbus TCP Master** and I am experiencing unstable connections when communicating with multiple Modbus RTU devices behind a TCP/RTU gateway.

**Setup**

- Controller: **WAGO PFC200**

- Modbus TCP Master (CODESYS)

- Gateway: **Waveshare RS485 → Ethernet (Modbus TCP to RTU)**

- Field devices: several **Growatt inverters** on one RS485 bus

- Each inverter has its own **Modbus RTU address**

- Communication via **one IP / one port**

For comparison:

- **Node-RED running on a separate system (not on the PFC200)** communicates stably with the same gateway and devices. (Only for testing purpose, Scrrenshot was taken when NODE-RED was stopped)

**Observed behavior**

With the PFC200 I tried to configure one Modbus TCP Slave per inverter.

This allows communication, but results in:

- multiple parallel TCP connections to the same gateway

- frequent reconnects and dropped connections

- unstable long-term operation

I am trying to understand what the correct or recommended approach is in this situation.

**Questions**

- How should multiple RTU devices behind a TCP/RTU gateway be addressed using the WAGO Modbus TCP Master?

- Is it expected to use multiple Modbus TCP Slave objects, or a single one?

- How are Modbus RTU addresses (Unit-IDs) intended to be handled in such a setup?

- Are there any best practices for achieving a stable connection in this scenario?

 ![Bildschirmfoto 2026-01-15 um 15.51.55](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/5/52bc549be9d9a8c8fe048ebc567084655bf2278c.png)

I wanted to include more screenshots, but since I´m new to wago I can´t include more.

Thanks a lot for any hints or guidance.

Best regards

**Moritz**

---

<div class="post-metadata">

**Author:** ![Dennis2004](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@Dennis2004](https://www.wago.community/u/Dennis2004)\
**Post date:** [January 16, 2026, 4:50am UTC](https://www.wago.community/t/pfc200-modbus-tcp-master-unstable-connection-when-accessing-multiple-rtu-devices-behind-tcp-rtu-gateway-how-to-handle-unit-ids-correctly/2509/2 "2026-01-16T04:50:54Z")

</div>

For one RTU-line use one TCP-client. Otherwise, parallel requests from multiple clients are queued inside the gateway, leading to response delays and “unstable communication”.

---

<div class="post-metadata">

**Author:** ![Thruser](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@Thruser](https://www.wago.community/u/Thruser)\
**Post date:** [January 16, 2026, 7:10am UTC](https://www.wago.community/t/pfc200-modbus-tcp-master-unstable-connection-when-accessing-multiple-rtu-devices-behind-tcp-rtu-gateway-how-to-handle-unit-ids-correctly/2509/3 "2026-01-16T07:10:12Z")

</div>

Hi,

you can manully program a queue/joblist like [here](https://www.wago.community/t/modbustcp-wahrend-laufzeit-server-slave-hinzufugen-auslesen-schreiben/2470), or use the digital twin like [here](https://www.wago.community/t/modbus-rtu-ecockpit-pfc100-750-8100-750-652/1530/6).

---

<div class="post-metadata">

**Author:** ![mvogt](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/mvogt/32/2101_2.png) [@mvogt](https://www.wago.community/u/mvogt)\
**Post date:** [January 16, 2026, 8:45am UTC](https://www.wago.community/t/pfc200-modbus-tcp-master-unstable-connection-when-accessing-multiple-rtu-devices-behind-tcp-rtu-gateway-how-to-handle-unit-ids-correctly/2509/4 "2026-01-16T08:45:53Z")

</div>

Thank you for your reply.

How can multiple Modbus slave IDs be addressed when using a Modbus TCP client?

Is there any example or documentation available that demonstrates this setup?

---

<div class="post-metadata">

**Author:** ![Thruser](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@Thruser](https://www.wago.community/u/Thruser)\
**Post date:** [January 16, 2026, 9:21am UTC](https://www.wago.community/t/pfc200-modbus-tcp-master-unstable-connection-when-accessing-multiple-rtu-devices-behind-tcp-rtu-gateway-how-to-handle-unit-ids-correctly/2509/5 "2026-01-16T09:21:10Z")

</div>

Hi,

```auto
    Jobliste: ARRAY [0..1] OF typMbQuery := [ 
        ( //JOB 0, read inputs
            bUnitId:= 1, 
            bFunctionCode:= 3, 
            uiReadAddress:= 0, 
            uiReadQuantity:= 30, // read the first 30 registers?
            uiWriteAddress:= 0, 
            uiWriteQuantity:= 0, 
            awWriteData:= [125(0)]
        ),
        ( //JOB 1, write outputs (register access)
            bUnitId:= 1, 
            bFunctionCode:= 16, 
            uiReadAddress:= 0, 
            uiReadQuantity:= 0, 
            uiWriteAddress:= 0, 
            uiWriteQuantity:= 1, 
            awWriteData:= [125(0)]
        )];

```

With bUnitId you define the slave address. With each request you can set different ID.

You have to configure your gateway to forward this ID as address.

There are two types of gateways that I have seen. Some will forward the unit ID, others will use different TCP ports for different slave addresses. The latter one you cannot use with this code example. Some of the gateways you can configure for both methods.
