You are on page 1of 9

August 31, 2011

Direct Logic PLC Communication Basics:


Media, Protocols and Standards are discussed and compared to help you choose which is best for your application. Introduction:
When choosing a communications media and protocol there are many questions to be considered before you can decide which combination is the best suited for your application. Among them are; How much data do I need to transfer? How far do I need to transfer the data? Will the environment induce noise into the signal wires via EMI? Will your devices be in a Point-to-point or Multi-drop configuration? This article will describe the three main networks used in modern industrial control applications; Serial (RS-232, RS-485, RS-422), Ethernet, and Wireless, in hopes that you will be able to choose the method that will minimize your dollar investment while maximizing your network uptime.

Physical Layer:
It is common in the communications industry to categorize the top three major transport media types as serial, Ethernet, and wireless. Its also a common mistake to differentiate Ethernet and Wireless from serial as they are all technically considered serial communications, which is defined as: sending sequentially data, one bit at a time, on a single media channel. What really differentiates them is the physical media employed and what standard is used to pack the data bits together (code and decode). Traditional serial usually runs on copper wire in twisted pairs, connectors include the DB9, DB25 and RJ-12. Ethernet is normally transmitted over a set of four twisted pairs and terminates with RJ-45 plugs. It can also be sent over fiber optic cable. Wireless, as the name states, transmits data one bit at a time by changing the phase of an emitted radio wave with a fixed frequency and amplitude.

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

Page |2

The sections below, labeled I, II, and III describe the three network types along with their benefits and drawbacks.

I.

Traditional Serial - RS-232, RS-485, RS-422:


1. Standards:
RS-485 is one of the most common multi-drop serial communications standards. Both 2-wire and 4-wire configurations are possible. The standard sends data over opposing pairs of positive and negative signal wires. The receiving end compares them to read the data packets. This differential comparison resists electromagnetic interference from any motor or other high power equipment in your facility. Transmits up to 4000 ft.

Figure 1. RS-485 2-wire schematic (right), RS-485 4-wire schematic (left) Figure 1. RS-485 2-wire schematic (right), RS-485 4-wire schematic (left) Figure 1. RS-485 2-wire schematic (right), RS-485 4-wire schematic (left)

Sometimes called RS-485 4-wire, RS-422 is another common communication standard. Unlike RS-485, it is most often used in pointto-point configurations. Its even more immune to noise than its 2-wire cousin because it employs dual-differential signal wires. RS-422 will successfully transmit up to 4000 ft.

Figure 2. RS-422 schematic

RS-232 is the easiest to implement of the standards discussed. To some, its considered the most common short distance, point-to-point

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

Page |3

standard. Differential signaling is not used in RS-232. Instead, the signals are directly referenced to the GND pin. Noise immunity is much less than RS-485 or RS-422 since the GND voltage may differ from point-to-point, especially if they are far apart or use a separate power supply. Good for up to 50 feet and point to point only.

Figure 3. RS-232 schematic

Traditional Serial Standards Comparison:

Speed: RS-485 : 100 kbit/s @ 4000 ft - 35 Mbit/s @ 39 ft RS-422 : 100 kbit/s @ 4000 ft - 10 Mbit/s @ 39 ft RS-232 : 1 kbit/s @ 4000 ft - 20 kbit/s @ 39 ft Maximum Transmission Distance:

RS-485 : 4000 ft (1200 m) @ 100 kbit/s RS-422 : 4000 ft (1200 m) @ 100 kbit/s RS-232 : 50 ft (15 m) @ 1 kbit/s Maximum Devices:

RS-485 : 32 Devices RS-422 : 10 (1 driver & 10 receivers) RS-232 : 2 (peer-to-peer only)

2. Traditional Serial Protocols:

Modbus RTU is an open source serial protocol, developed by Modicon in 1979 for use with PLCs. It has become one of the de facto serial protocols used in the industrial control and automation industry. data is transferred in binary, 8 data bits per packet thus allows greater throughput than ASCII.

Figure 4. Modbus/RTU Packet

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

Page |4

Modbus ASCII is structured just like Modbus RTU but data is transferred in hexidecimal with readable ASCII characters instead of Binary. This change limits data to 7 bits per packet versus RTUs 8 bits. Its main advantage is that it can tolerate large gaps in the transmission (on par with1 sec) making it ideal for modem connections.

Figure 5. Modbus/ASCII Packet

The DirectNet protocol uses the RS-232/422 interface. Like Modbus ASCII, all data is transferred in hexidecimal with readable ASCII characters. The protocol allows between 16 and 2048 data bits per transfer. Its main advantage is that its structured off of the K-sequence protocol (proprietary to Automation Direct) making it compatible with all DirectLogic PLCs and C-more HMIs. Requires 7 separate packets to be sent back and forth for every read/write operation: Initiate Request Acknowledge Request Define Request (Header) Acknowledge and Data (includes LRC check) Acknowledge Receipt of Data End of Text End of Text Response

II.

Ethernet:
First published in 1980 by Xerox, Ethernet was first designed as a way to link multiple computers to servers and printers. The primary benefit was that large quantities of computers could be networked, regardless of brand or type. Like serial communications, Ethernet sends data in structured groups of bits called packets. Each packet contains not only data, but also addressing and error checking information. Standard, the Ethernet media consists of four two-wire copper pairs with RJ45 connectors on each end. Ethernet data can also be transmitted on fiber optic cable.

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

Page |5

Wire Color Orange/White Orange Green/White Blue Blue/White Green Brown/White Brown

Pin 10/100Base-T 1000Base-T 1 Tx+ BI_DA+ 2 TxBI_DA3 Rx+ BI_DB+ 4 BI_DC+ 5 BI_DC6 RxBI_DB7 BI_DD+ 8 BI_DD-

Figure 6. Standard Ethernet Cable Pin-out

1. Standards:
There are three Ethernet standards that are commonly found or are available for use with the Automation Direct line of PLCs. 10Base-T was the first popular twisted-pair form of Ethernet in the 90s. It led to the widespread adoption of Ethernet for Desktop Computers. Its designed for a maximum theoretical transmission speed of 10 Megabits/s and is most commonly run on Category 5 twisted-pair cables. The major limiting factor is its signal strength (attenuation), or lackthereof compared the two other standards discussed. 100Base-T is considered the most widely used Fast Ethernet media type. It has even gained the nickname Fast Ethernet. Like 10Base-T, it uses one twisted-pair to transmit data and one twisted-pair to receive data. In fact, both 10Base-T and 100Base-T use the same pins on the RJ-45 connector for these functions. This makes 100Base-T backwards compatible with legacy 10Base-T systems already in place. The standard was developed to transmit data at a theoretical maximum of 100 Megabits/s. Adopted in 1999, the 1000Base-T standard was developed to support 1000 Megabits/s over unshielded twisted-pair cable. It differs from 10Base-T and 100Base-T in that it uses all four twisted-pairs in standard Cat5 or Cat6 cable and uses extensive digital signal processing techniques to counteract the interference caused by using all four pairs. Standards Comparison: Speed:

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

Page |6

10Base-T - 10 megabits per second, only two twisted pairs required for operation 100Base-T - 100 megabits per second, only two twisted pairs required for operation 1000Base-T - 1000 megabits per second (1 GB/s), uses all four twisted Maximum Transmission Distance between hub or switch: 10Base-T : 328 ft (100 m) on Copper, up to 1.24 mi (2 km) on full duplex fiber 100Base-T : 328 ft (100 m) on Copper, up to 24.8 mi (40 km) on single-mode fiber 1000Base-T : 328 ft (100 m) Copper, up to 43.5 mi (70 km) on single-mode fiber

2. Protocols:
a. Modbus/TCP - open source, free to use i. Modbus/TCP was created to allow the implementation of the Modbus RTU/ASCII protocol on Ethernet, in the TCP/IP environment. One advantage of working in a TCP environment is that it allows multiple messages to be transmitted at once. It also allows multiple connections to a device at once. ii. Its royalty free and therefore quite easy and inexpensive to implement in most applications.

Figure 7. Comparison of the OSI model and Modbus/TCP structure

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

Page |7

Below are some of the Automation Direct Non-CPU devices and option modules that support Modbus/TCP.

Hx-ECOM100 C-more LookoutDirect Hx-EBC100 GS-EDRV WINPLC T1H-EBC100

* For a complete list of CPUs and their supported communications please see the end of this document.

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

Page |8

Automation Direct PLC Built-in Communications Chart


Built-In CPU Ports and Protocols Family CPU Ethernet RS-232 RS-485 Modbus TCP Modbus RTU M Modbus RTU S ASCII IN ASCII OUT

CLICK Basic CPU Analog CPU DL05 DL06 All All

DL105 All DL205 D2-230 D2-240 D2-250-1 D2-260 DL305 D3-330 D3-340 D3-350 DL405 D4-430 D4-440 D4-450 P3K P3-550

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

Page |9

References
1. PC-Based Instrumentation: Concepts and Practice, M. Mathivanan, 2007 by Prentice Hall of India Private Limited, pgs 563-565 2. http://en.wikipedia.org/wiki/Ethernet 3. http://en.wikipedia.org/wiki/Modbus 4. http://www.maxim-ic.com/app-notes/index.mvp/id/723 5. http://www.lammertbies.nl/comm/info/modbus.html 6. http://www.lammertbies.nl/comm/info/RS-232_specs.html 7. http://support.automationdirect.com/docs/an-misc-029.pdf 8. http://www.dataweek.co.za/news.aspx?pklnewsid=15261 9. http://www.ti.com/lit/an/slla070d/slla070d.pdf 10. http://support.automationdirect.com/docs/Protocolist.pdf 11. http://books.google.com/books?id=YayRpmjc20C&dq=wifi+vs+serial&source=gbs_navlinks_s 12. http://books.google.com/books?id=N8IvCes1o4cC&pg=PA55&dq=serial+communica tions&hl=en&ei=4nBdTraKA47yrQeah9WuDw&sa=X&oi=book_result&ct=result&resn um=10&ved=0CFYQ6AEwCQ#v=onepage&q=serial%20&f=false 13. http://books.google.com/books?id=MRChaUQr0Q0C&printsec=frontcover&dq=ether net&hl=en&ei=YWtdTt3NLseyrAevxIDHDw&sa=X&oi=book_result&ct=result&resnu m=1&ved=0CDEQ6AEwAA#v=onepage&q&f=false

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

You might also like