01 September 2002
Industrial networking 101
By George Thomas
Think of a large family sitting at their dinner table . . . and being polite
If you're familiar with automation, you've seen the usual programmable logic controller (PLC) with hard-wired I/O. And unless you've been living in a cave for the past five years, you know networks are linking more and more PLCs, I/O, PCs, and the Internet every day.
The idea of sending data to a smart device on a network instead of just switching something on and off is simple enough, but the terminology can be confusing. Here are the basics you'll need to get a leg up on industrial networking.
Transmitters and actuators connect to signal conditioning electronics at the controller. A popular way to connect them to the PLC or DCS is an industry-standard 4-20 mA current loop. Each device gets power from a loop power supply, which is typically 24 volts DC.
For transmitters, the current (amps) value indicates the measured parameter, such as temperature. For actuators, it represents the command signal, such as valve position.
There are advantages to the 4-20 mA standard. Signal current usually powers the device also, requiring only two wires. Because the system measures only current, voltage drop over distance does not introduce measurement error.
This traditional method has one major drawback. Because a minimum of one wire per field point to the central controller is necessary, wiring can be excessive. This and other issues sparked the movement toward a unified fieldbus.
One bus, many devices
Fieldbus means attaching field devices over one bus connection. Reduced wiring is only one reason to do this. Not only the I/O data but also information about the device itself is sent. This might include the instrument tag number, the model number, and the calibration data.
Instead of the digital equivalent of 4-20 mA, which is of little use if you don't know the instrument's scaling, why not send the data with engineering units, such as 310°F?
This bus is not analog like 4-20 mA but digital. We must address each device because only one device can access the bus at any one time.
The fieldbus topology is the physical arrangement of devices on the network. The simplest is the point-to-point connection between two devices, such as a controller linked to a transmitter. A central controller linked to several devices makes a star topology.
If several devices share the same wires, this is a bus topology. An alternate format is a ring topology-a circle with devices occupying positions along the ring. There is no best topology. Industry leverages all of these topologies successfully.
Crawl before walking
Let's say you install a baby monitor upstairs, with the speaker downstairs in the family room. The monitor tells you if your baby starts crying while you're watching Monday Night Football.
This is simplex transmission because only the baby initiates a transmission. You can hear the baby cry, but the baby can't hear you drinking beer and yelling at the quarterback. You are always the receiver. The communication is only one way, with you (hopefully) taking appropriate action.
The baby grows up, and now she's 14 years old. You replace the baby monitor with an intercom so you can communicate with your teenager (if that's possible). On a two-station intercom, you press a button (push to talk), call your beloved teenager, and release the button. Should she respond, she presses the button on her station. This is half-duplex operation-communication is two ways, but only one person talks at a time.
A communication link with two open channels, one for sending and one for receiving, is a full duplex link.
Three's not a crowded bus
Let's put an intercom in every room. All stations are identical. The stations are peer to peer. No station is more capable than another. Each has the same push-to-talk button, with no restrictions on station use. When someone calls, he presses the button on his station, and all hear the transmission. This is a broadcast.
If the transmission is for only one person, then a protocol-a set of rules governing communication-is necessary to bring order to the process.
Your wife wants to know whether your teenage daughter wants to go shopping. She asks your daughter to come to the nearest intercom and acknowledge receipt of the transmission. This is establishing a connection. Mother waits some time for a response. If none comes, mother retries several times before walking upstairs and taking away your daughter's headphones.
The daughter's reply is a unicast message because only two stations are participating, and the mother can state her business. The protocol requires others to wait if the shared system is busy. If your daughter does not understand, she can request a retransmission. Once a response is obtained, the connection terminates. The system is now available for others to use.
Another intercom has one master station and several remote stations. The master can communicate to the remotes, but a remote can call only the master. This is a star topology with half-duplex communication. The master selects one remote for a unicast transmission, several remotes for multicast, or all remotes for broadcast. This is a hierarchical system because the master has more ability than the slaves.
Industrial networking concerns inanimate objects passing data among stations. To better visualize interaction among devices, we use a communication model. This model is helpful in comprehending industrial networking principles.
When computers talk
The Open Systems Interconnect (OSI) reference model is helpful. It describes seven layers as they relate to one computer talking to another. Not all communications use all seven layers.
The full OSI model is useful but too complex for all network architectures. The presentation and session layers can be included in the application layer with little loss of clarity. The seven-layer model reduces to a five-layer model when discussing the Internet.
Because many industrial systems have only one network, the network layer is unnecessary, and the transport layer can be included with the application layer. Now we're down to three layers. These three are plenty to talk about, so we will address only one aspect of the data link layer: medium access control.
In a fieldbus, several stations share the same wire to save wiring costs. But not all devices can communicate simultaneously. There must be access rules. They are called medium access control (MAC). There are several MAC methods, but they basically fall into two main categories: carrier sense multiple access/collision detect (CSMA/CD) and token passing.
The most popular network access method is CSMA. This is similar to a conversation among several people. You join a telephone conference call (multiple access) at 10 a.m. and hear conversations. Because you are no longer a teenager, you are polite. Therefore, you defer and do not break into the conversation until you hear silence (lack of carrier). Once there is silence, you announce your name to all other participants (broadcast). Others may log your name on to a piece of paper in an attempt to visualize everyone on the call.
Once the channel is clear you speak, identifying first yourself and then the person you're addressing. A message for one person is a directed, or unicast, message. A message to a group of people is a multicast message. A broadcast message is one for everybody.
Let's say you speak, and you hear someone else speaking as well. This is a collision. Because you can hear it, it is called collision detection (CD). Once both of you hear the collision, you both back off for a random amount of time. Usually one person is more patient than another, so the other person will try again to speak.
If there is no collision this time, he acquires the channel and sends his message. You wait (defer) until the channel is clear and again attempt to acquire the channel. This contention method is the basis for shared Ethernet.
Who has conch shell?
Another approach is token passing. Each participant is guaranteed time to transmit a message. Permission occurs when a participant receives the one token that exists in the network. The token passes in a circle, or logical ring. Participants can be peers and agree not to possess the token for more time than agreed on.
Imagine a family of four-mother, father, daughter, and son-having dinner together. Dad has come home from work, and everyone is anxious to tell him about his or her day. To eliminate chaos, the family agrees on a simple set of rules.
The person with the saltshaker has momentary sole right to speak. No filibusters are allowed-messages have a maximum length in order to reduce hogging. Once a message is complete, the saltshaker passes to the left. Daughter is first to have the saltshaker (token), and she informs dad that she's going to the Nsync concert next weekend.
Dad does not respond because he does not have the token. Instead, son receives the token from daughter and reports that his favorite baseball player's been traded to another team. Dad receives the token and says, "Nsync is fine as long as you're home by 9:30."
He would like to respond to his son but can initiate only one directed message for each token pass. Dad then passes the token to mom. Mom informs dad that the washing machine has suddenly and mysteriously halted with a devastating grinding noise.
The token then passes to daughter, who is too upset to say anything. She passes the token to son. Son announces to everyone at the table (broadcast) that he will soon have his driver's permit. The token continues to dad, who says to mom, "What grinding noise?"
Participants have true equal access to the network. The network avoids collisions by restricting transmission to one and only one participant. And the maximum amount of time required for a participant to gain the token and initiate a transmission can be exactly determined, based on the protocol and the number of participants.
That is why token passing is deterministic, which is necessary when events must occur in a timely manner. Examples of token-passing networks include ArcNet, ControlNet, and Profibus. WBJ
Behind the byline
George Thomas has two degrees in electrical engineering. He is a member of ISA and IEEE. He works as president of Contemporary Controls. Write him at firstname.lastname@example.org.