# MODBUS TCP Communications hang after 4 to 12 hours of polling

**URL:** <https://discourse.nodered.org/t/modbus-tcp-communications-hang-after-4-to-12-hours-of-polling/81803>\
**Category:** Industrial\
**Created:** [5 October 2023 13:41 UTC](https://discourse.nodered.org/t/modbus-tcp-communications-hang-after-4-to-12-hours-of-polling/81803 "2023-10-05T13:41:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wn007](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@wn007](https://discourse.nodered.org/u/wn007)\
**Post date:** [5 October 2023 13:41 UTC](https://discourse.nodered.org/t/modbus-tcp-communications-hang-after-4-to-12-hours-of-polling/81803/1 "2023-10-05T13:41:20Z")

</div>

We are using Node-Red 2.1.4, Node.js 16.12. Modbus is handled by node-red-contrib-modbus version 5.27.2

I am using flex-getter and setter and cascading the read requests to an EATON PLC. The only way to recover communication is to power cycle the PLC. I was told by EATON that the MODBUS requests need to explicitly close the MODBUS connecton after each request but I cannot find that option with the MODBUS TCP node.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 October 2023 16:03 UTC](https://discourse.nodered.org/t/modbus-tcp-communications-hang-after-4-to-12-hours-of-polling/81803/2 "2023-10-05T16:03:33Z")

</div>

> [@wn007](#):
>
> I was told by EATON that the MODBUS requests need to explicitly close the MODBUS connecton after each request

Sounds like a cop out for their own device firmware deficiency to me 🤔

> [@wn007](#):
>
> node-red-contrib-modbus version 5.27.2

Odd. The version in the catalogue is `5.26.0`

> [@wn007](#):
>
> I am using flex-getter and setter and cascading the read requests to an EATON PLC

What frequency are you reading and writing?

Can reads be grouped to avoid unnecessary polling?

---

<div class="post-metadata">

**Author:** ![wn007](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@wn007](https://discourse.nodered.org/u/wn007)\
**Post date:** [5 October 2023 17:18 UTC](https://discourse.nodered.org/t/modbus-tcp-communications-hang-after-4-to-12-hours-of-polling/81803/3 "2023-10-05T17:18:34Z")

</div>

I installed the "latest" version of MODBUS TCP shown in the Github repo.

I have essentially grouped the polling reads for I/O to one flex-getter per inputs and one for outputs. Within that grouping I cascade by feeding the response from the flex-getter to trigger the next JSON payload, etc. There are about ten read requests on the Inputs and 19 for the outputs. I grouped requests as best I could by address sequences. I am trigger the polling at different intervals (2.8 seconds for inputs and 4.7 seconds) for outputs hoping to reduce the load.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 December 2023 17:18 UTC](https://discourse.nodered.org/t/modbus-tcp-communications-hang-after-4-to-12-hours-of-polling/81803/4 "2023-12-04T17:18:37Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
