ModbusServer became unreachable if reach maximum of 16 byClientConnections

fredruel
2021-04-08
2024-08-27
  • fredruel - 2021-04-08

    Hello,
    we have a customer that have a device that pool our ModbusServer (codesys component from library ModbusTCP Slave). When a device connect we saw the byClientConnections variable to augment by 1. If the device is connect and we lost the network connection the byClientConnections did not drop and when the customer reconnect the byClientConnections augment to 2. When we reach 16, if the connection is lost the server became unchreacheble . If we toggle TRUE/FALSE the xEnable or xReset variable the byClientConnections did not reset to 0. The customer told us that after 1 month he was unable to reach our server. I reproduce a similar problem by connecting the ModbusServer with qModMaster, query the server, disonnect the network cable for 20 seconds, reconnect the cable , disconnect and reconnect.

    We would like to know if there is a way to reset the server.

    Regards,

    Frédéric Ruel (OEM customer)

     
  • fraziersedge - 2024-08-27

    Frédéric did you ever find a solution to this problem? I am experiencing the same thing.

     
  • fredruel - 2024-08-27

    Hello Fraziersedge, the solution of Codesys might be to update your codesys to the lastest version but it was not possible for us. In our Codesys V3.5 SP9 patch 8 I was able to fix this bug. I change my ModbusTCP slave component version or one of the sub component version (ex: SysSocket). Look at the picture in attachement that's the receipe that have work for us. When I got the bug my version of ModbusTCP slave was 3.5.5.0 with SysSocket at 3.5.6.0 and I change to ModbusTCP slave 3.5.14.0 with same version 3.5.14.0 of SysSocket event if I still use codesys V3.5 SP9 patch 8.

     
  • fredruel - 2024-08-27

    By the way an inactive socket could take up to 2 minutes to be free but previously it was for ever.

     

Log in to post a comment.