TechCorner 21 - Communications
TechCorner 21 - Communications
TechCorner 21 - Communications
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.
Page |2
The sections below, labeled I, II, and III describe the three network types along with their benefits and drawbacks.
I.
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.
RS-232 is the easiest to implement of the standards discussed. To some, its considered the most common short distance, point-to-point
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.
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:
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.
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.
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.
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-
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:
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.
Page |7
Below are some of the Automation Direct Non-CPU devices and option modules that support Modbus/TCP.
* For a complete list of CPUs and their supported communications please see the end of this document.
Page |8
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
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