Sign in to follow this  
Followers 0
waynemac

Ethernet for Idiots like me

5 posts in this topic

Hi all, Never posted before and thanks to everyone for all the great information you provide. I have been using SLC stuff for years and now am having my first venture into rslogix 5000. I have a compactlogix L35e and a panelview plus 1000. I seem to have a grasp on the new software but the ethernet communications are killing me,frankly I just don't get it. I am using a hub but I cannot see the processor or the panelview no matter what I do. I have searched the internet for tutorials but haven't found anything. I have no support at work....can anyone help? Thanks in advance.

Share this post


Link to post
Share on other sites
I should also add that I have assigned the panelview and IP address, not the PLC. Do they have one assigned already as the Panelview does? I know the IP address of my laptop. One thing for sure I do not understand is on my laptop,when I open up my local area connections, the box comes up to put in IP addresses, what goes where? I have no idea what a subnet mask really is either. I know this is probably elementary stuff but it's all new to me.

Share this post


Link to post
Share on other sites
You can find all the stuff under "ipconfig" Do the follwing Go to START then RUN and put in CMD and press OK, black box will appear on the screen Then simply type in ipconfig and it will give you subnet and other info your looking for. hope it helps

Share this post


Link to post
Share on other sites
Rather than spending a lot of time explaining IP addresses, I get the sense that you are looking for something concrete to help you get up and running. I assume you know how to get to the IP address on your computer. When you are connected to your office network you probably want to set it for DHCP. When you want to talk to a PLC you want to set it fixed. So the first step is to pick an address range to use for the PLCs - you want this to be something different than what your office uses simply to avoid confusion. So first lets find out what address range your office uses. While you are connected to your office network, open a command line (Start -> Run -> then type CMD). At the command line type IPCONFIG. You will see the IP address assigned to your computer. Make a note of it. For your PLCs you will want to choose something different. For private networks you will see that your IP address is something like 10.10.XXX.XXX or 192.168.XXX.XXX, or 177.177.XXX.XXX. It really doesn't matter what these are, we just want to choose something different. So if you see 192.168.XXX.XXX as your computer's IP address, then choose to use 10.10.XXX.XXX for your PLCs, or vice versa. I'll use 10.10.xxx.xxx. If your office computer network is using 10.?.?.? then change 10.10 in my example below to 192.168. Now connect your computer to the PLC network. Set the computer IP address to 10.10.0.10. The subnet is 255.255.255.0. I always reserve xxx.xxx.xxx.10 for my programming PC. You can reserve any address you want, but I recommend that you choose something and stick with it. Make your panel view 10.10.0.2. Open a command line on your computer and PING 10.10.0.2 and you should get a reply from the panel view. Now find out the MAC ID of your compact logix. It should be on a sticker on the side of the processor board. Write it down. Next launch Rockwell's Boot-P/DHCP server (it came with your Rockwell software and should already be installed). When you see the mac address of the PLC in the request history panel click on it and set the PLC to 10.10.0.1. Click the disable BOOTP button so that BOOTP is disabled in the PLC. Now the PLC has a fixed address of 10.10.0.1. You should now be able to ping 10.10.0.1 from a command line and see it responding. From there you should be able to see the PLC and the panel view in RSLinx. Don't forget though to put your computer back on DHCP when you go to hook back up to the plant network. Because some days it is necessary to change back and forth several times I use the following batch files. I have put shortcuts on my start menu for them. @echo off Echo Setting IP address to static 10.10.0.10 netsh interface ip set address name="Local Area Connection" source=static addr=10.10.0.10 mask=255.255.255.0 ipconfig pause @echo off echo Setting IPaddress to DHCP netsh interface ip set address name="Local Area Connection" source=dhcp ipconfig pause As a final note, I write the IP address of every device in a system on a sticker and apply the sticker directly to the device. Nothing is more frustrating than trying to figure out what the IP address is when its already assigned and you have no idea what it might be. There are tools to find them, but a measly simple sticker will save you loads of grief down the road. Edited by Alaric

Share this post


Link to post
Share on other sites
First off, do not use hubs. Throw them in the garbage. They will cut your communication rates to 1/3 of normal and they will cause all kinds of havoc with a lot of switches which will detect them as "bad connections" and refuse to talk to them. Use switches instead. Since you haven't done this before, you will want to buy a small industrial grade managed switch for troubleshooting for use in the future. Ethernet isn't hard. Once you get over the hump of understand it, the power and flexibility make it easier than anything else you've ever worked with. But getting it set up can be frustrating especially for first-timers. We need to diverge a little and talk about Ethernet here. All devices on an Ethernet "segment" can see each other and talk to each other. Every device with an Ethernet port has a MAC address. This is usually hard coded and set at the factory. Even devices that have MAC addresses that can be changed have a default hardware address as well as the programmable one. Any manufacturer making Ethernet equipment pays money to a numbering authority and is assigned blocks of Ethernet addresses (you can actually tell who made a device by it's MAC address). All devices connected via switches on the same LAN can see and hear each other. Originally Ethernet was based on coaxial cable. With switches, the switch receives the packet on one port and then retransmits it out another port (or multiple ports). This simulates the effect of the coaxial cable, except that more traffic can be transferred and the cabling is far more flexible because there is no interference when two devices attempt to transmit at the same time. Each Ethernet LAN is called a segment. The Ethernet protocol itself has no provisions for passing packets from one segment to another segment. That's where the Internet (internetworking) Protocol comes in. IP rides on top of Ethernet. The IP protocol works out the details of passing packets from one LAN segment to another. Since Ethernet MAC addresses are not geographically oriented, just looking at a MAC address doesn't tell you if it's on the local segment or not. The IP protocol is responsible for this. The IP protocol has it's own numbering scheme, called IP packets. These are mapped onto Ethernet MAC addresses. You can actually see these addresses on a PC. Bring up a command line and type "arp -a" to list the current IP/MAC address map. The Ethernet ARP table is never fully populated...whenever Ethernet is called on to find an unknown MAC address, it sends out a broadcast packet to all nodes on the local segment. The IP numbering scheme is a hierarchy or tree. Blocks of numbers are assigned by the worldwide authority set up to do this, the IANA. You can see how this hierarchical scheme looks on a PC (type "netstat -rn" on either Windows or Linux), but usually a PC is not used as a router so the table is usually pretty empty. The concept here is to imagine a plant site with several plants and those may be composed of several production lines or other areas. Each area breaks down the overall pool of numbers into smaller logical pieces called subnets. Each subnet at the bottom of the tree is an Ethernet segment. There are special hardware devices that connect each segment to the others called a router. A router doesn't really know about Ethernet routing (that's what a switch does) but it does know how to do IP routing. So when it gets a packet, it sends it onto the appropriate segment. Routers run much more sophisticated protocols than the simple broadcast/flooding protocol that Ethernet uses. Routers constantly exchange maps of data with each other to coordinate on finding the best route, and unlike standard Ethernet (ignoring RSTP or rings), they can reroute packets whenever a better (or non-broken) route becomes available. The most basic protocol (RIP) is little more than what Ethernet already uses, advancing all the way through IGP (Interior Gateway Protocol) all the way up to BGP (border gateway protocol) that ties the internet together into one large decentralized routing system. At the lowest level, each device on the local LAN segment has to determine where the router is and whether to send a packet directly to another Ethernet node on the same network or over to the router. It does this using the subnet mask. In version 4 of the internet protocol, IP addresses are 32 bits. In version 6 of the protocol, IP addresses go up to 128 bits, but the basic design remains the same. For this discussion since almost no controls networks use version 6 (and most PLC's can't handle it), we'll stick with version 4 IP addresses. IP addresses in human readable form are written as four individual 8-bit numbers separated by dots. Locally here, www.google.com is 64.233.169.106 (google has multiple nodes geographically spread out so you may not get the same IP address except if you live in eastern North Carolina). In binary, it's 01000000.11101001.10101001.01101010. My laptop is on a private network so the address is 192.168.1.101. In binary, this works out to 11000000.10101000.00000001.01100101. OK, so the first step is to decide, is Google on the local LAN segment or in some far, distant network? Well, to do this, we need the subnet mask. My subnet mask is programmed to 255.255.255.0. In binary, it's 11111111.11111111.11111111.00000000. The mask is AND'd with both the source and destination IP addresses (which is why I'm writing this out in binary). So for Google, we get: 01000000.11101001.10101001.xxxxxxxx For the IP address of my laptop, we get: 11000000.10101000.00000001.xxxxxxxx Obviously there's not a match. If it had been the address of my networked hard drive (192.168.1.2), then we'd have a match and the PC would route the packet directly to the hard drive. But since they don't match, my PC knows that all traffic destined for google needs to be sent instead to the router. The router is always programmed into each machine and it's called the gateway address. On my laptop, this is listed as 192.168.1.1. All "not local" packets get sent to 192.168.1.1. You can check this information on your PC, too. Type "ipconfig" in Windows or "ifconfig" in Linux to view the table of all your ports. Note that before routing to the gateway (and there can be only one gateway), a device first checks ALL the local ports. This allows you to have one machine sitting on multiple network segments and be able to send packets correctly to each one. A router works the same way except that it passes packets from one segment to another in addition to simply communicating on each separate segment, and passes packets from one router (gateway) to another using the routing tables that it collects if the packet is destined for some faraway Internet location (or drops it if the packet is routed incorrectly). Now the last thing you need to know is that if you need to create your own IP addresses, stick with the local "numbering authority" if you are putting new equipment on the same network segment. It's a bad thing to duplicate IP addresses and if you do this, both pieces of equipment will get ignored or generate an error. If someone else owns/maintains the network, then ask them for numbers. Otherwise, create your own. If you do this, there are suggested numbers to use, reserved for private networks. This is listed in RFC 1918. All Internet Protocol documents are public, well written (usually), and free. Here is one place that you can get RFC 1918 to read: http://www.faqs.org/rfcs/rfc1918.html If you read through it, you can use any address in the range of 10.xxx.xxx.xxx, 192.168.xxx.xxx, or 172.16.xxx.xxx through 172.31.xxx.xxx where the x's represent any 8 bit number you want to use except 0 or 255 (those are special). In practice you will want to use these numbers because if you use any others, then you will have problems routing packets on machines that have a port on both the internet and your private network if you do this in the future. Try to "fit" with the existing local numbering scheme if you can. For instance, the IT department here uses 10.208.xxx.xxx for the local plant. We agreed to put controls equipment on 10.208.110.xxx, 120.xxx, or 130.xxx depending on where it is going to be installed. The electrical group maintains their own IP address lists for those three subnets. IT agreed that the routers will be 10.208.xxx.1. We also agreed that xxx.xxx.xxx.250-254 are reserved for laptops for troubleshooting purposes so that if we just need to "pick a number" out in the field doing troubleshooting, those addresses are freely available. Best to plan ahead and do it right the first time. The subnet mask should be pretty obvious now. Let's say that we allocate 192.168.10.xxx to your control network. Then the subnet mask will be 11111111.11111111.11111111.00000000. In IP notation, that's 255.255.255.0. If you get these settings wrong, then your equipment will launch the packet to the gateway, which then incorrectly routes the packet, and it goes nowhere. This sounds like what is happening to you. IP addresses, subnet masks, and gateways really can't be programmed at the factory (except for perhaps a special default number). You will have to program them yourself when you set your equipment up. It is possible to automatically assign numbers using BOOTP/DHCP but for fixed equipment on a controls network, this won't work right because every time the equipment reboots, it can end up with a completely different number. There are several different ways to do this depending on the equipment. On PC's, you can go to your network settings and change it under "TCP/IP settings". Some equipment comes with a default and you have change your PC to match the same network/subnet and change it. Panelview Plus's also allow you to set it in a menu. Others use RARP to change it. Others use custom software. Some do it through a USB or serial port. Your CompactLogix uses a serial port. Most AB equipment defaults to using BOOTP or DHCP. If you isolate yourself from the rest of the network (chances are that your local network has a DHCP server), you can run a free BOOTP/DHCP program from Allen Bradley and use this to set an initial IP address before you program a permanent one. Switches from from Hirschmann work this way but they also have a special Ethernet-based tool that lets you at least find the switch. Equipment from Acromag and Sixnet comes with a default IP address that you can use to connect initially to change it. Switches from Cisco require you to have a special cable to connect to them to program an address the first time. Quite often you will spend time manually adjusting your PC's settings to match the equipment you are working on and then changing it back again when you connect to a different area. I suggest that you try to make everything as uniform as possible and set up integrated (rather than separate) networks that can route to each other so that this process can be as painless as possible. I also suggest that an industrial managed switch, even though they are a bit expensive, is a bench requirement. You honestly can't troubleshoot and work on equipment without one.

Share this post


Link to post
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
Sign in to follow this  
Followers 0