Modbus Reader does not recover from temporary loss of Modbus TCP Slave
See original GitHub issueWith the modbus reader set to poll at 1s, we successfully read several bytes over several intervals. On physically disconnecting the slave from the network, the reader node shows its state change from ‘active’ to "error: “FSM not ready to Read” then to “error{}”, then alternates several times before staying in “error{}”.
Meanwhile the debug trace shows “Error: Port Not Open”
On reconnecting the slave, the node stays in the “error{}” state the “Error: Port Not Open” traces continue.
Proper operation can only be restored by redeploying.
Sample flow below
[ { "id": "mb_reader_mb_client_192.168.1.11_mr_0", "type": "modbus-read", "z": "tab_Main", "name": "mb_client_192.168.1.11_mr_", "showStatusActivities": false, "unitid": "", "dataType": "HoldingRegister", "adr": "12388", "quantity": "2", "rate": 1, "rateUnit": "s", "server": "mb_client_192.168.1.11", "x": 165, "y": 55, "wires": [ [], [] ] }, { "id": "mb_client_192.168.1.11", "type": "modbus-client", "z": "tab_Main", "name": "AMCS1", "clienttype": "tcp", "tcpHost": "192.168.1.11", "tcpPort": "502", "serialPort": "/dev/ttyS0", "serialBaudrate": "9600", "serialDatabits": "8", "serialStopbits": "1", "serialParity": "none", "unit_id": "1", "clientTimeout": "5000", "reconnectTimeout": "5000" } ]
Issue Analytics
- State:
- Created 7 years ago
- Comments:43 (21 by maintainers)
should work with v1.0.9-kappa+ or release v1.0.9
Hi
You followed the discussion in modbus-serial. I came to the conclusion that some error handling should be installed in the Node-Red part. It could be automatically, then you might to have change the Modbus Read part (and other Modbus parts) or add new functions Modbus Close of Modbus Clear. If I encounter an error than I have to close the connection. Another option could be an extra input (asynchrone trigger) on the Modbus Read and other modules e.g. Reset Modbus trigger. I can set this trigger if I encounter a timeout or connection refused. Maybe you have some other ideas as well?