-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encountered an Issue with reconnecting to the Service #62
Comments
|
So I might have been unclear. The connection works fine the first time. So yes i can open the socket I can open the connection and everything is working perfectly. When I pull the network cable from the SPS-Modul I'm connected too, using TCP-IP it throws the above mentioned errors. But when I try to reconnect, plugging the SPS-Modul back into the PC. It cannot recreated the connection and continously throws the above mentioned errors. System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.5:502 at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port) I Provide you with the NModbus part implementation. Maybe you can point me towards the mistake?
|
Try against a Server program on a Desktop Computer. I‘ve seen a lot of modbus implementations, especially on PLC devices that are not clearing a socket when the client is disconnected. Can you reconnect after a while (an hour or so)? |
I was wondering if reconnection with the NModus Service is supported as I tried to reconnect but the system keeps throwing me exception errors regarding the socket.
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.IO.IOException' in System.dll
Exception thrown: 'System.IO.IOException' in NModbus.dll
Maybe I'm implementing it wrong?
The text was updated successfully, but these errors were encountered: