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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...