6: Ethernet and PLC Messaging

Discussion 6 – Notes

TOPIC 1: Industrial Ethernet

An increasingly common way for a programmer to access a PLC is via an Ethernet network.  These PLCs can also communicate with one another over the same Ethernet if needed.  On this Ethernet, each piece of equipment wishing to communicate or receive communication must receive an address so that it can be identified specifically.  This address is called an Internet Protocol Address or IP address.  However, this equipment does not come with an IP address but it does come with a Media Access Control Address (MAC Address), a unique, device specific, identifier.  This is a 64-bit binary number often represented in hex format such as 14:D5:37:EF:88:A9:D9:29.  Given this length there are 2^64 = 1.84467441 × 1019 possible devices that can be represented uniquely.

Typically when a new device is received it does not contain an IP address and is set to broadcast its MAC address over any network it is connected to so that a automatic software or a software open by an engineer can identify it over the network and assign it an IP address.  Two main types of IP address assignment methodologies are Dynamic Host Configuration Protocol (DHCP) and Static IP address assignment.  While the most common method in the computer networking world is DHCP, the most common in industrial Ethernet applications is Static assignment.  The difference is that in DHCP the IP address of a node can change whereas Static Assignment means that the IP address will remain the same.  In industrial applications it is often important to always know the IP address of all equipment without looking.

Whether a home network or using a PC in a computer lab, at this point you have probably all had some interaction with some form of Ethernet so you may have some understanding of the structure.  Below is what the laboratory environment looks like.  It is meant to mirror that of a real world environment.

Total, there are 22 PLCs (18 MicroLogix 1100 PLCs and 3 ControlLogix PLCs), two industrial switches, 13 PCs, and a motor controller all on the Ethernet network in the lab.  Because of the advantages of the network any PLC can be programmed from any computer within the laboratory.  In order to program a PLC in the laboratory the PC must be located on the same subnet in the network, meaning that the IP address of the PC and the PLC must have the first three octets equal.  For example, if the IP address of the PLC is 114.116.220.103 then the PLC must have address such as 114.116.220.154 such that the first three sets of numbers are equal.  Another detail to note is that the PCs in the lab are dual addressed meaning they have two Ethernet cards, one with the address for programming the PLCs and one with the address for accessing the campus network and the internet.  This is done so that people outside of campus cannot access the PLCs remotely and hack into them.

The switches in the lab are Stratix 8000 switches made by Cisco and Allen-Bradley in combination.  Cisco is a big name in Ethernet hardware and Allen-Bradley is a big name in industrial automation so together it is assumed that they can make a decent industrial Ethernet switch.  The switch has many different functions in a network.  But at this time it is sufficient to say that it allows one device to communicate to another device plugged into the same switch with a similar IP address.

Let’s take a quick look at industrial Ethernet switches below.  The Cisco IE 3000 is essentially the same thing as the Stratix 8000 switches we use in the lab.

TOPIC 2: Ethernet Messaging

Because the PLCs are connected to one another on the same network, they are able to communicate during operation.  In fact, one PLC can use a message command (MSG) to change the outputs on another PLC and there doesn’t even need to be a program on the other PLC.  The MSG command allows the programmer to change any address or read any address on another PLC in the program.  Let’s take a look at what this looks like in the MicroLogix 1100 PLC.

In order to add a message command to your ladder logic program you must:

1.  Add a MSG command to a rung and give it a file such as MG11:0 or MG11:1.

2.  Click the Setup Screen

a. Select Channel 1 (Integral) to use Ethernet.

b. Select either 500CPU Read or Write for the Communication Channel.  Select read if you want to read data from another PLC, select write if you wish to write data to another PLC.

c. Type in the “Data Table Address” (This Controller side) as the place you want to store the read data or the place from which you want to obtain data to write to the other PLC.  The size in elements is how much data (words) you want to read or write.

d. Type in the “Data Table Address” (Target Device side) as the place you read from or write to on the other PLC.

e.  Select Local and give the command a Routing Information File (RI) such as RI20:1 or RI20:2.

3. Enter the MultiHop data by clicking on the MultiHop tab in the setup screen.

Here you only need to give the “To Address” as the Ethernet IP Address of the other PLC.

You should now be prepared to answer the following questions.

1.  True or False?  A MAC Address is the same thing as an IP Address.

2.  The Automation and Applied Controls Lab contains how many MicroLogix 1100 PLCs?

3.  The Stratix 8000 Industrial Ethernet switches in the lab are made by what two companies in partnership?

4.  The IE 3000 Industrial Ethernet Switches have ______ power supply input(s).

5.  The IE 3000 supports what power supply voltages?

6.  If 500CPU Write is selected in a MSG Command setup, what is the definition of the Target Device Data Table Address?

7.  When setting up the MultiHop portion of the MSG command, the IP address needed is that of the _____________.

Advertisement

2 Responses to “6: Ethernet and PLC Messaging”

  1. timothy Says:

    Have question.. lets say I have 12 plc’s all with static ip’s that the 3 first octets are all different. How would I connect them all to one computer? Would I need 12 nic cards? Sounds absurd. Curious what other methods could accomplish this? Maybe 6 dual port nic cards? Lol maybe some other peripheral.. then twelve different instances of rslinx? Sounds like I’m begging for a pc crash lol.. looking for a better way……..

    • adamwsonu Says:

      Timothy,

      Good question! First here are my assumptions: You are attempting to either program all 12 PLCs in a factory on different networks from the comfort of your office or are building a MES of sorts that is meant to display data to a central station coming from several different networks. First, I would suggest getting everything on one network but because I imagine you’ve thought of that but cannot for some reason the next best option would be to use another comm port on the PLC, such as serial or devicenet port, and purchase a gateway device that converts the serial port to ethernet, assign the gateway device of all 12 PLCs to contain the same first three octets and live with one NIC card on the PC and one instance of RSLinx. Also, depending upon what you are doing there may be some way of setting up a VLAN to accomplish it. Your best bet is to call your local AB rep and tell him or her you have immediate purchasing needs! Good luck and let me know if I can help further and more importantly what you did to solve the problem!

      Adam

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: