Industrial
Communications
and Control Protocols
Part I
Objectives:
• To gain understanding about what communications and control protocols
do.
• To explain how protocols interrelate with networks and the internet.
• To describe some commonly used protocols and their uses.
What is a Communications Protocol?
• A communication protocol is a system of rules for data exchange within
or between computers, PLCs, instrumentation, control devices, etc..
• Communicating systems use well-defined formats (protocol) for
exchanging messages.
• Each message has an exact meaning intended to elicit a response from a
range of possible responses pre-determined for that particular situation.
• A protocol must define the syntax, semantics, and synchronization of
communication
• A protocol can be implemented as hardware, software, or both.
• Communication protocols have to be agreed upon by the parties
involved. To reach agreement, a protocol may be developed into a
technical standard.
• Systems typically do not use a single protocol to handle a transmission.
Instead they use a set of cooperating protocols, sometimes called a
protocol family or protocol suite.
• The protocols can be arranged based on functionality in groups.
Digital Data Basics
Digital data is a natural choice for communications. The smallest unit of
digital data is a Bit, or binary digit, and it has just two states: Off,
represented by a 0; and On, represented by a 1. Since the 1960s, most
computerized devices have relied on miniaturized, two-state transistors
that are either off or on. And a voltage associated with the transistor is
either low (0) or high (1). A bit’s value is represented using base 2, and can
only be 0 or 1. Digital data can be generated and transmitted very quickly
by electronic equipment.
Networks, Nodes, and Topologies
A Network is an interconnected group of computers and/or controllers,
and devices that interact with computers and controllers. A Node is a
computer or other device in a network. Networks are interconnected by
different types of conversion devices, cables, and sometimes, by radio
transceivers.
3 common topologies, or arrangements for networks:
• Bus
• Star
• Ring
The Bus topology is the simplest. Figure 1A shows a simple bus network.
Note the presence of resistors at the ends of the bus. Each node is exposed
to data traffic on the bus, but it will only respond if data is directed to it.
Otherwise the data is ignored. A bus topology has the disadvantage that
failure of the bus cable will stop communications. End resistors with identical
resistances are used to improve signal quality on the bus.
A Point-to-Point connection is the simplest example of the bus topology.
Point-to-point connections are used, for example, to connect a PC and a
single printer.
In a Star topology (Figure 1B), individual nodes are connected to a central
node. Very often the central node is a Switch. Switches allow temporary
pathways to be made so any node on the network can communicate with any
other node. In a star topology, an individual node can be disconnected without
affecting communications on the rest of the network. It’s more reliable than a
bus topology.
All data traffic stops if the central node fails. However, switches are built for
high reliability, and often, Uninterruptible Power Supplies are connected to
provide temporary backup power in event of loss of line power. Sometimes
redundant switches are used for improved reliability. In that case, each node
has two ports, with separate cables attached to each distributed node.
Figure 1C illustrates the Ring topology. The ring doesn’t have a
master device. Each node can both send and transmit data.
Data sent from one node to another is forwarded around the ring
from the originating node to the destination node to which it is
addressed. If a segment fails, data can be sent in the reverse
direction. Many different types of devices besides computers,
controllers and switches can be can be part of a network – such
as printers, scanners, barcode readers, TV camera, etc.
In reality, networks are interconnected in many different ways. Some
networks consist of combinations of one or more of the three basic
networks. In a properly set-up network, data can get from one node to
another as long as a path for data transmission exists. No doubt many
readers have seen or worked with networks much more complex than
those shown in this course. Most networks have a central computer known
as a Server. Servers are computers which meet higher standards for
dependability, durability, and speed of access to data than ordinary
desktop computers.
Typically they also have far larger data storage capacity.
Servers are frequently set up in redundant pairs. Computers in a
network which act only as "dumb terminals" - which operators can
use for monitoring and control, but don’t directly interact with
controllers or perform processing tasks – are referred to as Clients.
A server processes requests from its clients and interacts with
controllers. Servers are often referred to as Thick Clients, and client
PCs are sometimes called Thin Clients. Such networks are usually
called Client-Server Networks.
Many plants and facilities have multiple client PCs and controllers in
various locations. So use of servers in process control applications is sensible
for 4 reasons: first, to centralize key databases used to monitor the site in one
reliable computer (or redundant pair of computers). Second, historical data
can be stored on servers. Third, use of servers simplifies access to shared
resources such as printers. Last, a Client-Server network allows appropriate
delegation of roles and tasks to different entities. Each local controller - a
PLC, DCS, or PAC - can execute control over systems in a specific area of a
site, and report the status of its inputs and outputs to the server.
And client operator terminals that are networked with a
server can access the server's database(s) for several
purposes:
• To allow operators to monitor operations at a plant's
subsystems.
• To let operators start and stop equipment as needed, and
adjust set points for automatic control.3
• To view alarm screens.
• To access trend screens which show how key levels, pressures,
temperatures, etc., have varied over time.
• To view accumulated values such as total flow in a day, and numbers
of equipment starts.
• To view archived data.
A diagram of a sample network follows on the next page. This
network is an Ethernet network. Note how it shows a variety of
components.
Some communication cables have one group of conductors or
fibers for communication in one direction, and another group of
conductors or fibers for communication in the other direction.
Regarding such cables, three communications terms sometimes used
are Simplex, Half-duplex and Full-duplex. Half-duplex refers to the
transmission of data in only one direction at a time on a cable or other
data link. Full-duplex refers to the transmission of data in two directions
simultaneously. Typical copper Ethernet cable has separate pairs of
conductors for data transfer in opposite directions.
Simplex Transmission
In simplex transmission, data flow only in one direction from the
sending device to the receiving device. Simplex transmission is
used only when the sending device does not require a response
from the receiving device. Security systems and fire alarms that
contain a sensor use simplex transmission.
Example: Watching television
Half-Duplex Transmission
In half-duplex transmission, data can flow in either direction --
from the sending device to the receiving device, and back -- but
only in one direction at a time. Many fax machines, credit card
verification systems, and automatic teller machines use half-
duplex transmission.
Example: Walkie Talkie
Full-Duplex Transmission
In full-duplex transmission, data can flow in both directions at
the same time. A regular telephone line supports full-duplex
transmission so that both parties can talk at the same time.
Example: Telephone
The OSI Model and its importance
The OSI, or Open Systems Interconnect model, is the next topic. The OSI
model is a theoretical model of how communications occur on a network. It has
7 layers. It’s helpful to refer to the OSI model to explain features of protocols,
hardware and networks. The layers are:
Layer 1 (Physical): This layer considers only the physical aspects of a network; the
cables, converters, interconnecting devices, etc.
Layer 2 (Data-link): This layer concerns itself with how Layers 1 and 3 work
together.
Layer 3 (Network): This layer provides an addressing scheme for routing of
data and messages.
Layer 4 (Transport): This layer makes sure that messages get to their correct
destination.
Layer 5 (Session): This layer handles the actual connections between systems.
Layer 6 (Presentation): This layer deals with the way different systems represent
data.
Layer 7 (Application): This layer concerns itself chiefly with the software
applications used on a computer screen.
Hardware and Connecting Cables
Communication and control protocols operating on a network need hardware devices and
connecting cables to work. Some common hardware devices are built into computers and
controllers - or attach directly to them. Many do not.
RS232 Serial Port
SFP Transceivers
Network Interface Cards RJ-45 Receptacles
Switches
Media Converters
Wireless Transceivers
Twisted-pair Wiring Crossover Cable
Copper Ethernet Cable
Coaxial Cable
Fiber Optic Cable
Communication methods
Master-slave communications is quite simple. It's also used often in
industrial controllers. In this technique, a master device issues commands
to one or more slaves, and the slave(s) respond. For example, a PLC
which is connected to 3 external (or remote) racks may be the master.
Every 40 milliseconds, the PLC's processor first checks for any altered inputs
in the local rack (the rack where the processor is located); then it sends a
query to the 1st external rack to see if any inputs have changed, or
hardware failures have occurred.
Any changes are reported back to the processor. The process
is repeated for the 2nd external rack after querying of the 1st rack
is done; and the 3rd rack after the 2nd rack has been checked.
Then the processor runs its program, changes any outputs if
necessary, then it sends, or "writes" new data to the output
registers of modules in the local rack and 3 external racks. Usually,
the slave devices are not controllers – but sometimes they are. In
the latter case, a master controller might send a set point to a
slave controller.
Token-Ring networks rely on token passing for data communications.
As the name suggests, token-ring communications is used on ring
networks. "A special message, called the token, is passed from one
machine to another around the ring, and each machine can transmit
only while it is holding the token.“ Token-ring networks never became
prevalent in business and industry. However, token-passing doesn’t require
a ring network for use – it can be, and is, used on networks of other
topologies.
So, some protocols rely on token-passing but don’t use a ring network.
Since the Internet became widespread in the 1990s, the term Ethernet
has become common. Ethernet is essentially a method for
communications between computers and other devices on a network.
Ethernet makes use of Carrier Sense - Multiple Access with Collision
Detection, or CSMA/CD. On an Ethernet network, any node can
communicate with any other node. It works like this: first, before a
computer or controller sends data to another (or more than one) device,
it listens to see if the network is busy. If the network is active, it will wait and
try to send data later. If it senses the network is available, it will transmit the
data.
However, due to network time delays, a node may start sending data
before it senses data release by another network node. In that case, a
data collision occurs, and neither node will be able to successfully
transmit data. Afterwards, each device will wait a random amount of time
before attempting data transfer again. Ethernet works better than any
other method for large networks. That’s why the Internet uses Ethernet.
And use of the Ethernet method has become common among industrial
controllers. Furthermore, communication speeds on Ethernet networks are
fast – typically 100 megabits per second (Mbps).
Peer-to-peer communications
When any network can transmit data to any other node
on the network, the network is called a peer-to-peer network.
Peer-to-peer capability is only possible if the application layer
protocol supports it. Peer-to-peer networks can be
implemented on networks with many different topologies. A
master-slave network is not a peer-to-peer network.
Deterministic Communications
Communications that occur within predictable and repeated time
intervals are referred to as deterministic. In controllers, deterministic
communications capability is vitally important. Most programmable
controllers check and see if any inputs from field devices have changed
many times per second. If any have, the controller responds rapidly.
Deterministic communications is also referred to as cyclic
communications – notably in the PROFIBUS standards.
Interface Standards and Devices
1.) RS-232
RS-232 is a Telecommunications Industry Association (TIA) standard for
data transmission at speeds up to 20,000 bits per second (bps). It is used
for serial data transmission. RS-232 is used only for data transmission from
one device to another. RS-232 interfaces were built into many legacy
computers, and devices like controllers and printers. RS-232 ports most
often have D-shell 9-pin, 15-pin, or 25-pin receptacles. Most RS-232 cables
have male ends.
In cases where the numbers of pins differ between connected
devices, an appropriate cable will be needed. (These can be
obtained from electronics suppliers.) RS-232 cables can be no
longer than 50 feet. RS-232 ports have been replaced by USB
ports in contemporary use. USB allows far faster data
transmissions with a simpler cable. However, many controllers are
so reliable that they're used for 15 years or longer. So the typical
reader may have seen RS-232 ports and cables.
2.) RS-485
RS-485 is an interface standard for data communications that allows much
higher data transmission speeds than RS-232 - up to 1 megabit per second (1 Mbps)
on a 100 meter cable. Data communications speed varies inversely with the total
length of an RS-485 cable; the shorter the total length, the faster the maximum
speed and vice versa. At RS-485 terminals and on conductors, a small negative
voltage represents an off bit, and a small positive voltage represents an on bit.
The technically correct term for this standard is TIA-485. But it is still referred to as
RS485 because the standard has existed for decades and has usually been called
RS-485.
Most often RS-485 networks consist of point-to-point connections to nodes from
a bus cable. Twisted-pair wiring is used for the bus cable. It offers high immunity to
electrical noise when implemented properly. Terminating resistors are used on
each end of the network to minimize communications problems. In most RS-485
networks, one master device communicates with slaves. It is a relative inexpensive
network to supply and install into controllers. This makes it an attractive option for
relatively simple networks and applications. RS-485 is widely-used. RS-485 is on the
physical layer of the 7-layer of the OSI model. It allows use of only 1 master node,
and supports up to 32 nodes on a bus. Additional nodes can be used if repeaters
are used. More than one protocol can operate on RS-485 networks.
3.) RJ-45
RJ-45 ports and cable connectors have 8 conductors, and RJ-45 connectors are
attached to twisted-pair copper Ethernet cables, e.g. Category 6 cables. RJ-45
ports are built into Network Interface Cards (NICs) in computers, controllers, Ethernet
switches, media converters and other devices. Communication speeds of 100 Mbps
and higher are often realized on Ethernet networks.
4.) Converters
Converters can be bought to allow different types of serial devices to interface.
One example is an RS-485 to USB converter. Sometimes they’re helpful.
Common Features in Protocols
Many different protocols are used for data communications, but most that have
found widespread acceptance share some features.
Data transmissions are usually done in consecutive clusters of many bytes. Each
cluster consists of parts that have either fixed or variable length, depending on the
protocol and particular situation. Many protocols have specific ways to mark the
start and end of each transmission.
In TCP, or Transmission Control Protocol, which is used on the Internet and in
most Ethernet networks; these consecutive clusters are called frames. Frames, in
turn, are broken down into smaller units called packets that are handled by routers.
Each protocol also has its own method (or user-selectable method) for
error checking. Error checking is used in protocols to make sure the data
received at a destination node is identical to the transmitted data.
Electrical noise, connection problems, or a failed part may interfere with
effective data communications. If the sending node gets a response from
the receiving node that the data was received as intended, the task is
done. But if a mismatch was detected, or no acknowledgement that the
data has been received properly is returned, than either the data will be
resent, an informative message will be generated, or another appropriate
action will be taken.
Protocols exist for communicating data. But different protocols are used for
different purposes. Yet, in plant control applications, much of the data falls into four
categories:
• Analog inputs
• Analog outputs
• Discrete inputs
• Discrete outputs
Sometimes other types of data, like character data, are also transmitted. Log-
on names, passwords, text messages, and product barcodes are examples of
character data.
“Don’t wait until you’ve reached your goal to be proud of yourself. Be
proud of every step you take toward reaching that goal.”
- unknown
- end -