Modbus TCP connection status - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Modbus TCP connection status (/showthread.php?tid=921) |
Modbus TCP connection status - leonidas - 01.08.2017 Hello, Do anyone know a good way to detect if there is or there is no connection with Modbus TCP device? Code: require('luamodbus') RE: Modbus TCP connection status - admin - 01.08.2017 mb:connect() will return nil plus error message when connection cannot be established. If it breaks afterwards then all read/write calls will act the same. |