DynaMck Posted July 27, 2017 Report Share Posted July 27, 2017 I'm attempting to communicate with a server (robot) using TCP Client Connect, Tx, and Rx. Upon making ladder logic changes, and re-downloading to the PLC, the TCP Client fails to connect (Socket State = 3, Is Connected = 0). If I change the IP address of the Panel/CPU, it works again. At first I thought this might be an issue with spamming the TCP Client Connect function, so I changed it to only run once upon startup. No luck. I also tried running a TCP Client Disconnect before the Connect with a time delay between the two. No luck. What ever changes I make, if i change the IP addresses, it works again.... Any suggestions are appreciated, thanks! ****UPDATE**** If I download a new program to the PLC before running a TCP Client Disconnect, the next time I try to connect, it doesn't work. If I download a new program to the PLC after a successful connect and disconnect, the next connect works no problem. If I download while connected, the server must be power cycled before the connection can be reestablished. This shouldn't be an issue for the actual application, but it means that during programming and testing, I have to disconnect from the server before I make any changes. Sounds like maybe the sever is holding the socket open while the new program changes are being made to the PLC? Then when the disconnect runs upon wakeup, it can't close the previous socket. Any comments? Quote Link to comment Share on other sites More sharing options...
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.