Dear,
I am using a tcp server to get data from the pc to my plc AXC F 2152. This works over a ethernet cable that is directly connected to the PC. When I unplug the ethernet cable the server still stays on. Is there a way to catch the break and let the server restart?
Kind regards,
Gérôme De Wilde
Hi,
On top of this post I want to ask if there is a way to stop the TCP server to timout when there is no data coming in. I use the TLS_SOCKET_2.
Kind regards,
Gérôme De Wilde
Hello!
If you use NDR output of TLS_RECEIVE_2 fb, that bind to TLS_SOCKET_2, you can detect moment of new data portion arrived. And use additional timer or etc mechanism to determine time gap between data portions. Than add some steps to catch time limit and provide necessary steps to deal with it.
Here is one of the simplest variants

BR
But it seems that there is some unresolved issue with socket maintenance in case of physical wire unplugged.
Some unexpected behavior show MB_TCP server too. And it also based on tls_socket fb in under hood…
Hi
Thanks for replying on this post. The problem is that most of the time no data is send to the server so there is no specifik delay to wait. For the connection los with the cable unpluged, I will follow the post about modbus.
Thanks!