Jump to content
TozoM8

Connect PLC to pc with network cable.

Recommended Posts

Can't seem to figure it out. The pc is 200 ft away.  It is a dedicated pc for collecting data from the PLC   No network access. 
Thanks in advance!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


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

Share this post


Link to post
Share on other sites

Is this a direct cable connection?  If it is, for interest's sake, have you tried putting in a switch, or doing the cable as a crossover?  Sometimes "theoretically it should work" stuff doesn't.

cheers, Aus

Share this post


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

Share this post


Link to post
Share on other sites

1.  The Ping command is used this way-

image.png.215343f35773355f657ace6dee1e861b.png

 

2.  Can you connect to it if you plug directly in with a cable from your PC.  If not, please post your program.

Joe T.

Share this post


Link to post
Share on other sites

Tozo, you haven't done the simple error of putting the network cable into the expansion port on the plc, have you?

Everyone has done this at some stage, and it is very annoying  that they are the same style socket!

cheers, Aus

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I have it in the right port. The expansion port is used for my EX module. I have another Ethernet card. I will try it tomorrow. Thank you guys. 

Share this post


Link to post
Share on other sites

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

Share this post


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

Share this post


Link to post
Share on other sites
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.

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