Zenou - 2017-09-15

Hi,

We use snap7 to make cyclic ReadMultiVars function calls, reading the content of dozen of DB every 1700ms.
We call that a ReadMultiVars list. Each call of the ReadMultiVars function is used to read a small (about 5 to 10) group of DB

Data transfert works pretty well for a couple of hours, until it encouters this suite of errors:

  • First, a connection timeout
11:09:17@14:37:16: [DEBUG] Using ReadMultiVars for DB list:
11:09:17@14:37:16: [DEBUG] DB: 10
11:09:17@14:37:16: [DEBUG] DB: 115
11:09:17@14:37:16: [DEBUG] DB: 15
11:09:17@14:37:16: [DEBUG] DB: 18
11:09:17@14:37:16: [DEBUG] DB: 38
11:09:17@14:37:16: [DEBUG] DB: 41
11:09:17@14:37:17: [DEBUG] +-----------------------------------------------------
| ReadMultiVars
+-----------------------------------------------------
| ERROR !!!
|  ISO : An error occurred during recv TCP : Connection timed out
| Cnx reference  : 0xb3c29460
+-----------------------------------------------------
  • Then a invalid CPU answer for the first ReadMultivars call of our list
11:09:17@14:37:19: [DEBUG] Using ReadMultiVars for DB list:
11:09:17@14:37:19: [DEBUG] DB: 105
11:09:17@14:37:19: [DEBUG] DB: 110
11:09:17@14:37:19: [DEBUG] DB: 111
11:09:17@14:37:19: [DEBUG] DB: 117
11:09:17@14:37:19: [DEBUG] DB: 140
11:09:17@14:37:19: [DEBUG] DB: 142
11:09:17@14:37:19: [DEBUG] DB: 154
11:09:17@14:37:19: [DEBUG] DB: 156
11:09:17@14:37:19: [DEBUG] DB: 3
11:09:17@14:37:19: [DEBUG] +-----------------------------------------------------
| ReadMultiVars
+-----------------------------------------------------
| ERROR !!!
| CLI : invalid CPU answer
| Cnx reference  : 0xb3c29460
+-----------------------------------------------------
  • If we try to perform the same ReadMultivars again, the reading seems to be OK but it's execution time is zero
11:09:17@14:37:20: [DEBUG] Using ReadMultiVars for DB list:
11:09:17@14:37:20: [DEBUG] DB: 105
11:09:17@14:37:20: [DEBUG] DB: 110
11:09:17@14:37:20: [DEBUG] DB: 111
11:09:17@14:37:20: [DEBUG] DB: 117
11:09:17@14:37:20: [DEBUG] DB: 140
11:09:17@14:37:20: [DEBUG] DB: 142
11:09:17@14:37:20: [DEBUG] DB: 154
11:09:17@14:37:20: [DEBUG] DB: 156
11:09:17@14:37:20: [DEBUG] DB: 3
11:09:17@14:37:20: [DEBUG] +-----------------------------------------------------
| ReadMultiVars
+-----------------------------------------------------
| Result         : OK
| Execution time : 0 ms
| Cnx reference  : 0xb3c29460
+-----------------------------------------------------
  • Then a connection timeout occurs for the next ReadMultivars call
| ReadMultiVars
+-----------------------------------------------------
| ERROR !!!
|  ISO : An error occurred during recv TCP : Connection timed out
| Cnx reference  : 0xb3c29460
+-----------------------------------------------------
  • Then infinite RECV errors
+-----------------------------------------------------
| ERROR !!!
|  ISO : An error occurred during recv TCP : Connection reset by peer
| Cnx reference  : 0xb3c29460
+-----------------------------------------------------

We would appreciate to have any idea to understand why this problem occurs only after hundreds of cycles, and how we can recover this TCP error

Some other informations:
- We measured the execution time of the ReadMultivars. It is comprised between 133ms and 146 ms.
After the first error, the following always concern the first ReadMultivars call. We do not try to perform the followings.

  • The total execution time (all ReadMultivars of the list) of the is about 1300ms, so we think that a reading period of 1700ms is not a problem.