How to catch Modbus TCP socket errors in a flow?

hi,
I'm using a simple Modbus TCP read node connecting to a remote Modbus server (outside of node-red).
when this server is offline I receive in the debug console : "socket error: Error: connect ETIMEDOUT xxx.xxx.xxx.xxx:502" with the name of the Modbus server ( that is completely normal) .

I thought that by putting a catch node to detect these errors on this Modbus TCP read node I would be able to catch them but nothing is raised.

So how can I detect that the Modbus server is Offline ?
thanks in advance

cheers

Hi, if you use a status node, you receive the node error. After you decide what you want.
Alternative, ping node (if is possible).

Hi Folgore,
thanks for pointing me in this direction :slight_smile:
ping works fine, yet node status is not giving expected results; actually, not always sending the watched node status (this modbus tcpread node)

thanks again for helping me
cheers

if there is an error the catch node should catch it - the status node shadows the status that appears under nodes (which may also show errors - but may not)

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