Modbus frequent error (timed out & port not open)

Getting frequent problems connecting to modbus using flex-getter. Running request every minute, it fails perhaps every 10 minutes more or less. Error is "Timed out" or "Port Not Open". What's strange is I made a retry mechanic, and now it always succeeds on first or 2nd attempt!

Anyone know why modbus might behave this way?

Are you pilling fast? Are you polling many in parallel?

We are a law abiding community here @Steve-Mcl - and it's not likely good for your health :laughing:

2 Likes

Pulling once per minute, no parallel. There is one other request going once per hour, so that will go parallel, but the errors are scattered around all minutes, not just 00.

What modbus slave station or sensors are you communicating with?
And check whether the timeout value is suitable, as some sensors are poorly designed.

1 Like

Not sure what brand or model unfortunately. The response data is energy meter for some kind of air conditioner or heating system.

Will try experimenting with different timeouts.

Tried increasing timeouts which were quite short to around 10 sec and 5 sec for reconnect timeout. I still get the error. But as it always works on 2nd try (if 1st try fails), I'm leaving it for now. Modbus is weird.