You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I need to reconnect some modbus devices after network failure.
To do this, i tried to follow the steps below:
1. Check ping to devices (they are PLCs)
2. Create a new instance of a TcpClient object
3. Create a new ModbusIpMaster object using the ModbusIpMaster.CreateIp(client)
method
4. Add that object to a List of ModbusIpMaster
at the first connection, if Pings are successful, have no problem to write/read
on shared memory area.
After a network failure (the network cable is unplugged), i restored the
connection and i tried to clear the list of ModbusIpMaster and follow the steps
from 1 to 4, but now if i try to read/write i get an InvalidOperationException.
How can i re-initialize the connection to modbus devices, and restart
reading/writing on modbus?
Thanks
Original issue reported on code.google.com by camnaghi...@gmail.com on 23 Apr 2014 at 2:13
The text was updated successfully, but these errors were encountered:
I resolved the issue.
At ping failure i follow the steps below:
1. Close all TCP connections to Modbus Devices.
2. Dispose all ModbusIpMaster objects
At next ping success you can reconnect following the steps in previous post :)
Original comment by camnaghi...@gmail.com on 30 Apr 2014 at 8:22
Original issue reported on code.google.com by
camnaghi...@gmail.com
on 23 Apr 2014 at 2:13The text was updated successfully, but these errors were encountered: