Consider Fast Ethernet For Your Industrial Applications

May 25, 2006
With the increasing desire and necessity to deploy the Internet everywhere, the need for Industrial Ethernet is on the rise. RS-232 and RS-485 data transmission no longer satisfy industrial customers. Rather, these customers demand the benefits of Etherne

With the increasing desire and necessity to deploy the Internet everywhere, the need for Industrial Ethernet is on the rise. RS-232 and RS-485 data transmission no longer satisfy industrial customers. Rather, these customers demand the benefits of Ethernet connectivity.

The dual advantages of treating every data-acquisition node as an IP address or Web page, along with its extended reach and data rate, make Ethernet an ideal communication platform for industrial customers. Ethernet is the most widely deployed network available today; it simply makes sense for tomorrow's industrial network to include more of it.

Ethernet's only weakness in industrial communications is that it was never designed to handle real-time data transfer, which is essential for automation and motion control. Therefore, the challenge is to provide real-time capability while taking advantage of Ethernet's cost and simplicity. But just like Fieldbus, a battle for supremacy has led to multiple standards instead of one common standard. All of these standards, though, have adopted Ethernet as the physical layer (PHY).

Ethernet isn't strictly a protocol in itself, as it only defines the Layer 1 (physical) and Layer 2 (data link) of a network topology. The seven-layer Open Systems Interconnection (OSI) network model requires the upper transport Layers 3 and 4 (for example, TCP/IP) and application layers to specify the complete protocol (Fig. 1). Each standard for Ethernet in an industrial environment differentiates itself in its unique approach to handling the network protocol's higher application layers.

Network standards such as PROFInet, EtherCAT, EtherNet/IP, Modbus, and Powerlink have evolved to address predictable data delivery using Layers 3 and up in the OSI network model. Ethernet can be considered a means of deployment for most of these standards, with the end application determining the best protocol.

Generally, designers implement real-time performance by time-multiplexing the communication on the network between the different nodes. Critical isochronous data transfer is performed at the start of the cycle, followed by non-critical TCP/IP traffic. Such methods guarantee the real-time performance of the network while allowing compatibility to "office" TCP/IP networks.

When Ethernet is introduced into an industrial setting, an existing Ethernet switch or hub often is used to distribute Ethernet in a star configuration from a multiport switch to many destinations. Customers sometimes need more nodes than that available on a multiport switch. Or, they need to locate distributed data-acquisition nodes at distances greater than the 100-m limit from the switch specified for Ethernet over copper (10BaseT, 100BaseTX). Sometimes, 100BaseFX over optical fiber is used to address greater distances, and it typically can extend the reach to 2 km.

However, designers also can "daisy-chain" copper networks to extend Ethernet's reach without going to the expense of installing a fiber-based system (Fig. 2). But, daisy-chaining creates two problems: variable latency of data through multiple switches, and the management of redundant network loops.

Addressing Variable Latency To reduce latency jitter in the network, the Ethernet Powerlink Group (EPL) recommends using 100BaseTX/FX Ethernet Repeater Hubs. Real-time performance isn't possible using today's switches that employ Store and Forward architecture, which depends on packet size. This results in a possible latency deviation of up to 167 µs.

On the other hand, repeater hubs offer far lower latency. Yet repeater hubs have a major limitation — they're scarce, if not obsolete, compared to the more popular switches. This scarcity leads to an FPGA-based implementation with external Ethernet PHYs. Such an approach conflicts with the strategy to benefit from the falling prices of standard Ethernet devices. It also increases time-to-market and risk.

Some new devices, such as Micrel's KSZ8893 3-Port switch and KSZ8842 2-Port Ethernet Controller families with 8/16/32-bit generic bus or 32-bit PCI interface, offer a unique low-latency repeater mode. This repeater mode provides a maximum port-to-port latency of 310 ns and total deviation of a mere 40 ns, making it ideal for real-time critical applications.

Another approach to deterministic packet delivery uses higher-level protocols such as IEEE 1588. IEEE 1588 uses User Datagram Protocol (UDP) packets over Internet Protocol (IP) on the Ethernet network to supply network synchronization down to a microsecond. Such performance fulfills the stringent real-time requirements for motion-control applications. ProfiNet, EtherNet/IP, and the EtherCAT groups all adopted this standard for network synchronization. Figure 3 shows a typical hardware implementation of the IEEE 1588 functionality using an FPGA.

To achieve synchronization with the rest of the network, each node must determine which clocking source it should use — GPS or a local oscillator. All nodes perform what is known as the Best Master Clock algorithm to select timing. If the node is to be a master to many of the nodes in the ring, a high-precision source, such as the GPS device shown in Figure 3, is employed. If the node isn't designated as a master, it will extract timing from the network using the IEEE 1588 protocol. Failure to extract timing from the network will result in use of the on-board local oscillator.

The master is responsible for providing all of its slaves in the network with a notice of its position. If the slave doesn't receive any notice from the master, it will designate itself as the master. To synchronize the master and slaves, IEEE 1588 operates Precise Time Protocol (PTP) based on IP multicasting. A hardware implementation requires the FPGA and Switch Core to identify PTP packets. The FPGA will add a timestamp to the ingress and egress PTP packets. In the ingress direction, the switch will forward the incoming PTP packets directly to the CPU port. The timestamp point occurs after the Start of Frame (SOF), at the first bit of the Destination Address (DA).

The synchronization process divides into two phases. First, the offset time between the master and slave is calculated and corrected. To perform this function, the master continuously transmits a unique message to the slave at defined intervals, usually every two seconds. The second phase of the synchronization process is the delay measurement. The slave will send a Delay Request to the master, which is returned, and the round-trip delay is calculated using the timestamps. The assumption here is that the delay between master and slave is always symmetrical. Figures 4a and 4b show an example of the Offset and Delay phases of the PTP synchronization process.

Addressing Network Loops A second problem in daisy-chained Ethernet is that potential loops might be introduced during field installation. Loops or multiple paths can cause network failure due to duplicate packets resulting from redundant message paths. Figure 5 illustrates an example of a network with a "loop."

Loops in a network allow for redundant paths. Redundant paths aren't desirable in traditional Ethernet networks because of a protocol called Collision Sense Multiple Access with Collision Detection (CSMA/CD). This protocol recognizes when a collision of data occurs from multiple paths and sends a jam signal that causes all transmitters to back off for random intervals and retry.

When an Ethernet loop is formed, the collision of data is inevitable. This probability increases with an increase in network congestion. When many collisions occur in a network, the throughput can drop to almost nothing as the nodes start to randomly delay their delivery while the jam signal persists.

Spanning-Tree is a method of managing path redundancy by eliminating undesirable loops. Spanning-Tree Protocol (STP) has been standardized in IEEE 802.1Q. A group of Ethernet switches participates in an STP, gathering information from the other participants in the STP. STP is handled outside of Layer 1 and Layer 2 of the OSI model. Many of today's networks use STP, but the user doesn't notice it. Rather, the network administrator or the IT department manage it.

The STP's basic function is to ensure that only one path to a destination is available at any time by detecting possible loops and then blocking undesirable paths. All switches in an extended local-area network (LAN) participating in STP gather information on other switches in the network through an exchange of data messages. This exchange of messages results in the following:

  • Election of a unique root switch for the stable Spanning-Tree network topology. This Root is considered the center of the STP.
  • Election of a designated switch for every switched LAN segment.
  • Removal of loops in the switched network by placing redundant switch ports in a backup state.

Each element in the STP has a Bridge Identification (BID) comprising a unique media-access-controller (MAC) address and configurable priority number. BIDs and other STP information are carried in special data frames called Bridge Protocol Data Units (BPDUs). BPDU information is exchanged regularly (approximately every two seconds), and it lets participants in the STP keep track of network changes and activate or disable network participants as required. Upon connecting a new member to the STP network, a delay of up to 50 seconds may be required as the new member goes through several states to learn its position in the network. Each new node goes through:

  • Blocking: A port that would cause a loop. No data is sent or received, but it may go into forwarding mode if another link were to fail.
  • Listening: The switch processes BPDUs and determines the network topology.
  • Learning: The switch builds a switching table that maps MAC addresses to port numbers.
  • Forwarding: A port receiving and sending data (normal operation).
  • Disabled: Not strictly part of STP, a network administrator can manually disable a port.

Figure 6 illustrates how a port moves through the five states.

Management software in each of the switches modifies the port states. Every switch in the network uses the Blocking State at power-up, then advances through Listening and Learning. In a properly configured network, the switches ultimately stabilize to be in the Forwarding or Blocking states.

By implementing STP in a daisy-chained network, a very robust and redundant Ethernet network evolves. The STP will allow for backup paths, enabling industrial networks to have multiple available paths — with only one path active at any time. STP can block a selected redundant path, but it can quickly change paths if a cable is disconnected or cut.

Intelligent or Managed Switches are necessary to implement STP. Managed Switches must be able to monitor the age of MAC addresses within the network. The age of the information passed between STP participants is a vital piece of information. Timers and a MAC address table in each member of the STP are used to record age parameters and determine if some nodes should be dropped as they go offline. The MAC address tables in the STP's switch elements also can access the recognition of new elements in the STP.

A daisy-chained Ethernet node implementation can be realized using an Ethernet controller, such as the KSZ8842 (Fig. 7). The device consists of three MACs and two PHY transceivers. It's connected to a host controller via a generic 8/16/32-bit interface. The built-in MAC Address Learning Table automatically stores new Source Addresses (SAs). If a MAC address isn't seen again, it's removed from the MAC address table after about 200 seconds. This feature offloads the task of searching for, and time-stamping, new MAC addresses from the microcontroller to the switch. Additional rules of virtual LANs (VLANs) and quality of service (QoS) enable the realization of sophisticated networks.

QoS allows for classes of service, and it controls the egress queuing and priority of packet departure. It's useful in prioritizing the class and flow of critical data. Most intelligent switches with associated software handle QoS. Traffic comprising voice or video typically receives higher priority than e-mail or Web traffic in an Internet-connected environment. In an industrial network, it might be desirable to give time-critical or trigger events the highest priority. Two common types of QoS are:

  • Insertion of a VLAN tag by the switch in Layer 2.
  • If the services up to Layer 3 are available, the Type Of Service (TOS) or Differentiated Services Code Points (DSCP) is used for QoS.

Figure 8 shows an example of a VLAN tag being inserted into the Ethernet packet. Most intelligent switches allow for this insertion at a hardware level in Layer 2. VLAN lets traffic be segmented while coexisting on a single cable. Another way to think of this is as separate broadcast domains for traffic. By establishing VLANs — i.e., broadcast domains — traffic can be segregated. VLANs can be established as port-based on a switch or using 802.1Q VLAN tagging.

Using Figure 7 as an example, Nodes 1 and 4 could belong to VLAN#1, while Nodes 2 and 3 could belong to VLAN#2. By doing this, the processing burden on Node 3's local controller can be reduced, since only data from VLAN#2 would go to the Node 3 processor. Data for VLAN#1 would pass by the processor in Node 3, since it doesn't belong to VLAN#2. Using VLANs facilitates the grouping of node types — i.e., alarms, timing, motion, and temperature.

Installation and Maintenance Ethernet ultimately will need to toughen up to be robust enough to cope with the harsh environment of the factory floor. Aside from the obvious need for an industrial temperature range, issues with installation and maintenance will continue to have a major impact on overall network costs.

A feature known as Auto-MDI/MDI-X in the Ethernet Switch elements is essential for simple, low-cost installation. The PHY automatically determines if the CAT5 cable connected at each node is a straight-through or crossover cable, and switches transmit and receive lines accordingly.

The Auto-MDI/MDI-X feature eliminates potential improper installations, which can occur when, for instance, field installers improperly connect a crossover cable instead of a straight-through cable. It enables routers, switches, or laptops to easily connect to the industrial Ethernet node whether crossover or straight-through cables are used.

The standard physical interface for a Fast Ethernet network consists of a CAT5 unshielded twisted-pair (UTP) cable and RJ45 connector. Harsh environmental conditions — including excess vibration, dirt, and moisture — have led to M12 and "rugged" RJ45-type connectors. Still, the industry has yet to agree on an alternative industrial solution; the standard RJ45 connector on CAT5 cable remains the most popular interconnect method.

By far, open or short circuits continue to be the most common cabling problems that can occur in a network. A multitude of events can cause them. An open circuit, for example may result simply from someone inadvertently removing or forgetting to connect a cable. It also could arise from a damaged cable or connector, which is highly possible in factory-floor or remote outdoor applications.

Traditionally, a network's weakest link has been the physical interface. Some, but not all, Ethernet parts can perform cable diagnostics. Micrel's LinkMD cable diagnostics use time-domain reflectometry (TDR) to analyze the cabling plant for faults. In TDR, a pulse of known amplitude and duration is injected down a cable pair. If a reflected pulse is returned, it signals an impedance mismatch. The amplitude and polarity of the reflection can be analyzed to calculate the impedance mismatch and identify if a fault exists down the cable.

The reflection coefficient, ρL , defined as the ratio of the amplitude of the reflected wave and the amplitude of the incident wave, is calculated as follows:

ρL = V R (reflected wave)/VI (incident wave)

= (ZL - ZO )/(ZL + ZO)

where ZL is the load impedance and ZO is the cable impedance, which is 100Ω for a CAT5 cable.

By applying this formula, a fault can easily be identified:

a) If ZL = 0, then ρL = -1 (short)

b) If ZLL

c) If ZL = 100, then ρL = 0 (correct termination)

d) If ZL> 100, then 0 L

e) If ZL>>100, then ρL = +1 (open)

Hence, for a perfect terminated cable, ρL = 0 and no reflection occurs. In reality, though, some slight imperfections always will occur, so an attenuated reflection always will be seen.

Fault distance is calculated using the cable's specified velocity of propagation (VOP), which is the speed of a signal in a given cable, relative to the speed of light in a vacuum (3.0 x 108 m/s). The VOP depends on the type of cable and the manufacturer, but it's usually around 0.66 for CAT5 cable. This means that a signal will travel down a CAT5 cable at a speed of 0.66 x 3.0 x 108 m/s = 2 x 108 m/s. Using this specification, you can calculate the length of cable, or distance to a fault, by measuring the propagation delay of the reflected waveform.

As is common with the industrial sector, nothing will happen overnight. The Field Bus still will be around for a number of years. But Ethernet is close on its heels, and the various standards organizations are addressing the barriers of cost, size, power, and deterministic behavior. In the end, there will be various standards for predictable and reliable delivery of IP packets. We can count on that.

Sponsored Recommendations


To join the conversation, and become an exclusive member of Electronic Design, create an account today!