etalon Posted March 11, 2016 Report Share Posted March 11, 2016 Hello, I am having an issue with intermittant connection to a remote PLC. The setup is as follows: Server has a VPN connection to a GSM router on site. This is connected via ethernet to the PLC. What I have found: I lose the ability to do a socket ping to the PLC on 20256. When I lose this ability, I also lose the ability to pull telemetry data off the PLC from the registers. (makes sense, they use the same port). I am doing this ping test from the local router on site, over the VPN. The issue is therefore not with the VPN itself, but the connection between the router and the PLC. The ladder logic code that manages the connection is attached. Can you see where I have gone wrong? How can I increase the robustness? Additionally, can you suggest timeout/keepalive settings that would help? At the moment, I can regain the connection by restarting the router (set to a automatic timed restart at the moment). Additionally, I have noticed more than once that if I go into the socket parameter screen on the PLC, it has sprung back into life. (maybe coincidence?) Many thanks in advance for any help! 1 Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 12, 2016 MVP 2023 Report Share Posted March 12, 2016 Why are you resetting SI 104 and 108? I normally store a value of 10 in SI 103-106 and a value of 20 in SI 107-110. I find that a value of zero in those System Integers will cause the PLC to be unable to restore a lost connection. Link to comment Share on other sites More sharing options...
etalon Posted March 14, 2016 Author Report Share Posted March 14, 2016 Thanks for you comment, yes I will look into this... I was very suspicious about this connection code, hence me pasting it here! (this is something someone else had gotten working on a bench and then left me the project, excuses, excuses I know..). I looked at the true values of the SI on the running plant. They were as follows for socket 1:SI104 (socket 1 keep alive):0SI108 (socket 1 connection keep):0 I have changed the code on the PLC as per the attachment (an integer direct store on startup of socket 1 SI initially to 10 (1000ms) and 20 (2000ms). Confirmed that values are being stored. Uploaded, testing now. Is there a need to set the values on the other sockets I am not communicating over? Link to comment Share on other sites More sharing options...
etalon Posted March 18, 2016 Author Report Share Posted March 18, 2016 *update* So, reliability seems to be much improved, not had a communication failure yet. I have modified the parameters suggested though, I am setting SI104 and SI108 to 100 and 200 (10,000ms and 20,000ms) respectively. I found that the shorter time values made remote access unreliable over the slow VPN connection we have available to the site. Many thanks for your help. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 18, 2016 MVP 2023 Report Share Posted March 18, 2016 Glad it helped. I'll also point out that Setting SB168 using SB2 when you have the Power-Up value as "SET" is redundant. Same with the values you're assigning to SI 104 & 108. You can either set a Power-Up value or assign a value with SB2 - your option, but there is no need to do both. As to your other question - there is no need to set values for the Sockets you aren't using, but it won't hurt anything if you do. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now