Sam.Newtouni Posted August 25, 2020 Report Share Posted August 25, 2020 Hi all, Hoping for some assistance here. I have a new remote IO unit that I'm trying to bring online. The issues I'm having appear to be with the TCP connection, I've attached a sample program of my main routine and modbus. I have green/red flashing light on mod, green on link & solid red on IOS, on first startup I get a few flashes on active. Things to note; - I have remote access setup on the same socket & it still functions ok - I have tried removing that port init with no luck. - I can ping both the CPU & URB IO controller from my PC so no issue with actual network connectivity. - I haven't looked too much into the modbus code because the Socket is not healthy & that is holding those rungs out anyway. - When I don't have a program attempting to make a TCP connection I have A green light on IOS,LINK & MOD - I have verified the project with URB configuration & also attached that file.FORUPLOAD.vlp Here are some pictures of what I am experiencing when I'm online. Any help would be much appreciated. Cheers, Sam Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted August 25, 2020 MVP 2023 Report Share Posted August 25, 2020 Without looking at your program, your screenshots show some things that appear odd to me. Why the use of SB13 on socket 3? Are you changing that socket often? It appears that you are using a set/reset system of latches to do your calling, but what runs/sequences them in the first place. To me you are likely getting clashes in everything where the plc doesn't know what to do, or can't do it when asked. I'd go back to basics and simply do one thing at a time. Get the link going first and then build on that. cheers, Aus Link to comment Share on other sites More sharing options...
Sam.Newtouni Posted August 25, 2020 Author Report Share Posted August 25, 2020 Howdy, I am not changing that socket so shall I just use SB146&SB150 for a socket reconnect rung? I will break it down next week when I have some time & come back if I have further issues. Thanks Ausman. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted August 26, 2020 MVP 2023 Report Share Posted August 26, 2020 17 hours ago, Ausman said: Why the use of SB13 on socket 3? It looks to me like he's using it as a fallback to re-connect if the connection is lost for whatever reason. Since SB 150 is in series, SB 13 will do nothing as long as the connection is maintained. Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted August 26, 2020 MVP 2023 Report Share Posted August 26, 2020 I see that, I was more concerned he was using it in a repetitive socket change situation that might have been creating issues by things happening concurrently, hence the clarification wanted. cheers, Aus Link to comment Share on other sites More sharing options...
Sam.Newtouni Posted September 5, 2020 Author Report Share Posted September 5, 2020 Gents, Still having issues with this TCP connection. Ausman I took your advice and removed all of the code besides the TCP connect & I cannot get a connection (see photos) I can ping both the CPU and URB-TCP no problem so I feel like it's something silly like a local port wrong? I know socket 3 functions ok because I can ping it & utilise remote operator on another port, what I'm unsure about is if it's working ok on port 502 & is my URB-TCP module definitely configured for local port #502? I can't see anywhere that can be changed in the URB configuration? SB142 & 150 are showing an unhealthy condition? Any help would be much appreciated. Many thanks!! Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted September 5, 2020 MVP 2023 Report Share Posted September 5, 2020 I might be misreading something here, but aren't your ports different? 20257 vs 502 Also, what happens if you split up your SB2 rung a fair bit. Don't do everything related to an SB2 call in one rung. ie try just the TCP stuff in one rung, SD PWD in another etc. It looks like it should work ok, but in practice perhaps there is too much going on. A favourite saying here is that Unitronics doesn't charge for rungs. Splitting things into separate rungs often makes trouble shooting much easier as well. cheers, Aus Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted September 5, 2020 MVP 2023 Report Share Posted September 5, 2020 Hard to tell if this is the source of the problem, but you are using poor form with the MODBUS IP Connect sequence. It should look like the picture below. Note that you should Set a bit once the Configuration has occurred and Reset the bit after completion of the connection. Note also that the Function in Progress bit should be in series with the connection sequence. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted September 5, 2020 MVP 2023 Report Share Posted September 5, 2020 This is actually a Visilogic topic but we'll leave it here because it's already rolling. Do NOT use the same socket for Remote Operator and Modbus communications. You have four sockets available. Set up socket 3 for 20257 and socket 2 for 502 and leave them be. Using the new Ethernet I/O with Vision was added to Visilogic 9.8.90 and higher. It's a bit of a complicated dance over Modbus TCP in the Vision, and there are some additional tools added to the Visilogic Tools menu, specifically "URB Remote I/O Configurator". This creates some special xml files with the .urli extension that are imported into the Vision project that set the Struct blocks up to properly interface the the I/O's block sizes. There's more to it than just verifying the URB I/O in that tool. If you don't get all Struct blocks configured correctly then the I/O drop will barf because you're asking for things that don't exist. @Sam.Newtouni - I looked at your FORUPLOAD program and there is way too much going on in there to focus on troubleshooting this problem, although it does look like you started by faithfully following the new Example project Unitronics provides. I was able to get a V350 talking to the new Remote I/O using the Unitronics example and modifying it to my configuration. I have attached my example files. For now, strip the serial modem stuff out of your program, re-compile everything, and upload the following: - specific details about your network - IP address of PLC and Remote I/O drop - .vlp file - .URCP file - /Inputs/Inputs.ulri file - /Output/Outputs.urli file Joe T. V350 Ethernet IO Demo.zip Link to comment Share on other sites More sharing options...
Sam.Newtouni Posted September 6, 2020 Author Report Share Posted September 6, 2020 Gents, I really appreciate all of the assistance here. After reading your replies I'm now almost positive my issue is around the socket - I was under the impression I had to use the same socket (3) and that it was a physical address (socket on the v1210) rather than a software address which I now understand. I'll also take your advice and tidy up the sequencing of everything. I shall report back early next week - hopefully with a good result. Many thanks! Link to comment Share on other sites More sharing options...
Sam.Newtouni Posted September 7, 2020 Author Report Share Posted September 7, 2020 All sorted - ended up being a socket/port issue & I feel a bit silly haha. I also took the time to tidy up the sequencing and make the improvements that you all mentioned. Thanks again, much appreciated. Cheers, Sam Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted September 7, 2020 MVP 2023 Report Share Posted September 7, 2020 8 minutes ago, Sam.Newtouni said: ended up being a socket/port issue & I feel a bit silly haha C'mon Sam, we all do silly embarassing stuff now and then. Tell all! cheers, Aus Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted September 8, 2020 MVP 2023 Report Share Posted September 8, 2020 On 9/6/2020 at 8:15 PM, Sam.Newtouni said: I also took the time to tidy up the sequencing and make the improvements that you all mentioned. You're still missing a few concepts. You need the Function in Progress bit in series with the Connect function. You also need the trigger bit, MB 3231 to be a Direct Contact, not a Positive Transition. Further, the Comms reset bit, MB 3230, should be a Positive Transition, though it really doesn't matter since you reset it at the end of the ladder rung (it's just poor form). 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