Beckhoff / TF6000_ADS_DOTNET_V5_Samples

Sample code for the Version 6.X series of the TwinCAT ADS .NET Packages
https://infosys.beckhoff.com/content/1033/tc3_ads.net/9407515403.html?id=6770980177009971601
BSD Zero Clause License
37 stars 15 forks source link

AmsTcpIpRouter stops listening for connections after connect / disconnect #47

Closed vvoldsund closed 11 months ago

vvoldsund commented 1 year ago

Setup:

Configuration:

 "AmsRouter": {
    "Name": "MyLocalSystem",
    "NetId": "10.80.111.228.1.1",
    "TcpPort": 48898, // Default port from TwinCAT system is 48898
    "RemoteConnections": [
      {
        "Name": "CONTROLLER",
        "Address": "10.80.111.254",
        "NetId": "10.80.111.254.1.1",
        "Type": "TCP_IP"
      }
    ]
  },

What happens:

As the application starts it start to listen for incomming connections on all network interfaces: image

After the clients connect it stops to listen for incomming connections (the servers receive data): image

If the application with the clients are restarted the connection is closed and does not recover (the servers does not receive data and the router does not listen for incoming connections): image

Expected

Was expecting the router to keep listening for incoming connections after the first one connected and also after the disconnect. As it is now the AmsTcpIpRouter cannot be trusted as remote systems can be restarted randomly.

RalfHeitmann commented 11 months ago

Please check the newest versions of the 6.0.XXX and 6.1.XXX packages. The issue should be resolved.