Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Josep313 opened this issue Jul 20, 2022 · 0 comments
Open

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

Josep313 opened this issue Jul 20, 2022 · 0 comments

Comments

@Josep313
Copy link

Josep313 commented Jul 20, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant