question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Modbus TCP stops communicating after a few days

See original GitHub issue

Current behavior I have a flow reading data from a Modbus TCP client. I am using 4 Modbus-Read nodes two with FC1 and two with FC3 reading different ranges. I also added Modbus queue info watching these 4 nodes. All are configured with Unit ID 1, all set to 5 second update.

Expected behavior All works fine, but after a few days or a week no update is read any more. The Modbus nodes show status “active (5sec)” and nothing happens. And in the queue info I see thousands of messages. I added the catch node and used the example to reset the queue on very high, but that does not seem to make a difference either. Btw, in the Modbus Queue Info node the documentation says msg.resetQueue= True, but the example code below uses msg.payload.resetQueue= True; So this is misleading and I have no idea how it is supposed to work. I need to redeploy the flow to make it work.

I am sorry, but I did not find any useful information in the Wiki for this scenario.

Minimal reproduction of the problem with instructions I can give you a demo flow, but I would not post the code here with working Modbus addresses included.

Your Environment

Please tell us about your environment:

  • (X) I am using just the Node-RED package and got modbus-serial package installed with it
  • ( ) I have installed modbus-serial package global from source (using git clone)
  • ( ) I have installed modbus-serial as a global package (using npm i -g)

Yes, modbus-serial is the name but it does all, TCP and Serial. The node-modbus package is just for the Modbus Server node.

  • Device :

    • ( ) macOS: v
    • () Linux: v
    • ( ) Windows: v
    • (X) Raspbian: v
    • ( ) Other:
      • Name:
      • Version:
  • Description of the connecting Modbus system:

    • Name : Saia PLC
    • Version:
    • Vendor : Saia-Burgess
    • Link : https://
  • node-red-contrib-modbus version: v5.13.3

  • Node: (min. 10.x) node --version = v10.22.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nygma2004commented, Dec 16, 2020

I managed to get the log and emailed it to you.

0reactions
biancodecommented, Nov 13, 2021

reopen if it still existing with v5.15+

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Modbus TCP/IP] server stops responding after some time
Solved: [Modbus TCP/IP] server stops responding after some time - NI Community. From troubleshooting technical issues and product ...
Read more >
MODBUS TCP communication working 2 hours and then stops
Siemens S7 1215 to General Electric Controller ( dont know wich one). The communication is working fine for approx 2 hours and then...
Read more >
Connection closing in Modbus-TCP - Control.com
In our PLC, TCP connection is opened automatically before sending a query and closed immediately after receiving a reply from a server. End ......
Read more >
Modbus TCP comms issues - Inductive Automation Forum
Comms can be fine for days and then suddenly they get loads of errors with a dozen devices indicating they have lost comms....
Read more >
RIO Ignition mmpServer Modbus won't connect after a while
It works fine for a while, but eventually stops communicating and stops taking new connections. I'm actively working on a project with this ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found