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.comon 23 Apr 2014 at 2:13