Ethernet Commuication 2


Introduction to Ethernet Communication

Ethernet Module

Ethernet Communication is probably the most common protocol used in Industrial Automation.    Ethernet communication has been a standard since around 1983, and allows computers to connect to each other over a local area network.  When computers are connected to a network, they can share files, share printers, and share the Internet connection.

Most computers use a protocol called TCP/IP.    (Terminal Control Protocol / Internet Protocol)  The problem with using this protocol becomes obvious when you think about loading a simple web page.   Go to any website.   Today, it may load in 3 seconds.  Tomorrow, it might load in 10 seconds.  This is not a very good way to run our I/O on high speed equipment.   It would be OK to use this protocol though, just to get online with Studio 5000, or for most HMI (Human Machine Interface) applications.

Industrial Protocol (Ethernet/IP) fixes this problem.   We can set the update times on our field devices such as drives, flex i/o, or another Controllogix chassis.

For this reason, most industrial automation system will use two Ethernet Modules.    One of the modules connect to your plant network (for HMI and programming/troubleshooting purposes).  The other Ethernet module will connect to your remote I/O.

Warning!!   If you try to run I/O over your plant network, you will probably get I/O errors, and take down your plant network!!

Addressing

Every node (most devices) on the same network must have a unique IP address.   This is similar to a phone number for the device.   This includes your computer, printer, Ethernet modules, drives, and panelviews.

To find the IP address of your own computer, use the IPCONFIG command at the command prompt.   You can access the command prompt in Windows by going to Start | All Programs | Accessories | Command Prompt.  If you are using UNIX, or a UNIX-like Operating system, just type ifconfig at the terminal, or /sbin/ifconfig.

Here, we see the status of the Local Area Connection:

IPConfig

Next, to verify communication with another device (such as your ethernet module), use the PING command at the command prompt.   Just type ping, then a space, and then the IP address of the device you wish to verify communication with.

Subnet Mask

The subnet mask defines what IP addresses you can communicate with on your own network.  The most common subnet mask is 255.255.255.0.   Each “section” (byte) of the IP address is called an Octet, because the numbers are made up of 8 bits.    To truly understand how the Subnet mask works, we need to break the numbers down into Binary.  Every number is shown in what is called a RADIX, or numbering system.    The numbering system that most humans are familiar with is Decimal (base 10).   Computers “think” in Binary which is base 2.

Now, let’s look at the first octet.  The subnet mask for the first octet is a 255.   Also, let’s look at the first octet of our IP address, which is 192.

Subnet mask:   1111 1111 = 255
IP Address:    1100 0000 = 192

Obviously, you will notice that all of the bits in the subnet mask are turned on for the first octet.  This means that all of the bits in the first octet of the IP address must be the same as ours for any device we communicate with.   Therefore, any device that we communicate with must have a 192 in the first octet on our local area network.  Its the same for the second and third octet since our subnet mask is 255.255.255.0.  However, the last octet is a 0, which means that we can communicate with any device that has the same first three octets as we do, but the last octet can be different.

In summary….   Wherever there is a 255 in the subnet mask, the corresponding octet of the source must match that octet of the destination.

Now, let’s look at some examples of two devices under different scenarios:

192.168.0.1 and 192.168.0.2 with a subnet mask of 255.255.255.0    Yes -- First 3 octets match
192.168.1.1 and 192.168.0.2 with a subnet mask of 255.255.255.0    No -- Third octet is a mismatch
192.168.1.1 and 192.168.0.2 with a subnet mask of 255.255.0.0      Yes -- Third and fourth octet do not need to match.

To determine if you can communicate to your 1756-ENBT, 1756-ENT2, or any other device, look at the IP address on the module.   Then do an ipconfig on your own PC to see your own IP and subnet.   Then you can make the determination of whether or not your PC is in the correct subnet.

Summary of Ethernet Communication

In short, Ethernet Communication is fast. However, we must be sure all devices are in the same subnet that need to communicate with each other. Additionally, tt’s important to realize the difference between TCP/IP and Ethernet/IP. This is especially important when communicating to remote I/O over Ethernet such as drives and flex chassis.

Usually, a ControlLogix chassis will be connected to two different networks with two different Ethernet Modules. One of the modules might communicate to your plant network via TCP/IP. TCP/IP is non-deterministic. That is to say, we cannot guarantee the update time over TCP/IP. Typically, you will have a second Ethernet module on a separate switch to communicate to remote I/O devices. We dedicate this second Ethernet module to remote I/O. That way, we can guarantee the update time. If we start putting TCP/IP devices on the Ethernet/IP network, we start to loose determinism. You have packets on the network that you don’t have control of.

When we dedicate a separate Ethernet module to remote I/O, the Ethernet module tells all of the Ethernet/IP devices when they can talk on the network. With TCP/IP on the other hand, any device will transmit any time it wants. We start to loose control of our ability to guarantee the update times.

Now, you can set up the Ethernet Devices driver in RSLinx!

— Ricky Bryce


Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “Ethernet Commuication