Lemuel Posted January 29, 2019 Report Share Posted January 29, 2019 am new to programming Visilogic. I was able to download my first program using V350 device. In my ladder Diagram, I set my plc name, initialized my tcp/ip card init and my socket 0 to local port 20000 being a client. But then, having disconnected and trying to reconnect again, I found out that I could not bring it online- Error (210). I already matched my TCP/IP settings with what I had written on my initialization. I hope someone can solve problem... Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted January 29, 2019 MVP 2022 Report Share Posted January 29, 2019 Why did you select port 20000? Typically for connection between PC & PLC, port 20256 & TCP protocol is used. The default for Socket 0 is UDP. Socket 1 defaults to TCP & port 20256 for PC-PLC communications. You do not need to initialize a socket for that to occur (but it doesn't hurt if you do it correctly). Just be sure your VisiLogic communication settings have the correct PLC Name, IP address, and port 20256. Also, make sure your PC is on the same subnet and it's smart to use a crossover cable if the connection doesn't go through a hub or switch (I've heard varying reports about the necessity of this). It's useful to read the help entry in VisiLogic for Ethernet. Quote Link to comment Share on other sites More sharing options...
Isakovic Posted January 29, 2019 Report Share Posted January 29, 2019 Go to info mode to see what is happening with sockets and try to connect on other Port. I think other Sockets are activated by default on ports 20257, 20258 and 20259 but I'm not sure. Why did you initialize Socket as Client? It should be server if you want to connect through it. Also look at system integers for "Socket Keep Alive" Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted January 29, 2019 MVP 2022 Report Share Posted January 29, 2019 His other post has the program file posted, which is why I left it up. There is no initialization of any socket, so using port 20000 will go to socket 0 which is using UDP protocol. Socket 1 defaults to port 20256 and TCP protocol (and server), which is what should be used for PC-PLC communications. The PC (VisiLogic) should be set to client, as you correctly point out. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted January 29, 2019 MVP 2022 Report Share Posted January 29, 2019 Oh, I just noticed that in ladder rung 1 you have SB 1 in front of your Card Initialization FB. That needs to be SB 2. You cannot stay connected if you are initializing your ethernet card on every PLC cycle. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.