Jump to content
Sign in to follow this  
etalon

Socket connection being lost

Recommended Posts

Hello,

 

I have a project that has reliability issues that seem to stem from the PLC losing connection to its router on socket 20256.

 

On a PLC where the connection is lost:

  • If I ask the router to do a standard ping against the router, it succeeds. 
  • If I ask the router to do a TCP socket ping with 20256, it fails.  (on a PLC I am successfully getting data from, this succeeds)

 

The kludgy way I am temporarily getting round this, is the router is set to do a hard reset every 4 hours which reinitialises everything

 

Bit of background:  Remote server using unicomdriv.dll is communicating via VPN over a GSM modem to the PLC over Ethernet (sounds dodgier than it actually is!).  I have a screenshot of the bits of code that manage the connection on the PLC code, what I am thinking is I need something to detect a situation of the PLC losing connection or no successful data transfer over socket 1, and initiate a sequence to regain the connection.

 

Any suggestions?  Any suggestions of parameter settings for timeout and keepalive ect... on the PLC itself?

 

Roy

post-24913-0-85047500-1457618285_thumb.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...