Upload
haider-ali-abbasi
View
241
Download
0
Embed Size (px)
Citation preview
8/10/2019 Industrial Data Communication
1/73
www.arfanali.webs.com
Industrial Data
Communication
Communication protocols
ARFAN ALI
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
2/73
Industrial data communication
www.arfanali.webs.comPage 2
Serial Communication
The concept of serial communication is simple. A serial port sends and receives data
one bit at a time over one wire. While it takes eight times as long to transfer each byte
of data this way, only a few wires are required.
Three Modes of Communication
Simplex Communication
A simplex system is one that is designed for sending messages in one direction
only. This is illustrated in figure 1. This is of limited interest in an industrial
communications system as feedback from the instrument is essential to confirm
the action requested has indeed occurred.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
3/73
Industrial data communication
www.arfanali.webs.comPage 3
Half Duplex Communication
Half duplex communications occurs when data flows in both directions; although
in only one direction at a time. Half duplex communications (as discussed later)
is provided by the RS-485 physical standard (to be discussed later) where only
one station can transmit at a time. A protocol (which can be thought of as the
pattern of bits and bytes) can be half duplex as well an example here is
Modbus
Full Duplex Communication
In a full duplex system, the data can flow in both directions simultaneously.
Examples of hardware standards supporting full duplex are the physical standard
EIA-232E (sometimes referred to as RS-232C).
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
4/73
Industrial data communication
www.arfanali.webs.comPage 4
Serial versus Parallel communications
Most computers are equipped with serial ports and a parallel port. Although these two
types of ports are used for communicating with external devices, they work in different
ways :
Parallel ports
A parallel port sends and receives data eight bits at a time over 8 separate wires. This
allows data to be transferred very quickly. Parallel ports are typically used to connect a
PC to a printer and are rarely used for much. The cable length cannot be very long,
generally less than a few meters.
Serial Ports
A serial port sends and receives data one bit at a time over one wire. While it takes
eight times as long to transfer each byte of data this way, only a few wires are required.
In fact, two-way (full duplex) communications is possible with only three separate wires -
one to send, one to receive, and a common signal ground wire. Cables for serial
communications can be much longer than the parallel ones.
RS232 Standard
RS-232 was introduced in 1960, and is currently the most widely used communication
protocol. It is simple, inexpensive to implement, and though relatively slow. Signals are
processed by determining whether they are positive or negative when compared with a
ground. Because signals traveling this single wire are vulnerable to degradation,
RS-232 systems are recommended for communication over short distances (up to 50
feet) and at relatively slow data rates, (up to 20 kbps). However, in practice, these limits
can be exceeded. AnRS-232based system allows only two devices to communicate.
Hardware Basics
The electrical characteristics of the RS232C standard is contained in the EIA
(Electronics Industry Association). The main ones are the following :
A Space (logic 0) will be between +3 and +25 Volts.
A Mark (Logic 1) will be between -3 and -25 Volts.
The region between +3 and -3 volts is undefined.
An open circuit voltage should never exceed 25 volts. (In Reference to GND)
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.quatech.com/support/comm-over-rs-232.phphttp://www.quatech.com/support/comm-over-rs-232.phphttp://www.quatech.com/support/comm-over-rs-232.phphttp://www.quatech.com/support/comm-over-rs-232.phphttp://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
5/73
Industrial data communication
www.arfanali.webs.comPage 5
A short circuit current should not exceed 500mA. The driver should be able to
handle this without damage. (Take note of this one!)
Connector Types
Serial Ports come in two sizes, There are the D -Type 25 pin connector and the D-Type
9 pin connector both of which are male on the back of the PC, thus you will require a
female connector on your device.
RS-232 Signal Descriptio ns
TxD: Transmit Data--This wire is used for sending data.
RxD: Receive Data--This line is used for receiving data.
GND: Signal Ground--This pin is the same for DTE and DCE devices, and it provides
the return path for both data and hand-shake signals.
DTR: Data Terminal Ready--Used by a DTE to signal that it is plugged in and available
to begin communication.
DSR: Data Set Ready--Sister signal to DTR, it is used by the DCE to indicate it is ready
to begin communication.
CTS: Clear to Send--Used by DCE to signal it is available to send data, and used in
response to a RTS request for data.
RTS: Request to Send--Used by a DTE to indicate that it wants to send data. Also, in a
multi-drop network, used to turn carrier on the modem on and off.
DCD: Data Carrier Detect--Used by a DCE to indicate to the DTE that it has received a
carrier signal from the modem and that real data is being transmitted.
RI: Ring Indicator--Used by DCE modem to tell the DTE that the phone is ringing and
that data will be forthcoming.
The following table gives the pin outs of the different connectors, along with the signals
involved on the serial communication port:
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
6/73
8/10/2019 Industrial Data Communication
7/73
Industrial data communication
www.arfanali.webs.comPage 7
Pin 6 Pin 6 DSRData Set
Ready
DSR (Data Set Ready) is the
companion to DTR in the same
way that CTS is to RTS.
Pin 7 Pin 5 SGSignal
Ground
Pin 8 Pin 1 CDCarrier
Detect
A modem uses Carrier Detect to
signal that it has made a
connection with another modem,
or has detected a carrier tone.
Pin 20 Pin 4 DTRDataTerminal
Ready
Its intended function is very
similar to the RTS line. Some
serial devices use DTR and DSR
as signals to simply confirm thata device is connected and is
turned on. The DTR and DSR
lines were originally designed to
provide an alternate method of
hardware handshaking.
Pin 22 Pin 9 RIRing
Indicator
A modem toggles the state of
this line when an incoming call
rings your phone.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
8/73
Industrial data communication
www.arfanali.webs.comPage 8
DTE devices
Communications servers
Terminals
Serial printers
Computers with native RS-232-E serial ports
DCE devicesModems and other communications equipment
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
9/73
Industrial data communication
www.arfanali.webs.comPage 9
Whether DTE or DCE
Unfortunately, as more and more electronic computers and instruments outside the
telephone industry began using RS-232, it became difficult to decide if the new gadget
should be a DTE or DCE device since in reality both DTE and DCE devices transmit
and receive data.
Device Type Function DB251Pin No. DB92Pin No.
DTE Transmit 2 3
Receive 3 2
Ground 7 5
DCE Transmit 3 2
Receive 2 3
Ground 7 5
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
10/73
Industrial data communication
www.arfanali.webs.comPage 10
BASIC RS-232 DATA CIRCUITS
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
11/73
Industrial data communication
www.arfanali.webs.comPage 11
=
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
12/73
Industrial data communication
www.arfanali.webs.comPage 12
Common RS-232 cable wirings
This document includes information how to make common wires for RS-232
connections. Pinouts for standard 25 pin connection and de-facto 9 pin connector used
in PCs are shown.
Normal DTE-DCE connection
These wirings can be used with normal Data Terminal Equipment (DTE) to Data
Communications Equipment (DCE) connections. The wiring are standard way to do
asynchronous DTE to DCE connection and they support hardware handshaking.
DTE (25 pin) DCE (25 pin)
TD 2 ------------------------> 2
RD 3 4
CTS 5 6
DCD 8 ------------------------> 8
DTR 20 ------------------------> 20
SG 7 ------------------------- 7
RI 22 2
RD 2 4
CTS 8 6
DCD 1 ------------------------> 8
DTR 4 ------------------------> 20
SG 5 ------------------------- 7
RI 9
8/10/2019 Industrial Data Communication
13/73
Industrial data communication
www.arfanali.webs.comPage 13
Two-wire DTE-DCE wiring
This wiring can be used between DTE and DCE where hardware handshaking is not
needed.
DTE (25 pin) DCE (25 pin)TD 2 ------------------------> 2
RD 3 2
RD 2
8/10/2019 Industrial Data Communication
14/73
Industrial data communication
www.arfanali.webs.comPage 14
Null modem cable
This cable can be used when you must connect two DTE equipments like computers to
each other directly without using any data communication equipment in between
computers. This wiring supports hardware handshaking.
DTE (25 pin) DTE (25 pin)
TD 2 ---------\ /------------- 2
RD 3 3
RTS 4 ---------\ /------------- 4
CTS 5 5
DSR 6 6
DCD 8 8
DTR 20 ---------/ \------------- 20
SG 7 ------------------------- 7
DTE (25 pin) DTE (9 pin)
TD 2 ---------\ /------------- 3
RD 3 2
RTS 4 ---------\ /------------- 7
CTS 5 8
DSR 6 6
DCD 8 1
DTR 20 ---------/ \------------- 4
SG 7 ------------------------- 5
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
15/73
Industrial data communication
www.arfanali.webs.comPage 15
DTE (9 pin) DTE (9 pin)
RD 2 ---------\ /------------- 2
TD 3 3
RTS 7 ---------\ /------------- 7
CTS 8 8
DSR 6 6
DCD 1 1
DTR 4 ---------/ \------------- 4
SG 5 ------------------------- 5
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
16/73
Industrial data communication
www.arfanali.webs.comPage 16
Two-wire DTE-DTE connection
This cable can be used when you must connect two DTE equipments like computers to
each other directly without using any data communication equipment between
computers. This wiring needs only two signal wires and ground between computers butdoes not support hardware handshaking.
DTE (25 pin) DTE (25 pin)
TD 2 ---------\ /------------- 2
RD 3 3
RTS 4 ----, ,----- 4
CTS 5 5
DSR 6 6
DCD 8 8
DTR 20 ----' '----- 20
SG 7 ------------------------- 7
DTE (25 pin) DTE (9 pin)
TD 2 ---------\ /------------- 3
RD 3 2
RTS 4 ----, ,----- 7
CTS 5 8
DSR 6 6DCD 8 1
DTR 20 ----' '----- 4
SG 7 ------------------------- 5
DTE (9 pin) DTE (9 pin)
TD 3 ---------\ /------------- 3
RD 2 2
RTS 7 ----, ,----- 7
CTS 8 8
DSR 6 6
DCD 1 1
DTR 4 ----' '----- 4
SG 5 ------------------------- 5
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
17/73
Industrial data communication
www.arfanali.webs.comPage 17
RS-422/485 SERIAL COMMUNICATION OVERVIEW
RS-422
Balanced Transmission
The RS-422 communication provides a mechanism by which serial data can be
transmitted over great distances (to 4,000 feet) and at very high speeds (to 10 Mbps).
This is accomplished by splitting each signal across two separate wires in opposite
states, one inverted and one not inverted. The difference in voltage between the two
lines is compared by the receiver to determine the logical state of the signal. This wire
configuration, called differential data transmission or balanced transmission, is well
suited to noisy environments.
WithRS-232communication, which is unbalanced transmission and uses only one wire,
signal degradation can take place if there is a difference in ground potential between the
transmitting and receiving ends of the cable.
With balanced transmission, this potential difference will affect both wires equally, and
thus not effect their inverse relationship. Twisted pairs of wire, which ensure that neither
line is permanently closer to a noise source than the other, are often used to best
equalize influences on the two lines.
Errors can be caused by high noise levels affecting one side of the receiver to a
different extent than the other. To combat this, each receiver is generally grounded.
Errors in balanced transmission systems such as RS-422 can also be caused by signal
reflections. As data transfer speeds increase and travel over longer distances, the
signal can be reflected back from the far end of the wire. To combat this, termination
resistors are placed at the far end of the cable which make the cable appear electrically
as if it is infinitely long--infinitely long lines don't have ends, and thus can't reflect from
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.quatech.com/support/comm-over-asyncserial.phphttp://www.quatech.com/support/comm-over-asyncserial.phphttp://www.quatech.com/support/comm-over-rs-232.phphttp://www.quatech.com/support/comm-over-rs-232.phphttp://www.quatech.com/support/comm-over-rs-232.phphttp://www.quatech.com/support/comm-over-rs-232.phphttp://www.quatech.com/support/comm-over-asyncserial.phphttp://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
18/73
Industrial data communication
www.arfanali.webs.comPage 18
one end to the other. These termination resistors will differ depending on the protocol
used. For RS-422 a 100 ohm resistor is placed at the receiving device.
With RS-422 a master can use one communication line to converse with up to 10
slaves. With that many parties wanting to talk, a mechanism for controlling theconversation must be implemented. Rs-422 communication does not support
Full-Duplex.
RS-485 --The True Multidrop Network
RS-485 is an upgraded version of the RS-422 protocol that was specifically designed to
address the problem of communication between multiple devices on a single data line. It
is a balanced transmission system that is virtually identical to RS-422 with the important
addition of the ability to allow up to 32 devices to communicate using the same data
line. Thus all 32 devices can directly communicate with each other, taking on the role of
master and slave as needed. This is achieved with tristatable drivers, which are usually
controlled by a programmable handshake line to ensure that only one device acts as a
driver at any one time. Communication can be initiated from any point on the line. For
RS-485, 60 ohm resistors are placed at the two furthest points of the communication
link.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
19/73
Industrial data communication
www.arfanali.webs.comPage 19
Comparison of specs. among RS232, RS422 & RS485
RS-232 RS-422 RS-485
Mode of Operation single ended differential differential
Drivers per Line 1 1 32
Receivers per Line 1 10 32
Maximum Cable Length 50 feet 4000 feet 4000 feet
Maximum Data Rate 20 kbps 10 Mbps 10 Mbps
Driver Output Maximum Voltage 25V -0.25 to +6V -7 to +12V
Driver Output Signal Level (loaded) 5V 2V 1.5V
Driver Output Signal Level (unloaded) 15V 5V 5V
Driver Load Impedance 3kto 7k 100k 54k
Max. Driver Output Current (Power on) n/a n/a 100A
Max. Driver Output Current (Power off) VMAX/300 100A 100A
Receiver Input Voltage Range 15V -7V to +7V -7V to +12V
Receiver Input Sensitivity 3V 200mV 200mV
Receiver Input Resistance 3kto 7k 4k 12k
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
20/73
Industrial data communication
www.arfanali.webs.comPage 20
The synchronization problem
Serial communication normally consists of transmitting binary data across an electrical
or optical link such as RS232 or V.35. The data, being binary, is usually represented by
two physical states. For example, +5v may represent 1 and -5v represent 0. The
accurate decoding of the data at the remote end is dependent on the sender and
receiver maintaining synchronization during decoding. The receiver must sample the
signal in phase with the sender.
If the sender and receiver were both supplied by exactly the same clock source, then
transmission could take place forever with the assurance that signal sampling at the
receiver was always in perfect synchronization with the transmitter. This is seldom the
case, so in practice the receiver is periodically brought into synch. With the transmitter.It is left to the internal clocking accuracy of the transmitter and receiver to maintain
sampling integrity between synchronization pulses.
Asynchronous Vs Synchronous Communication
Asynchronous communication
There are two approaches possible in transmitting data over a communications link. The
asynchronous approach is the more basic one used by EIA-232E which operates at a
lower speed. The higher speed Local Area Networks running at 10 Mbit/s operate usingthe more efficient synchronous communications.
An asynchronous system is one in which each character or byte is sent within a frame.
The receiver does not start detection until it receives the first bit, known as the start bit.
The start bit is in the opposite voltage state to the idle voltage and allows the receiver to
synchronize to the bits following.
In asynch. serial communication, the electrical interface is held in the mark position
between characters. The start of transmission of a character is signaled by a drop in
signal level to the space level. At this point, the receiver starts its clock. After one bit
time (the start bit) come 8 bits of true data followed by one or more stop bits at the mark
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
21/73
Industrial data communication
www.arfanali.webs.comPage 21
level. The receiver tries to sample the signal in the middle of each bit time. The byte will
be read correctly if the line is still in the intended state when the last stop bit is read.
Thus the transmitter and receiver only have to have approximately the same clock
rate. A little arithmetic will show that for a 10 bit sequence, the last bit will be interpreted
correctly even if the sender and receiver clocks differ by as much as 5%.
Asynch. is relatively simple, and therefore inexpensive. However, it has a high
overhead, in that each byte carries at least two extra bits: a 25% loss of line bandwidth.
A 56kbps line can only carry 5600 bytes/second asynchronously, in ideal conditions.
Start Bit Signals the start of the frame
Data Usually 7 or 8 bits of data, but can be 5 or 6
Parity Bit Optional Error detection bit
Stop bits Usually 1, 1.5 or 2 bits.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
22/73
Industrial data communication
www.arfanali.webs.comPage 22
Synchronous Communication
In synchronous communications, data is not sent in individual bytes, but as frames of
large data blocks. Frame sizes vary from a few bytes through 1500 bytes for Ethernet or
4096 bytes for most Frame Relay systems. The clock is embedded in the data streamencoding, or provided on separate clock lines such that the sender and receiver are
always in synchronization during a frame transmission.
A synchronous system uses a string of bits to synchronize the receiver before the data
is detected. A typical synchronous system frame format is shown below in figure
Preamble This comprises one or more bytes that allow the receiving unit to
synchronies with the frame
SFD The start of frame delimiter signals the beginning of the frame
Destination The address to which the frame is sent
Source The address from which the frame is sent
Length Indicates the number of bytes in the data field
Data The actual message
FCS The Frame Check Sequence is for error detection
What is Handshaking?
The method used by RS-232 communication allows for a simple connection of three
lines: Tx, Rx, and Ground. However, for the data to be transmitted, both sides have
to be clocking the data at the same baud rate. Even though this method is sufficient
for most applications, it is limited in being able to respond to problems such as the
receiver getting overloaded. This is where serial handshaking can help.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
23/73
Industrial data communication
www.arfanali.webs.comPage 23
Following are three most forms of handshaking with RS-232:
Software Handshaking
Hardware Handshaking
Software Handshaking: This style uses actual data bytes as control characters. The
lines necessary are still the simple three line set of Tx, Rx, and ground since the control
characters are sent over the transmission line like regular data. The function SetXMode
allows the user to enable or disable the use of two control characters, XON and XOFF.
These characters are sent by the receiver of the data to pause the transmitter during
communication.
Hardware Handshaking: The second method of handshaking is to use actual
hardware lines. Like the Tx and Rx lines, the RTS/CTS and DTR/DSR lines work
together with one being the output and the other the input. The first set of lines are RTS
(Request to Send) and CTS (Clear to Send). When a receiver is ready for data, it will
assert the RTS line indicating it is ready to receive data. This is then read by the sender
at the CTS input, indicating it is clear to send the data. The next set of lines are DTR
(Data Terminal Ready) and DSR (Data Set Ready). These lines are used mainly for
modem communication. They allow the serial port and the modem to communicate their
status. For example, when the modem is ready for data to be sent from the PC, it will
assert the DTR line indicating that a connection has been made across the phone line.
This is read in through the DSR line and the PC can begin to send data. The general
rule of thumb is that the DTR/DSR lines are used to indicate that the system is ready for
communication where the RTS/CTS lines are used for individual packets of data.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
24/73
Industrial data communication
www.arfanali.webs.comPage 24
Serial Communication Protocol
A protocol is an agreement between two parties about how the two parties should
behave. A communication protocol is a protocol about how two parties should speak to
each other. Serial communication protocols assume that bits are transmitted in series
down a single channel. A serial protocolhas to address the following issues
How does the receiver know when to start looking for information?
When should the receiver look at the channel for the information bits?
What is the bit order? (MSB or LSB first)
How does the receiver know when the transmission is complete?
Open systems Model
In digital data communications, wiring together of two or more devices is one of the first
steps in establishing a network. As well as this hardware requirement, software must
also be addressed. The OSI reference Model consists of the following seven layers:
Layer 1: Physical Layer
Electrical and mechanical definition of the system
Layer 2: Data Link Layer
Framing and Error correction format of the data
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
25/73
Industrial data communication
www.arfanali.webs.comPage 25
Layer 3: Network Layer
Optimum routing of messages from one network to another
Layer 4: Transport Layer
Channel for transfer of messages of one application process to another
Layer 5: Session Layer
Organization and synchronization of the data exchange
Layer 6: Presentation Layer
Data format or representation
Layer 7 Application Layer
File Transfer, message exchange
The OSI Model provides an overall framework for the vendor in which to package their
communications solutions comprising the hardware communications links and the
protocols.
In the world of instrumentation, this OSI model is often simplified to use only three
layers:Layer 1: Physical Layer
Layer 2: Data Link Layer
Layer 3: Application Layer
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
26/73
Industrial data communication
www.arfanali.webs.comPage 26
Examples of how these layers are applied:
RS-232 and RS-485 are examples of the Physical Layer
The Modbus Protocol is an example of the Data Link Layer
The HART smart instrumentation protocol comprises the Physical, Data Link and
Application Layers. Foundation Fieldbus comprise the Physical, Data Link and
Application Layers.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
27/73
Industrial data communication
www.arfanali.webs.comPage 27
HART Protocol
History
The HART protocol was originated by Rosemount in the late 1980's. HART is an
acronym for "Highway Addressable Remote Transducer." The protocol was "open" for
other companies to use and a User Group formed in 1990.
In March of 1993, the group voted to create an independent, nonprofit organization to
better support the HART Protocol. In July of that year, the HART Communication
Foundation was established to provide worldwide support for application of the
technology. The Foundation would own the HART technology, manage the protocol
standards, and ensure that the technology is openly available for the benefit of the
industry.The HART Protocol - An Overview
HART- FSK Based
The HART protocol uses 1200 baud Frequency Shift Keying (FSK) based on the Bell
202 standard to superimpose digital information on the conventional 4 to 2OmA
analogue signal at a low level on top of the 4-20mA as show in Figures. The HART
protocol communicates at 1200 bps without interrupting the 4-20mA signal and allows a
host application (master) to get two or more digital updates per second from a field
device. As the average value of FSK signal is always Zero, 420 mA signal is not
affected.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
28/73
Industrial data communication
www.arfanali.webs.comPage 28
HART STRUCTURE
Specification of the HART protocol is based largely on the OSI Seven Layer
Communication Model (see Figure).
The HART protocol specifications directly address 3 layers in the OSI model: the
Physical, Data Link and Application Layers.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
29/73
Industrial data communication
www.arfanali.webs.comPage 29
The Physical Layer
The Physical Layer connects devices together and communicates a bit-stream from one
device to another. It is concerned with the mechanical and electrical properties of the
connection and the medium (the copper wire cable) connecting the devices.
Data Link Layer
While the Physical Layer transmits the bit stream, the Data Link Layer is responsible for
reliably transferring that data across the channel. It organizes the raw bit stream into
packets (framing), adds error detection codes to the data stream. The bit stream is
organized into 8-bit bytes that are further grouped into messages. A HART transaction
consists of a master command and a slave response
The Application Layer
It defines the commands, responses, data types and status reporting supported by the
Protocol.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
30/73
Industrial data communication
www.arfanali.webs.comPage 30
Backward Compatibility
Unlike other digital communication technologies, the HART Protocol provides a unique
communication solution that is backward compatible with the installed base ofinstrumentation in use today. This backward compatibility ensures that investments in
existing cabling and current control strategies will remain secure well into the future.
Two Way Communication
Designed to compliment traditional 4-20mA analog signaling, the HART Protocol
supports two way digital communications for process measurement and control devices.
and makes it possible for additional information beyond just the normal process
variable to be communicated to/from a smart field instrument.
Combination of Analog & Digital
HART Field Communications Protocol extends this 4-20mA standard to enhance
communication with smart field instruments. The HART protocol was designed
specifically for use with intelligent measurement and control instruments, which
traditionally communicate using 4-20mA analog signals. HART preserves the 4-20mA
signal and enables two-way digital communications to occur without disturbing the
integrity of the 4-20mA signal.
HARTMaster/Slave
HART is a master/slave protocol which means that a field (slave) device only speaks
when spoken to by a master. The HART protocol can be used in various modes for
communicating information to/from smart field instruments and central control or
monitoring systems. HART provides for up to two masters (primary and secondary) as
show in Figure 3.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
31/73
Industrial data communication
www.arfanali.webs.comPage 31
This allows secondary masters such as handheld communicators to be used without
interfering with communications to/from the primary master, i.e. control/monitoring
system. The most commonly employed HART communication mode is master/slave
communication of digital information simultaneous with transmission of the 4-20mA
signal as shown in Figure 4.
Network Configuration
The HART protocol permits digital communication with field devices in either point-to-
point or multidrop network configuration.
Point to Point Configuration
In point to point configuration only one slave is connected with Master
Multidrop Network Configuration
In this configuration Master is connected with several slaves (smart devices).
Considerable installation savings are possible with the multidrop networking capability
of HART, which allows multiple field devices to be connected to the same pair of wires.
In multidrop applications, communication with field devices is restricted to digital only as
the loop current is fixed at a minimum value and loses any meaning relative to the
process.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
32/73
Industrial data communication
www.arfanali.webs.comPage 32
Burst Mode
Figure 5 highlights the optional "burst" communication mode where a single slave
device can continuously broadcast a standard HART reply message. Higher update
rates are possible with this optional digital communication mode and use is normally
restricted to point-to-point topologies.
The HART Command Set
The HART Command Set is organized into following three groups and provides
read/write access to the wealth of additional information available in smart field
instruments employing this technology.Universal Commands: Must be implemented by all HART devices and provide
interoperability across the large and growing base of products from different suppliers
supporting the HART technology. Universal Commands provide access to information
that is useful in normal plant operation such as the instrument manufacturer, model, tag,
serial number, descriptor, range limits, and process variables.
Common Practice Commands: Provide access to functions, which can be carried out
by many devices though not all.
Device Specific Commands: Provide access to functions, which may be unique to a
particular device.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
33/73
Industrial data communication
www.arfanali.webs.comPage 33
Figure 7 highlights the type of information that can be obtained from these devices.
Device Description Language (DDL)
Device Description Language (DDL), a recent enhancement to the HART technology,
extends interoperability to a higher level than provided through the Universal and
common Practice Commands. As reflected in Figure 8, DDL provides a field device
(slave) product developer to create a complete description of their instrument and all
relevant characteristics, such that it can talk to any host device using the language.Universal hand-held communicators capable of configuring any HART-based instrument
through DDL are available today.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
34/73
Industrial data communication
www.arfanali.webs.comPage 34
HART DEVICE PARAMETERS
Digital Process VariableValues
Primary Variable with engineering units
Secondary Process Variables with engineering units
Loop Current (milliamps) and percent range
Status and Diagnostic Device malfunction
Primary Variable out of limits
Secondary Variable out of limits
Loop Current fixed or saturated
Configuration changed
Loop test (force loop current)
Device Identification Instrument tag and descriptor Manufacturer
Device type and revision
Final assembly number
Sensor serial number
Calibration Information Date
Range units
Upper and lower range values
Upper and lower sensor limits
Sensor min span
Damping
Message
TECHNICALINFORMATION
Communication Signals
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
35/73
Industrial data communication
www.arfanali.webs.comPage 35
Data Information Data update rate:
Requst/response mode23 updates per second
Optional burst mode34 updates per second
Data byte structure:
1 start bit, 8 data bits, 1 odd parity bit, 1 stop bit
Data integrity:
Two-dimensional error checking
Status information in every reply message
Simple Command
Structure
Communication Masters Two communication masters
Variables Up to 256 variables per device
Wiring Topologies Point to point--simultaneous analog and digital
Point to point--digital only
Multidrop network--digital only (up to 15 devices)
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
36/73
Industrial data communication
www.arfanali.webs.comPage 36
Cable Lengths Maximum twisted-pair length--10,000 ft (3,048 m)
Maximum multiple twisted-pair length--5,000 ft (1,524 m)
Cable length depends on characteristics of individual
products/cable; see specifications for detailed length
calculations
Intrinsically Safe With appropriate barrier/isolator
35-40 data items Standard in every HART device
Device Status & Diagnostic Alerts Process Variables & Units
Loop Current & % Range
Basic Configuration Parameters
Manufacturer & Device Tag
Standard commands provide easy access
Increases control system integrity
Get early warning of device problems
Use capability of multi-variable devices Automatically track and detect changes (mismatch) in Range or Engineering
Units
Validate PV and Loop Current values at control system against those from device
Tested and Accepted global standard
Supported by all major instrumentation manufacturers
Install and commission devices in fraction of the time
Enhanced communications and diagnostics reduce maintenance & downtime
Low or no additional cost by many suppliers Improves Plant Operation and Product Quality
Additional process variables and performance indicators
Continuous device status for early detection of warnings and errors
HART SERVER
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
37/73
Industrial data communication
www.arfanali.webs.comPage 37
The HART Server is a software application that provides a method for accessing the
real time process and diagnostic information available in HART field instrumentation.
HART capable instruments can be connected to the PC serial port through commonly
available RS-232 interfaces. Using the HART Server significantly simplifies access to
HART compatible field device data.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
38/73
Industrial data communication
www.arfanali.webs.comPage 38
Field Level Networks
Overview
Types of buses
Sensor bus
Device bus
Fieldbus
Using multiple buses
Overview
What 's the r ight f ield- level bus for p rocess con trol?
Digital field networks or buses typically connect sensors, actuators, and other I/O
devices with a multi-drop wiring scheme.
Because different network technologies have different capabilities, choosing the right
bus (or buses) for your operation can help minimize project cost and maximize
operational benefits. Making the wrong choice will, at best, cost you money and it
can keep you from achieving the higher yield, better quality, and lower operating costs
your plant is capable of.
Types of Buses
Field-level buses can be grouped in three categories, depending on the device type and
Application for which they were designed:
Sensor bus
Device bus
Fieldbus
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
39/73
Industrial data communication
www.arfanali.webs.comPage 39
Sensorbus
Sensor buses are common in discrete manufacturing. They're used with proximity
switches, pushbuttons, motor starters, and other simple devices where costs must be
minimized and only a few bits of information need to be transmitted.
Sensor buses are designed to handle these "bit-level" communications for simple,
transaction based control and sensing, such as turning something on or off, or indicating
an on-off state. These buses usually cover short to medium distances, using either 2 or
4 wires. They typically are not intrinsically safe. Although designed for discrete
manufacturing, some sensor buses are used in process plants.
Devicebus
Device buses are designed to meet the needs of more-complex devices, often in
fast-moving discrete operations requiring short, fast communications. Paper machines,packaging lines, and motor control centers often use this type of bus.
With message capacities from several bytes to over 200 bytes, depending on the
protocol, device buses can handle more information than sensor buses not only
discrete "on" and "off" signals, but also periodic adjustments and some ancillary analog
information.
Device buses are usually 4-wire and not intrinsically safe. They can communicate athigh speed for short distances, and slower speeds for longer distances.
Two examples of device buses DeviceNet and Profibus-DP were designed for
discrete manufacturing but have been adapted for use in process plants.
Fieldbus
The third type of field network is the most appropriate for control and diagnostics in
process operations. That's because fieldbuses provide highly reliable two-way
communications between "smart" devices and systems in time-critical applications.
They're optimized for messages containing several variables all sampled at the same
time and the status of each variable.
Fieldbuses can be a digital replacement for analog 4-20 mA communications in process
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
40/73
Industrial data communication
www.arfanali.webs.comPage 40
operations. Because requirements in these operations are different from those in
discrete manufacturing, fieldbuses typically have slower transmission rates than device
or sensor buses.
Other differences include support for intrinsic safety and the ability to run on existing
field instrument wiring. In the case of FOUNDATION fieldbus, the technology also
includes standard and open function blocks that support distributed control in the field.
Using Multiple Buses
Many plants use multiple field-level networks, with different types of buses to meet
different needs.
That makes sense but the added complexity can increase implementation and
maintenance costs unless you are using a system that works with different categories of
buses without mapping or gateways.
You can minimize those added costs by limiting the number of network types at each
level of the plant hierarchy.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
41/73
Industrial data communication
www.arfanali.webs.comPage 41
Understanding Ethernet
Overview
Connecting to the business network
Connecting automation subsystems
FOUNDATION fieldbus HSE
Ethernet as a fieldbus?
Using multiple networks
Overview
What's the role of Ethernet?
Because it's widely used in office networking, Ethernet is familiar and inexpensive. But
the plant floor isn't an office, and requirements for process automation aren't the same
as for business applications.
Even so, in the right applications and with the right extensions Ethernet can
reduce costs and improve performance.
Is today's Ethernet technology appropriate for process control?
How is FOUNDATION fieldbus high-speed Ethernet different from standard Ethernet?
Connecting to the business network
Ethernet is the dominant business network technology worldwide, and it's standard
practice for automation systems to provide Ethernet connectivity for business
integration.
Connecting automation subsystems
Most automation systems are a collection of subsystems including controllers,
operator interfaces, and application processors. While some use a proprietary network
to connect these subsystems, the increasingly common approach is to use Ethernet
with proprietary extensions.
The most common method used to carry data from other protocols is tunneling.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
42/73
Industrial data communication
www.arfanali.webs.comPage 42
FOUNDATION fieldbus HSE
The FOUNDATION fieldbus HSE (high-speed Ethernet) protocol uses Ethernet in an
open, interoperable way. With support for redundancy and the FOUNDATION fieldbus
User Layer, HSE has the attributes to become a standards-based automation system
backbone.
Ethernet as a fieldbus?
Interest in using Ethernet to network field-level devices comes from the desire to
combine high performance connectivity and low cost. For discrete manufacturing, this
idea has merit. For process automation, the issue is more complex.
Tough requirements.A process-automation fieldbus has requirements very different
from those for an office-automation network, including
Extreme environmental conditions
Intrinsic safety
Power and signal over the same wires (for two-wire devices)
Compatibility with existing instrument wiring.
Commercial, off-the-shelf Ethernet can't meet these requirements. Industrial Ethernet
with environmentally hardened components, different memory requirements, and
greater robustness comes closer.
The down side. But the cost of adding those capabilities reduces the economic
advantage of Ethernet. And industrial Ethernet doesn't provide intrinsic safety, power
and signal over the same wires, or compatibility with standard instrument wiring.
Ethernet as a fieldbus?
Many plants use multiple networks, including Ethernet where appropriate. That's
reasonable, because no one bus can meet all needs.
But each added layer increases the number of tools, parts, and training as well as
overall implementation and maintenance complexity. That's why there's a trend to
simplify or flatten the overall hierarchy of networks in a plant.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
43/73
Industrial data communication
www.arfanali.webs.comPage 43
For new plants or plant expansions, using the following four types of networks offers a
realistic balance of simplicity and capability:
FOUNDATION fieldbus for basic and advanced regulatory control and for
discrete control associated with regulatory control
One type of device or sensor bus for motor control and machine control
An Ethernet-based automation-system backbone, such as FOUNDATION
fieldbus HSE
A switch or gateway to the Ethernet business network
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
44/73
Industrial data communication
www.arfanali.webs.comPage 44
Introduction to FOUNDATION fieldbus
Overview
What is FOUNDATION fieldbus?
The digital bus advantage
An established standard
Interoperability
Safe and effective process control
Overview
Why sho uld I care about FOUNDATION fieldbu s?
The fact is, it can. It offers distinct advantages over traditional analog and discrete
wiring or even other digital buses at lower total installed cost and lower ongoing
costs.
FOUNDATION fieldbus can deliver these benefits because it's different from
traditional
communication technologies. That doesn't mean it's harder to learn or to use just
different.
How can FOUNDATION fieldbus carry more information than 4-20 mA wiring?
Who controls FOUNDATION fieldbus technology?
For what kind of application was FOUNDATION fieldbus originally designed?
What is FOUNDATION Fieldbus
FOUNDATION fieldbus is an all-digital, serial, two-way communications system that
serves as the base-level network in a plant or factory automation environment.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
45/73
Industrial data communication
www.arfanali.webs.comPage 45
It's ideal for applications using basic and advanced regulatory control, and for much of
the discrete control associated with those functions.
Two related implementations of FOUNDATION fieldbus have been introduced to meet
different needs within the process automation environment. These two implementations
use different physical media and communication speeds.
H1 works at 31.25 Kbit/sec and generally connects to field devices. It provides
communication and power over standard twisted-pair wiring. H1 is currently the most
common implementation.
HSE (High-speed Ethernet) works at 100 Mbit/sec and generally connects input/output
subsystems, host systems, linking devices, gateways, and field devices using standard
Ethernet cabling. It doesn't currently provide power over the cable, although work is
under way to address this.
The digital bus advantage
Conventional analog and discrete field instruments use point-to-point wiring: one wire
pair per device. They're also limited to carrying only one piece of information -- usually a
process variable or control output -- over those wires.
As a digital bus, FOUNDATION fieldbus doesn't have those limitations.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
46/73
Industrial data communication
www.arfanali.webs.comPage 46
Multidrop wiring. FOUNDATION fieldbus will support up to 32 devices on a single pair
of wires (called a segment) -- more if repeaters are used. In actual practice,
considerations such as power, process modularity, and loop execution speed make 4 to
16 devices per H1 segment more typical.
That means if you have 1000 devices -- which would require 1000 wire pairs with
traditional technology -- you only need 60 to 250 wire pairs with FOUNDATION fieldbus.
That's a lot of savings in wiring (and wiring installation).
Multivariable instruments. That same wire pair can handle multiple variables from one
field device. For example, one temperature transmitter might communicate inputs from
as many as eight sensors -- reducing both wiring and instrument costs.
Two-way communication. In addition, the information flow can now be two-way. A
valve controller can accept a control output from a host system or other source and
send back the actual valve position for more precise control. In an analog world, that
would take another pair of wires.
New types of information. Traditional analog and discrete devices have no way to tell
you if they're operating correctly, or if the process information they're sending is valid.
As a consequence, technicians spend a lot of time verifying device operation.
But FOUNDATION fieldbus devices can tell you if they're operatingcorrectly, and if the information they're sending is good, bad, or uncertain. Thiseliminates the need for most routine checks -- and helps you detect failureconditions before they cause a major process problem.
Control in the field. FOUNDATION fieldbus also offers the option of executing some or
all control algorithms in field devices rather than a central host system. Depending on
the application, control in the field may provide lower costs and better performance --
while enabling automatic control to continue even if there's a host-related failure.
An established standard
FOUNDATION fieldbus is covered by standards from three major organizations:
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
47/73
Industrial data communication
www.arfanali.webs.comPage 47
ANSI/ISA 50.02
IEC 61158
CENELEC EN50170:1996/A1
The technology is managed by the independent, not-for-profit Fieldbus Foundation,
whose 150+ member companies include users as well as all major process automation
suppliers around the globe.
Safe and efficient process control
Some communication protocols that were originally designed for factory or office
automation are proving useful in specific applications in process plants. But none of
these protocols was designed with the full requirements of process control in mind. As a
result, they are less-than optimum choices for providing safe and effective process
control.
FOUNDATION fieldbus H1, on the other hand, was developed specifically to meet the
needs of the process industry.
It can withstand the harsh and hazardous environment of process plants.
It delivers power and communications over the same pair of wires.
It can use existing plant wiring.
It supports intrinsic safety.
In short, it's designed to operate where your process does.
Control you can count on. FOUNDATION fieldbus also provides deterministic process
control. If fieldbus devices lose their connection to the host system, they are capable of
maintaining safe and effective control across the bus.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
48/73
Industrial data communication
www.arfanali.webs.comPage 48
Fieldbus communications
Overview
The communications model
Physical layer
Data link and application layers
User layer
Scheduled communications
Unscheduled communications
Parameter status
Application clock
Link active scheduler
Device address assignment
Find tag service
Overview
How d oes data get wh ere it 's needed -- when i t 's n eeded?
One of the most important aspects of FOUNDATION fieldbus is its ability to collect and
deliver vast amounts of information -- not only process variables and control signals, but
other types of instrument and process data as well.
It does this consistently and reliably, while also providing interoperability between
devices from different manufacturers -- and compatibility with existing wiring. This
course describes key
The communications model
The FOUNDATION fieldbus communications model has three parts:
The physical layer
The data link and application layers
The user layer
Physical layer
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
49/73
Industrial data communication
www.arfanali.webs.comPage 49
The first functional layer of the FOUNDATION fieldbus communications model is the
physical layer, which deals with translating messages into physical signals on the wire --
and vice versa.
The physical layer also provides the common electrical interface for all FOUNDATION
fieldbus devices. FOUNDATION fieldbus H1 segments require 9-32 volts DC power and
approximately 15-20 mA of current per device. They operate at a communication speed
of 31.25 kbaud.
The FOUNDATION fieldbus physical layer is defined by approved standards (IEC 1158-
2 and ANSI/ISA 50.02, part 2). It can run on existing field wiring over long distances,
supports two-wire devices, and offers intrinsic safety as an option. In short, it's an ideal
match for a typical process-automation environment.
Data link and application layers
The second part of the communication model combines several technologies that
together control transmission of data on the fieldbus. The data link and applications
layers provide a standard way of "packaging" the data, as well as managing the
schedule for communication and function-block execution.
User layer
The user layer sits on top of the communications stack, where it enables you to interact
with the other layers and with other applications.
The user layer contains resource blocks, transducer blocks, and function blocks that
describe -- and execute -- device capabilities such as control and diagnostics. Device
descriptions enable the host system to interact with and understand these blocks
without custom programming.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
50/73
Industrial data communication
www.arfanali.webs.comPage 50
Scheduled communications
All devices and function blocks on a FOUNDATION fieldbus segment execute and
communicate process control information on a regular, repeating cycle.
Timing for this type of communication is determined by a master schedule in a Link
Active Scheduler, which is a function residing in the host system. These
communications are also deterministic. This means that they always occur on a
predetermined schedule, so information is certain to be broadcast (and received)
precisely when it's needed.
The result is regular and precision execution of communication and control, which helps
reduce process variability. For fast or time-critical control loops, control on
FOUNDATION fieldbus can improve plant performance.
Unscheduled communications
FOUNDATION fieldbus supports a great deal of information beyond process loop
control data.
These other types of information include
Configuration information sent to devices or a central database
Alarm, event, and trend data
Information for operator displays
Diagnostic and status information.
This information is important, but not as time-critical as loop control information.
Flexible timing. FOUNDATION fieldbus gives this information a lower priority on the
segment than scheduled control-loop-related communications. However, a certain
amount of time in the communication cycle is reserved for these unscheduled (or
"acyclic") communications to ensure that the segment is not too loaded to carry the
information.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
51/73
Industrial data communication
www.arfanali.webs.comPage 51
Application clock
Every device on a FOUNDATION fieldbus segment shares the same time.
A system management function called the application clock periodically broadcasts
the time -- either local time or Universal Coordinated Time -- to all devices. Each device
uses an internal clock to keep time between these synchronization broadcasts.
Alarms and events are time-stamped at the device where they occur, when they occur
not later when they're received by a historian, alarm log, or other application on a host
system.
Because of this approach, FOUNDATION fieldbus provides superior time resolution and
accuracy for activities such as sequence-of-events recording and analysis.
Device address assignment
As a digital, multidrop bus, FOUNDATION fieldbus carries signals to and from several
devices over the same cable. To identify which information is associated with which
device, each device is assigned an address.
Depending on the communication protocol, addresses can be assigned in several ways,
from dip switches or off-line addressing to automatic online assignment.
Methods such as using dip switches or offline addressing carry the risk of human errors,
such as inadvertently assigning an address to more than one device. These addressing
errors can cause communication problems, or in extreme cases prevent the bus from
working. That's why FOUNDATION fieldbus doesn't allow these methods of address
assignment.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
52/73
Industrial data communication
www.arfanali.webs.comPage 52
MODBUS PROTOCOL
The MODBUS Protocol is an asynchronous protocol designed to connect directly to
computer communication ports. The protocol may be used either in a point-to-point or in
a multi-drop configuration. The protocol can be used in either half or full-duplex
operation.
Protocol overview
Master-Slave protocol
This protocol takes place at level 2 of the OSI model.
A master-slave type system has one node (the master node) that issues explicit
commands to one of the "slave" nodes and processes responses. Slave nodes will not
typically transmit data without a request from the master node, and do not communicate
with other slaves.
Layers of Modbus
At the physical level, MODBUS over Serial Line systems may use different physical
interfaces (RS485, RS232). TIA/EIA-485 (RS485) Two-Wire interface is the most
common. As an add-on option, RS485 Four-Wire interface may also be implemented. A
TIA/EIA-232- E (RS232) serial interface may also be used as an interface, when only
short point to point communication is required.
The following figure gives a general representation of MODBUS serial communication
stack compared to the 7 layers of the OSI model.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
53/73
Industrial data communication
www.arfanali.webs.comPage 53
MODBUS Data Link LayerMODBUS Master / Slaves protocol principle
The MODBUS Serial Line protocol is a Master-Slaves protocol. Only one master (at the
same time) is connected to the bus, and one or several (247 maximum number) slaves
nodes are also connected to the same serial bus. A MODBUS communication is always
initiated by the master. The slave nodes will never transmit data without receiving a
request from the master node. The slave nodes
will never communicate with each other. The master node initiates only one MODBUS
transaction at the same time.
The master node issues a MODBUS request to the slave nodes in two modes :
Unicast Mode
Broadcast Mode
Unicast Mode
In this mode, the master addresses an individual slave. After receiving and processing
the request, the slave returns a message (a 'reply') to the master.
In that mode, a MODBUS transaction consists of 2 messages : a request from the
master, and a reply from the slave. Each slave must have a unique address (from 1 to
247) so that it can be addressed independently from other nodes.
Broadcast Mode
In this mode, the master can send a request to all slaves. No response is returned to
broadcast requests sent by the master. The broadcast requests are necessarily writing
commands. All devices must accept the broadcast for writing function. The address 0 is
reserved to identify a broadcast exchange.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
54/73
Industrial data communication
www.arfanali.webs.comPage 54
MODBUS Addressing rules
The MODBUS addressing space comprises 256 different addresses.
The Address 0 is reserved as the broadcast address. All slave nodes must recognize
the broadcast address.
The MODBUS Master node has no specific address, only the slave nodes must have an
address. This address must be unique on a MODBUS serial bus.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
55/73
Industrial data communication
www.arfanali.webs.comPage 55
MODBUS frame description
The MODBUS application protocol [1] defines a simple Protocol Data Unit (PDU)
independent of the underlying communication layers:
The mapping of MODBUS protocol on a specific bus or network introduces some
additional fields on the Protocol Data Unit. The client that initiates a MODBUS
transaction builds the MODBUS PDU, and then adds fields in order to build the
appropriate communication PDU.
On MODBUS Serial Line, the Address field only contains the slave address.
As described in the previous section the valid slave nodes addresses are in the range of
0247 decimal. The individual slave devices are assigned addresses in the range of 1
247. A master addresses a slave by placing the slave address in the address field of
the message. When the slave returns its response, it places its own address in the
response address field to let the master know which slave is responding.
The function code indicates to the server what kind of action to perform. The function
code can be followed by a data field that contains request and response parameters.
Error checking field is the result of a "Redundancy Checking" calculation that is
performed on the message contents.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
56/73
Industrial data communication
www.arfanali.webs.comPage 56
2.4.1 Master State diagram
The following drawing explains the Master behavior :
Some explanations about the state diagram above :
State "Idle"= no pending request. This is the initial state after power-up. A request can
only be sent in "Idle" state. After sending a request, the Master leaves the "Idle" state,
and cannot send a second request at the same time
When a unicast request is sent to a slave, the master goes into "Waiting for reply"
state, and a Response Time-out is started.
When a reply is received, the Master checks the reply before starting the data
processing. The checking may result in an error, for example a reply from an
unexpected slave, or an error in the received frame. In case of an error detected on the
frame, a retry may be performed.The maximum number of retries depends on the
master set-up.
When a broadcast requestis sent on the serial bus, no response is returned from theslaves. Nevertheless a delay is respected by the Master in order to allow any slave to
process the current request before sending a new one. This delay is called "Turnaround
delay".
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
57/73
Industrial data communication
www.arfanali.webs.comPage 57
In unicast the Response time out must be set long enough for any slave to process the
request and return the response, in broadcast the Turnaround delay must be long
enough for any slave to process only the request and be able to receive a new one.
2.4.2 Slave State Diagram
The following drawing explains the Slave behavior :
Some explanations about the above state diagram :
State "Idle" = no pending request. This is the initial state after power-up.
When a request is received, the slave checks the packet before performing the action
requested in the packet. Different errors may occur: format error in the request, invalid
action, In case of error, a reply must be sent to the master.
Once the required action has been completed, a unicast message requires that a reply
must be formatted and sent to the master.
If the slave detects an error in the received frame, no response is returned to the
master.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
58/73
Industrial data communication
www.arfanali.webs.comPage 58
Serial Transmission Modes
Two different serial transmission modes are defined.
The RTU mode
The ASCII mode.
It defines the bit contents of message fields transmitted serially on the line. It
determines how information is packed into the message fields and decoded.
RTU Transmission Mode
When devices communicate on a MODBUS serial line using the RTU (Remote Terminal
Unit) mode, each 8bit byte in a message contains two 4bit hexadecimal characters.
Each message must be transmitted in a continuous stream of characters.
The format for each byte ( 11 bits ) in RTU mode is :
Coding System: 8bit binary
Bits per Byte: 1 start bit
8 data bits, least significant bit sent first
1 bit for parity completion
1 stop bit
How Characters are Transmitted Serially :
Each character or byte is sent in this order (left to right):
Least Significant Bit (LSB) . . . Most Significant Bit (MSB)
Devices may accept by configuration either Even, Odd, or No Parity checking. If No
Parity is implemented, an additional stop bit is transmitted to fill out the character frame
to a full 11-bit asynchronous character :
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
59/73
Industrial data communication
www.arfanali.webs.comPage 59
Frame description :
MODBUS Message RTU Framing
A MODBUS message is placed by the transmitting device into a frame that has a known
beginning and ending point. This allows devices that receive a new frame to begin at
the start of the message, and to know when the message is completed. Partial
messages must be detected and errors must be set as a result.
In RTU mode, message frames are separated by a silent interval of at least 3.5
character times. In the following sections, this time
interval is called t3,5.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
60/73
Industrial data communication
www.arfanali.webs.comPage 60
The entire message frame must be transmitted as a continuous stream of characters. If
a silent interval of more than 1.5 character times occurs between two characters, the
message frame is declared incomplete and
should be discarded by the receiver.
MODBUS ASCII modeWhen controllers are setup to communicate on a Modbus network using ASCII
(American Standard Code for Information Interchange) mode, each 8bit byte in amessage is sent as two ASCII characters. The main advantage of this mode is that itallows time intervals of up to one second to occur between characters
without causing an error.
This mode is used when capabilities of the device does not allow the onformance with
RTU mode requirements regarding timers management.
This mode is less efficient than RTU since each byte needs two characters.
The format for each byte in ASCII mode is:
Coding System: Hexadecimal, ASCII characters 09, AF
One hexadecimal character contained in each ASCII character of the message.
Bits per Byte: 1 start bit
7 data bits, least significant bit sent first
1 bit for even/odd parity; no bit for no parity
1 stop bit if parity is used; 2 bits if no parity
Error Check Field:Longitudinal Redundancy Check (LRC)
Example : The byte 0X5B is encoded as two characters : 0x35 and 0x42
(0x35 ="5", and 0x42 ="B" in ASCII ).
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
61/73
Industrial data communication
www.arfanali.webs.comPage 61
Implementation Classes
Each device on a MODBUS Serial Line must respect all the mandatoryrequirements of
a same implementation class.
The following parameters are used to classify the MODBUS Serial Line devices :
Addressing
Broadcasting
Transmission mode
Baud rate
Character format
Electrical interface parameter
Two implementation classes are proposed, the Basic and the Regular classes.
The regular class must provide configuration capabilities.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
62/73
Industrial data communication
www.arfanali.webs.comPage 62
UHF TELEMETRY RADIO
Operational Description
The UHF Telemetry Radio Modem is typically a full duplex 9600 bits per second device,
which converts digital data into an analogue form suitable for transmission over a radio
channel. It uses specially filtered direct binary frequency modulation techniques to
achieve this. It conversely, converts the analogue signal derived from a radio channel
into a digital data signal.
The heart of the unit is the modem. This performs all waveform shaping, clock recovery,
and framing and CRC error generation and checking. These functions are performed
simultaneously, allowing full duplex operation at up to 9600bps. The user is provided
with two RS232 compatible ports, which may each be configured with a standard
interface or protocol drivers. The unit may also be configured for repeater operation. It
may be configured to use RS232 handshake lines, or XON/XOFF flow control on Port.
The host user port may be configured for baud rates of 300 to 19K2, with 7 or 8 bit
character size, 1 or 2 stop bits, and parity off/odd/even.
Configuration of the modem is fully programmable, with parameters held in non-volatile
memory. All configuration parameters are accessible with the proprietary Installation
Program.
Following are some of configuration parameters.
o XON/XOFF or RTS/CTS/DTR/DCD handshake mode.
o Default transmitter lead in delay.
o Constant specifying minimum RF RSSI for valid receive.
o Constant specifying minimum Tx power level.
o Asynchronous serial port parameters.
o User interface operating mode :
o User port interface protocol
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
63/73
Industrial data communication
www.arfanali.webs.comPage 63
SPECIFICATIONSRadio Section
Rx frequency range : 923MHz to 933MHz (see note 1)
Tx frequency range : 847MHz to 857MHz (see note 2)
Channel spacing : 25kHz
Frequency stability : 1 ppm (-100C to 650C amb), [opt -300C to 700C],
Aging
8/10/2019 Industrial Data Communication
64/73
Industrial data communication
www.arfanali.webs.comPage 64
HARDWARE TECHNICAL DESCRIPTION
The unit can be divided into following section.
Radio section
Antenna diplexer section.
Modem section
Radio Section
The radio section is built on a single PCB. This section consists of the following main
blocks :
o Receiver.
o Transmitter.
o Frequency control.
ANTENNA DIPLEXER SECTION
The diplexer couples both the transmit and receive RF paths to the antenna while
providing high isolation between them.
MODEM SECTION
The modem section is a single PCB having following main blocks:
o Modem along with control circuitary
o Reset and watchdog.
o Memory (RAM & EPROM)
o Host interface.
o Radio interface.
o Transmit signal conditioning.
o Receive signal conditioning.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
65/73
Industrial data communication
www.arfanali.webs.comPage 65
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
66/73
Industrial data communication
www.arfanali.webs.comPage 66
SUPERVISORY CONTROL & DATA ACQUISITION SYSTEM (SCADA)
Communication Techniques adopted by SCADA
Polling method
Report by exception method
Polling
Polling communication, where a Master (normally a PLC or PC) polls the Slaves
(normally RTUs).
Report by exception
Report By Exception, where packets are sent whenever:
i) If there is a change in the STATUS of the RTU.
ii) After a user specified time out, even if there are no changes in these register
values.
Main Units of SCADA
Master Unit
RTUs
HMI Software
Master UnitNormally a PLC or PC is used as Master Unit of SCADA which polls RTUs & sends the
status of I/Os of RTUs to HMI Software for monitoring purpose.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
67/73
Industrial data communication
www.arfanali.webs.comPage 67
Typical RTU Main functions
V25
CPU/RAM/POWER
MICROPROCESSOR
SUPERVISORY Cct CIRCUIT
WATCHDOG
DECODER
ADDRESS
ADDRESS BUS
DATA BUS
1Mb
STATIC RAM EPROM
512Kb
EXTENSION
TO BUS
BOARDS
LATCHES
DATA
ENCODER
/DECODERSERIAL I/O BUS
(DIGITAL & ANALOG BOARDS
COMM11200Bd FSK
MODEM
DIGITAL & ANALOG
INPUT/OUTPUTS
BOARD
TO LINE
ISOLATION
INPUT/OUTPUTS
CONFIG & ADDRESS
SWITCHES
INPUT
POWER FILTER
+12V
REGULATOR
REGULATOR
+5V
INTERNAL POWER
CLOCK
REAL TIME
Main components of RTU
Microprocessor
RAM
EPROM
Address Decoder
Watch Dog Ckt.
FSK Modem
Addressing Modes
Configuration & address Switches
Power Supply
Buffers
Latches
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
68/73
Industrial data communication
www.arfanali.webs.comPage 68
Opto couplers
A/D Convertor (ADC)
D/A Convertor
Analog Inputs
Analog Outputs
Digital Inputs
Digital Outputs
Serial Ports
Serial Input/Output bus
Analogue-to-digital converter (ADC)
The analogue signal is sampled(i.e. measured at regularly spaced instants) (Figure )
and then quantised(i.e. converted to discrete numeric values) (Figure ). The greater
the number of quantisation levels, the lesser the quantisation error. The converse
operation to the ADC is performed by a digital-to-analogue converter (DAC).
Figure: Periodic sampling of an analogue signal
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
69/73
Industrial data communication
www.arfanali.webs.comPage 69
Figure: Quantisation of a sampled signal
The ADC process is governed by an important law. The Nyquist-Shannon Theorem
states that an analogue signal of bandwidth B can be completely recreated from its
sampled form provided it is sampled at a rate s equal to at least twice its bandwidth.That is:
The rate at which an ADC generates bits depends on how many bits are used in the
converter. For example, a speech signal has an approximate bandwidth of 4KHz. If this
is sampled by an 8-bit ADC at the Nyquist sampling rate, the bit rate Ris:
RTU Registers/Boards
Physical I/Os Registers/Boards
Global Communication Registers/Boards
HMI SCADA Software
HMI SCADA Software provides a user interface to monitor & control I/Os of RTUs.
Normally Master Unit of SCADA which polls slaves (RTUs) acts as a Modbus Slave &
HMI Software as Modbus Server.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
70/73
Industrial data communication
www.arfanali.webs.comPage 70
Upgradation Details of SCADA System of Dhodak
R T U 1
R T U 8
R a d io M o d e m M T U
P T U 1
P T U 2
P T U 3
P T U 4
4 8 5 B U S
R T U 1
R T U 8
R a d io M o d e m
M T U P T U 1
P T U 2
P T U 3
P T U 4
4 8 5 B U S
AL M O S
P r o t o c o l
C o n v e r t e r
An y th i r d p a r t y p o f t w a r e
( D C S )
f o r m o n i t o r in g & c o n t r o l o f
R S 2 3 2
2 3 2 o r 4 8 5
2 3 2 o r 4 8 5
C u r r e n t S y s t e m
L CD
L CD
L CD
L CD
L CD
L CD
L CD
L CD
L CD
L CD
M O D B U S
P r o t o c o l
R e p e a t e r
P l a n t S i t e
W e l l S i t e s
Di s t a n c e b e t w e e n P la n t & R e p e a t e r : 2 5 K M
R e p e a t e r
P r o p o s e d S y s t e m
W e l l S i t e s P l a n t S i t e
R S 2 3 2 / R s 4 8 5
AL M O S Pro to c o l
C o n v e r t e r
An y th ir d P a r t y S o f t w a r e
f o r m o n it o r in g & c o n t r o l
o f
M o d b u s P r o t o c o l
R a d io M o d e m
P C f o r P r o d u c t i o n
O f f i ce
T x : 8 5 2 M h z
R x : 9 2 8 M h z
T x : 8 5 2 M h z
R x : 9 2 8 M h z
T x : 8 5 2 M h z
R x : 9 2 8 M h z
T x : 8 5 2 M h z
R x : 9 2 8 M h z
T x : 8 5 2 M h z
R x : 9 2 8 M h z
T x : 8 5 2 M h z
R x : 9 2 8 M h z
T x : 8 5 2 M h z
R x : 9 2 8 M h z
T x : 9 2 8 M h z
R x : 8 5 2 M h z
T x : 9 2 8 M h z
R x : 8 5 2 M h z
Communication Arrangements
In the new arrangement the MTUs central role is taken over by the PC. The PC needs
at least 4 RS 232 ports to communicate to the different sub systems.
1) Connection to the Well RTU-s. This communication going through first a couple
of land line modems. The actual communication between the well RTU-s and the
central site uses a radio network including a repeater.
2) Connection to the MTU. There is an RS232 communication line between the PCand the MTU. The speed is 9600 Baud. This communication uses the MTU
CPUs RS232 port.
3) Connection to the PTU-s. A two wire 485 bus is used to communicate between
the PC and the PTU-s. The speed is 9600 Baud. This communication uses the
PTU CPU-s RS232 port.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
71/73
Industrial data communication
www.arfanali.webs.comPage 71
4) Connection to the MODBUS Master. There is an RS232 communication line
between the PC and the MODBUS Master. The speed is 9600 Baud.
PC-to-PC Communication
Communications between the Protocol converter PC and a third party SCADA package
is based on the MODBUS RTU protocol implemented on a serial line. The
communication protocol parameters can be viewed and changed used WASPED.
ALCOM-to-RTU Communication
Communications between PCs and RTU-s are based on a proprietary Almos protocol.
In the DHODAK implementation all RTU-s are connected via radio network (RTU-s),
485 bus (PTU-s) and through direct RS232. RTU-s are identified by a unique station
address, which must be unique in the entire system.
The radio network contains the HOST computer, a repeater, and the remote stations.
Because of the usage of the repeaters there are two different frequencies are used for
TX and RX.
ALCOM-to-RTU Communication
The ALCOMRTU communication protocol is a MASTER (ALCOM) SLAVE (RTU)
type communication protocol.
RTU can only talk if ALCOM has selected the RTU for talking by asking information or
by writing information into the RTU and asking for acknowledge.
Each RTU has a unique station address. Whenever ALCOM wants to communicate to
a given RTU the required communication command will contain the station address of
the given RTU.
http://www.arfanali.webs.com/http://www.arfanali.webs.com/http://www.arfanali.webs.com/8/10/2019 Industrial Data Communication
72/73
Industrial data communication
www.arfanali.webs.comPage 72
Field Name Explanation Default
InOutUsage N.A 0
BaudRate Communication baud rate
between the