Generic TCP IP Driver

I am using Generic TCP IP Driver on Github, created by chi.

In my project, I have server-PLC (Siemens S7-300) communication with the following connections:

Now, let say we call the connection between Server and Network Switch/Router as A, and connection between Network Switch/Router and the PLC as B

I am doing some tests on the system, and one of them is to physically disconnect connection B and monitor the result from the Ignition Gateway and Ignition Designer.

Now, usually, the Generic TCP/IP driver shows the number of connected device on certain connection like this in the Gateway -> OPC-UA -> Devices -> Status Column:

Throughout my testing, I notice that when I disconnect and reconnect connection B five possible things may occur:

  1. The number of device connected shown in the Gateway -> OPC-UA -> Devices -> Status Column, sometimes - and not always, is increased by 1 upon re-connection, though there is no actual new device connected:
  1. Likewise, when a device is disconnected, it, sometimes and not always, does not reduce the number of connected devices:
  1. When the device is disconnected, the tag in the Ignition Designer still shows DataQuality as good (!) though the actual connectivity is missing.

  2. When connection B is reconnected, if case 1 does not occur (that is, the number of connected device does not increase), then we cannot get updates from the device anymore!

  3. When I use multiple ports to refer to the exact same devices (for the device could configure multiple connection ports) which originally show the same number of connected devices (say, 3), and then if I test the connection and re-connection, the increment/decrement behaviors are not consistent among the ports. That is, one port may have incremented connection:

While the other port remains:

And when that occurs, the port which does not increase the number of device connected can no longer communicate with the device.


I did not seem to encounter those issues when I tested without using direct connection

What could be the reason and how to solve it? Admittedly, the Network Switch/Router are connected to more than one devices. Could that cause those issues? How to solve them?

Hi Ian,

did you set a ‘Connection Timeout’ in the device settings? A timeout in conjunction with periodical arriving data is the only way the driver can detect a broken connection.

Regards,
Carsten

If we configure the Generic TCP IP Driver as server (listener), could we set the timeout?

No, you are right. For the listener there is no timeout setting. In this mode the driver simply waits for incoming packages, there is no further connection monitoring. In fact this mode was intended to be used with simple devices like barcode scanners that do not use a permanent connection.
Maybe i can add something in an upcoming version. In the meantime i suggest to use something like a heartbeat counter in a tag change script.

OK, thanks for your clarification - there isn’t really better clarification source than you!

I am looking forward for the upcoming version. In the mean time, I would just try to implement a workaround (such as heartbeat) like you suggested.

Thanks again!

I just uploaded a new release on GitHub. There is now a timeout setting in server mode and a new UDP mode. Some bugs that affected multiple connections in server mode have also been fixed.
Let me know if there are any problems with this release.