Newbie - modbus tcp server socket error

I'm really new into node-red.
I installed the program and the add-ons for modbus tcp.
I config my server master (Tbox/servelec) with its IP address: OK
I defined some readings: int16 block of 10 consecutive addresses, some single float registers with their conversion function, etc : OK

OK in fact when I poll every 15 seconds, my polls are working and the results are displayed as expected. But this it too fast, I don't need those fast readings (temperature mostly).

When I lower the polls to 1 per 15 minutes, I obtain a socket error / econnrefused. If I change the poll for 1 per 15 seconds and restart the flows, all is OK again.

Question 2: When my polls are OK (1 per 15 sec), when I try to add a node with another modbus unit (also TCP, different IP address), same problem.
Maybe a network problem or some unknown (to me) collisions ?

Thank you for your help

socket error

Same error I am also having with Modbus TCP communication. Did you solve it? Please let me know. Thanks in advance.

Yes (mostly) and No (sometimes)

Yes, because I noticed that my networking was not the best. I physically moved my PLC and nodered computer and hooked them to the same switch. That decreased the errors by 95%. So a good network is obviously a must to decrease communication errors.

Yes because I noticed that keeping the same polling rate and adding some delays on the treatment was better than delaying the poll. I don't need data every 10 seconds... Sometimes once an hour is enough. So the delay functions (and keep a steady poll rate)

Yes because I also optimized the poll by regrouping (in the PLC) addresses to poll a range of contiguous addresses (INT16) instead of various, non contiguous addresses.

No because I also noticed that if I add too many flows with various polls (2 PLC's and 2 serial devices on the same node-red), the global treatment could add some communication errors.

Hope it helps.

1 Like