Jump to content

Recommended Posts

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...

Link to comment
Share on other sites

  • MVP 2023

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.

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

  • MVP 2023

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.