Skip to content

TCP connection to SMC EX260-SEN closes after ~2-minutes #33

Description

@Josep313

I am running into an issue where after approximately 2-3 minutes, the connection to the hardware disconnects and I am unable to call SetAttributeSingle().

The current work-around has been to send some type of request to the hardware to keep alive.

See pseudocode:

while(true)
{
      var data = SolenoidData()
      // only set attributes if new data is present. data is the bit that needs to toggle on/off the solenoid 
      if (newData)
      {
         _ethernetIPClient.SetAttributeSingle(classID, instanceID, attributeID, data);
      }
    else 
      {
        _ = _ethernetIPClient.IdentityObject.SerialNumber; // do this so that connection is not lost after N minutes. 
      }

}

Any idea as to why the TCP client is disconnecting? Or is this a hardware issue where the device releases the TCP handle from the client?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions