100% found this document useful (2 votes)
493 views73 pages

Industrial Data Communication

This document discusses serial communication protocols for industrial data communication. It describes three modes of communication - simplex, half duplex, and full duplex. It also discusses serial versus parallel communication, the RS-232 standard including pinouts and signal descriptions, and provides examples of common RS-232 cable wirings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
493 views73 pages

Industrial Data Communication

This document discusses serial communication protocols for industrial data communication. It describes three modes of communication - simplex, half duplex, and full duplex. It also discusses serial versus parallel communication, the RS-232 standard including pinouts and signal descriptions, and provides examples of common RS-232 cable wirings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

Industrial Data

Communication
Communication protocols
ARFAN ALI

www.arfanali.webs.com

Industrial data communication


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.

www.arfanali.webs.com
Page 2

Industrial data communication

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).

www.arfanali.webs.com
Page 3

Industrial data communication


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. An RS-232 based 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)

www.arfanali.webs.com
Page 4

Industrial data communication

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 Descriptions
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:

www.arfanali.webs.com
Page 5

Industrial data communication

D-Type-25
Pin No.

Pin 2

D-Type-9
Pin No.

Pin 3

Abbreviation

TD

Full Name

Function

Transmit
Data

DTE Serial Data Output (TD)


Data is sent from a DTE device
to a DCE device on this wire.
The TD line is kept in a mark
condition by the DTE device
when it is idle.

Pin 3

Pin 4

Pin 2

Pin 7

RD

RTS

DTE Serial Data Input (RD)


A DTE device receives data on

Receive
Data

the RD (receive data) wire, and


the DCE device keeps this line in
a mark condition when idle.

Request
To Send

The DTE device puts this line in


a mark condition to tell the
remote device that it is ready
and able to receive data. If the
DTE device is not able to receive
data (typically because its
receive buffer is almost full), it
will put this line in the space
condition as a signal to the DCE
to stop sending data. When the
DTE device is ready to receive
more data (i.e. after data has
been removed from its receive
buffer), it will place this line back
in the mark condition.
The complement of the RTS wire
is CTS. The DCE device puts this

Pin 5

Pin 8

CTS

Clear
Send

To

line in a mark condition to tell


the DTE device that it is ready to
receive the data. Likewise, if the
DCE device is unable to receive
data, it will place this line in the
space condition.

www.arfanali.webs.com
Page 6

Industrial data communication

Pin 6

Pin 6

DSR

Data Set
Ready

Pin 7

Pin 5

SG

Signal
Ground

Pin 8

Pin 20

Pin 1

Pin 4

CD

DTR

Carrier
Detect

Data
Terminal
Ready

DSR (Data Set Ready) is the


companion to DTR in the same
way that CTS is to RTS.

A modem uses Carrier Detect to


signal that it has made a
connection with another modem,
or has detected a carrier tone.
Its intended function is very
similar to the RTS line. Some
serial devices use DTR and DSR
as signals to simply confirm that
a 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

RI

Ring
Indicator

A modem toggles the state of


this line when an incoming call
rings your phone.

www.arfanali.webs.com
Page 7

Industrial data communication

DTE devices

Communications servers

Terminals

Serial printers

Computers with native RS-232-E serial ports

DCE devices
Modems and other communications equipment

www.arfanali.webs.com
Page 8

Industrial data communication


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

DB251 Pin No.

DB92 Pin No.

DTE

Transmit

Receive

Ground

Transmit

Receive

Ground

DCE

www.arfanali.webs.com
Page 9

Industrial data communication


BASIC RS-232 DATA CIRCUITS

www.arfanali.webs.com
Page 10

Industrial data communication

www.arfanali.webs.com
Page 11

Industrial data communication


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 <------------------------ 3

RTS 4 ------------------------> 4
CTS 5 <------------------------ 5
DSR 6 ------------------------> 6
DCD 8 ------------------------> 8
DTR 20 ------------------------> 20
SG

7 ------------------------- 7

RI 22 <------------------------ 22

DTE (9 pin)

DCE (25 pin)

TD

3 ------------------------> 2

RD

2 <------------------------ 3

RTS 7 ------------------------> 4
CTS 8 <------------------------ 5
DSR 6 ------------------------> 6
DCD 1 ------------------------> 8
DTR 4 ------------------------> 20
SG

5 ------------------------- 7

RI

9 <------------------------ 22

www.arfanali.webs.com
Page 12

Industrial data communication


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 <------------------------ 3

RTS 4 ----,

,----- 4

CTS 5 <---'

'----> 5

DSR 6 <---,

,----> 6

DCD 8 <---|

|----> 8

DTR 20 ----'

'----- 20

SG

7 ------------------------- 7

DTE (9 pin)

DCE (25 pin)

TD

3 ------------------------> 2

RD

2 <------------------------ 3

RTS 7 ----,

,----- 4

CTS 8 <---'

'----> 5

DSR 6 <---,

,----> 6

DCD 1 <---|

|----> 8

DTR 4 ----'
SG

'----- 20

5 ------------------------- 7

www.arfanali.webs.com
Page 13

Industrial data communication


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

www.arfanali.webs.com
Page 14

Industrial data communication

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

www.arfanali.webs.com
Page 15

Industrial data communication


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 but
does not support hardware handshaking.
DTE (25 pin)
TD
RD
RTS
CTS
DSR

DTE (25 pin)

2 ---------\ /------------- 2
3 <--------/ \------------> 3
4 ----,
,----- 4
5 <---'
'----> 5
6 <---,
,----> 6

DCD 8 <---|
|----> 8
DTR 20 ----'
'----- 20
SG 7 ------------------------- 7
DTE (25 pin)

DTE (9 pin)

TD
RD
RTS
CTS

2 ---------\ /------------- 3
3 <--------/ \------------> 2
4 ----,
,----- 7
5 <---'
'----> 8

DSR
DCD
DTR
SG

6 <---,
,----> 6
8 <---|
|----> 1
20 ----'
'----- 4
7 ------------------------- 5

DTE (9 pin)
TD
RD
RTS
CTS

3 ---------\ /------------- 3
2 <--------/ \------------> 2
7 ----,
,----- 7
8 <---'
'----> 8

DSR 6 <---,
DCD 1 <---|
DTR 4 ----'
SG

DTE (9 pin)

,----> 6
|----> 1
'----- 4

5 ------------------------- 5

www.arfanali.webs.com
Page 16

Industrial data communication


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.
With RS-232 communication, 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
www.arfanali.webs.com
Page 17

Industrial data communication

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 the
conversation 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.

www.arfanali.webs.com
Page 18

Industrial data communication

Comparison of specs. among RS232, RS422 & RS485


RS-232

RS-422

RS-485

Mode of Operation

single ended

differential

differential

Drivers per Line

32

Receivers per Line

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

3k to 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

3k to 7k

4k

12k

www.arfanali.webs.com
Page 19

Industrial data communication

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 using
the 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

www.arfanali.webs.com
Page 20

Industrial data communication

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.

www.arfanali.webs.com
Page 21

Industrial data communication

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 stream
encoding, 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.

www.arfanali.webs.com
Page 22

Industrial data communication


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.

www.arfanali.webs.com
Page 23

Industrial data communication


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 protocol has 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

www.arfanali.webs.com
Page 24

Industrial data communication

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

www.arfanali.webs.com
Page 25

Industrial data communication

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.

www.arfanali.webs.com
Page 26

Industrial data communication

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.

www.arfanali.webs.com
Page 27

Industrial data communication

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.
www.arfanali.webs.com
Page 28

Industrial data communication


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.

www.arfanali.webs.com
Page 29

Industrial data communication

Backward Compatibility
Unlike other digital communication technologies, the HART Protocol provides a unique
communication solution that is backward compatible with the installed base of
instrumentation 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.

www.arfanali.webs.com
Page 30

Industrial data communication

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-topoint 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.

www.arfanali.webs.com
Page 31

Industrial data communication


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.

www.arfanali.webs.com
Page 32

Industrial data communication

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.

www.arfanali.webs.com
Page 33

Industrial data communication

HART DEVICE PARAMETERS

Primary Variable with engineering units


Secondary Process Variables with engineering units

Digital Process Variable

Loop Current (milliamps) and percent range

Values
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

TECHNICAL
INFORMATION
Communication Signals

www.arfanali.webs.com
Page 34

Industrial data communication

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)

www.arfanali.webs.com
Page 35

Industrial data communication

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
www.arfanali.webs.com
Page 36

Industrial data communication

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.

www.arfanali.webs.com
Page 37

Industrial data communication


Field Level Networks

Overview

Types of buses

Sensor bus

Device bus

Fieldbus

Using multiple buses

Overview
What's the right field-level bus for process control?
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

www.arfanali.webs.com
Page 38

Industrial data communication


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 at
high 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

www.arfanali.webs.com
Page 39

Industrial data communication

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.

www.arfanali.webs.com
Page 40

Industrial data communication


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.

www.arfanali.webs.com
Page 41

Industrial data communication


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.

www.arfanali.webs.com
Page 42

Industrial data communication

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

www.arfanali.webs.com
Page 43

Industrial data communication


Introduction to FOUNDATION fieldbus

Overview

What is FOUNDATION fieldbus?

The digital bus advantage

An established standard

Interoperability

Safe and effective process control

Overview
Why should I care about FOUNDATION fieldbus?
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.

www.arfanali.webs.com
Page 44

Industrial data communication

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.

www.arfanali.webs.com
Page 45

Industrial data communication


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 operating


correctly, and if the information they're sending is good, bad, or uncertain. This
eliminates the need for most routine checks -- and helps you detect failure
conditions 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:

www.arfanali.webs.com
Page 46

Industrial data communication

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.

www.arfanali.webs.com
Page 47

Industrial data communication


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 does data get where it's needed -- when it's needed?
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
www.arfanali.webs.com
Page 48

Industrial data communication

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 11582 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.

www.arfanali.webs.com
Page 49

Industrial data communication


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.

www.arfanali.webs.com
Page 50

Industrial data communication


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.

www.arfanali.webs.com
Page 51

Industrial data communication


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.

www.arfanali.webs.com
Page 52

Industrial data communication


MODBUS Data Link Layer
MODBUS 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.

www.arfanali.webs.com
Page 53

Industrial data communication

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.

www.arfanali.webs.com
Page 54

Industrial data communication

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
0 247 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.

www.arfanali.webs.com
Page 55

Industrial data communication


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 request is sent on the serial bus, no response is returned from the
slaves. 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".

www.arfanali.webs.com
Page 56

Industrial data communication

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.

www.arfanali.webs.com
Page 57

Industrial data communication


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 :

www.arfanali.webs.com
Page 58

Industrial data communication

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.

www.arfanali.webs.com
Page 59

Industrial data communication

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 mode


When controllers are setup to communicate on a Modbus network using ASCII
(American Standard Code for Information Interchange) mode, each 8bit byte in a
message is sent as two ASCII characters. The main advantage of this mode is that it
allows 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 ).

www.arfanali.webs.com
Page 60

Industrial data communication


Implementation Classes
Each device on a MODBUS Serial Line must respect all the mandatory requirements 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.

www.arfanali.webs.com
Page 61

Industrial data communication


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

www.arfanali.webs.com
Page 62

Industrial data communication


SPECIFICATIONS
Radio 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 <= 1ppm/Annum

Power output : +30 dBm 1dBm (1W nom) at Antenna connector

Switchable under software control 200mW/1W

Duty cycle : Continuous

Output impedance : 50 Ohms

Full duplex with single antenna.

Note 1. The reciprocal frequency option for point-to-point operation or point to multipoint base repeaters is available as follows :
- Rx frequency range 847MHz to 857 MHz.
- Tx frequency range 923MHz to 933 MHz.
Note 2. The transmitter is normally supplied, with its frequency offset from the receiver
by 76 MHz.
Modem Section

User Ports : DB-9 connector, EIA RS232, DCE, serial asynchronous, 300..19k2
baud, 7/8 bit, no/odd/even parity.

Data Rate : 9600 bps Full Duplex.

BER : Less than 10E-6 @ -105dbm measured at antenna port

Data Format : Narrow band digital filtered binary FSK Modulation,

C/DSMA collision avoidance scheme.

Synchronization Delay : 20 milliseconds.

www.arfanali.webs.com
Page 63

Industrial data communication


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.

www.arfanali.webs.com
Page 64

Industrial data communication

www.arfanali.webs.com
Page 65

Industrial data communication


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 Unit
Normally 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.

www.arfanali.webs.com
Page 66

Industrial data communication


Typical RTU Main functions
CONFIG & ADDRESS
SWITCHES

TO LINE
ISOLATION
BOARD

1200Bd FSK
MODEM

CPU/RAM/POWER

WATCHDOG

SUPERVISORY Cct

CIRCUIT

COMM1
ADDRESS
V25

DECODER

MICROPROCESSOR
INPUT/OUTPUTS

DIGITAL & ANALOG

1Mb

512Kb

INPUT/OUTPUTS

STATIC RAM

EPROM

ADDRESS BUS

TO BUS
EXTENSION
BOARDS

DATA BUS

DATA
LATCHES

REAL TIME
CLOCK

ENCODER

SERIAL I/O BUS


(DIGITAL & ANALOG BOARDS)

/DECODER

+12V
REGULATOR
POWER
INPUT

FILTER

INTERNAL POWER
+5V
REGULATOR

Main components of RTU

Microprocessor

RAM

EPROM

Address Decoder

Watch Dog Ckt.

FSK Modem

Addressing Modes

Configuration & address Switches

Power Supply

Buffers

Latches

www.arfanali.webs.com
Page 67

Industrial data communication

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

www.arfanali.webs.com
Page 68

Industrial data communication

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 R is:

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.

www.arfanali.webs.com
Page 69

Industrial data communication


Upgradation Details of SCADA System of Dhodak
D is t
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

Pl a n t

W
R

e l l

Si t e

Si t e s

L C D
L C D

T U

P T U

2 3 2

o r

4 8 5

L C D
R T U

R S 2 3 2

4 8 5

B U S

P T U

R a d io
R e p e a t

o d e m

e r

A L M

L C D

P r o t

C o n v e r

o c o l

e r

D B U S

2 3 2

P r o t

R T U

o r

4 8 5

o c o l

io

P T U
R

ic

L C D

ir

it

in

ir

io

&

it

in

f
R

m
A

Pr o p os e d

&

Sys t em

P T U 4
C

e l l

Si t e s

Pl a n t

Si t e

L C D

P T U

4 8 5

B U S

L C D

z
T

R T U

L C D

P T U

R a d io

o d e m

T U

L C D
R e p e a t

e r

P T U

L C D

Cur r en t

R T U

Sy st e m

P T U 4

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 PC
and 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.
www.arfanali.webs.com
Page 70

Industrial data communication

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 ALCOM RTU 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.

www.arfanali.webs.com
Page 71

Industrial data communication

Field Name

Explanation

InOutUsage

N.A

BaudRate

Communication baud rate

Default
0
9600

between the PC and the radio


modem
Parity

Stop

Length

Retry

Number of retries

StartTime

RTU reply frame must start within

5
7000

(in millisecond)
EndTime

RTU reply frame must end within

7000

(in millisecond)
Speech

N.A

Noise

N.A

PreambleSize

Number of preamble characters

Table 0-1 PC-RTU communication parameters

The MODBUS Slave Support


Introduction
MODBUS is a master slave protocol. In this implementation, the master will be the
third party SCADA package, and the ALMOS server (ALCOM) will be the slave.

www.arfanali.webs.com
Page 72

Industrial data communication

MODBUS interface
(RS232 )

Third Party
SCADA
Package
MODBUS Master

Almos
RTU

ALCOM & WASP32


Almos
RTU

MODBUS Slave

Logged data will be


available in text files or
DB tables

Almos
RTU

This schematic demonstrates the relation between the Third


Party SCADA, the Almos SCADA and the Almos RTU-s

Mapping
Mapping is the functionality to maintain a one-to-one relationship between a MODBUS
IO address and an Almos IO address.

When the third party SCADA is connected to

the ALCOM program, there is a need to manipulate and interpret IO information of the
Almos RTUs using MODBUS style addressing.
The ALCOM MODBUS driver does a direct mapping between the ALMOS IO
sausage and all four MODBUS addressing modes. All MODBUS addressing mode is
allowed to access any location in the IO sausage.

www.arfanali.webs.com
Page 73

You might also like