Jump to content

Connect PLC to pc with network cable.


Recommended Posts

It is recommended to use LAN switch and LAN cable.

200 ft is ~61 meters. And it is less than maximum LAM segment (100 meters).

You have to set PLC and PC with static IP inside the same TCP network.

For example:

PLC Panel

IP 192.168.1.2 IP Mask 255.255.255.0 GW 192.168.1.1 (may not exist in your network but should be configured). DNS 192.168.1.1

PLC CPU

IP 192.168.1.3 IP Mask 255.255.255.0 GW 192.168.1.1 (may not exist in your network but should be configured).

PC

IP 192.168.1.4 IP Mask 255.255.255.0 GW 192.168.1.1 (may not exist in your network but should be configured).

 

Then you can communicate to PLC 192.168.1.2 IP.

 

Edited by AlexUT
IP Address typo corrected.
Link to comment
Share on other sites

  • MVP 2023

Open a command window on your PC and try to ping the PLC's IP address.  That will tell you if your cable and basic IP configuration are good.

As AlexUT points out about, you need to get your addresses straight.  Let us know what your configuration is on both the PLC and the PC.

Joe T.

Link to comment
Share on other sites

  • MVP 2023
38 minutes ago, Joe Tauser said:

Open a command window on your PC and try to ping the PLC's IP address.  That will tell you if your cable and basic IP configuration are good.

Joe is correct, but also keep in mind that the ability to Ping the PLC does not tell you if the Port assignments are correct.

Link to comment
Share on other sites

So PLC set with SB2 to

IP 192.168.001.002

mask 255.255.255.000

GW 192.168.001.001

socket 0

port 20256

tcp slave

the info screen on the V1210

shows same settings as I has set in the ladder

socket 0

port20256

TCP Slave

initialized & Not Connected

protocol type Pcom

status 2-TCP Listen

Rx Tc 0

When I try to ping it

command promt '192.168.001.002' is not recognized as an internal or external command, operable program or batch file. 
 

Link to comment
Share on other sites

Plugging it into a switch did not make it work either. I remember that last year I was able to connect to it by plugging the PLC into my home network and I was able to connect to it from my phone with the mobil app (only when I was home. As soon as I was out of my WiFi and my phone switched to att the remote app connection stopped). It really puzzles me because it should work. I've watched the tutorial videos on it and it should be simple. Card init then socket init and it should work. I've tried a couple different cables also. 

Link to comment
Share on other sites

  • MVP 2023

And the answer to my socket question is?

If you definitely have it in the correct physical socket on the plc, I think you need to draw a little mudmap of what you have in place and a full description of what you want to do and how you want to do it. I'm reading a few things into what you have been saying.

cheers, Aus

Link to comment
Share on other sites

  • MVP 2023

Have you got SB168 setting on power-up?  If the link falls over for whatever reason..timeout.. blah blah, without this set to 1 it won't reconnect.

What actually is the GateWay mentioned above as .001.001?

On 10/27/2019 at 7:17 AM, TozoM8 said:

GW 192.168.001.001

Also, isn't Alex in his details above referring to a Unistream given he is mentioning 2 addresses for the plc end?  And the .003 in his response is listed for both the plc and pc.  Something not right there....think it might be a typo.

cheers, Aus

Link to comment
Share on other sites

You can tell I am not good at networking. I am using a MacBook Air with windows 7 running on parallels desktop. (Windows run very stable on it) when I was changing the pc's  IP address, I've picked the wrong local area network. I have a usb to Ethernet adapter (since the MacBook does not have a network port) LAN is my WiFi. I needed to change the IP on LAN2. It all works now.  Now stop wasting your weekend time on a dummy like me. 

Link to comment
Share on other sites

  • MVP 2023
1 hour ago, TozoM8 said:

Now stop wasting your weekend time on a dummy like me. 

We're all dummies like this. You wouldn't believe how many times I've made a similar mistake. Usually it just takes a fresh set of eyes to spot it. We're happy to help no matter how simple the problem.

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.