ETHERNET ARCNET CAN

Proposed Network Hierarchy for Open Control

By George Thomas Contemporary Controls

Embedded Networking INTRODUCTION from the cable. Communication proposed by some in our industry. messages are usually short, fast and The arguments for its use include When we discuss control strategy, frequent. Delivery must be low cost, good connectivity and the issue of networks is always dependable. simple migration to higher speed raised. Since network requirements networks. The cry to use "standard" vary depending upon the ignores the attributes of complexity of control, different Control Level other open standards such as network technologies are usually At this level controllers ARCNET and CAN that are better specified for the various levels of communicate to other controllers. suited at the lower levels of the control hierarchy. It is common to Message length increases as well as network hierarchy. identify three different networks data speed. Message delivery must when describing a control system. be dependable and predictable to The lowest level is the device ensure real-time coordination of the What is standard Ethernet? network that is used to link sensors control strategy. I am not sure what standard and actuators to controllers. Above Ethernet is but it certainly is not the that is the control level that links 2.94 Mbps version that came out of the various controllers together. Information Level Xerox’s Palo Alto Research Center The highest level is the information At this level data from the control (PARC) in the early 70s. In 1980, level used to link the control system is made available to the Digital Equipment Corporation system to the enterprise-wide enterprise-wide network. Usually (DEC), Intel and Xerox published information system. With the the timeliness of delivery of the the DIX V1.0 standard which movement toward open control data is unimportant. What is boosted the speed of Ethernet to 10 systems, it is only logical to pick important is that connectivity to Mbps while maintaining Ethernet’s three open networking standards to worldwide standards such as the thick trunk cabling scheme. In 1982 complete the control system Internet is achieved. Message length the DIX V2.0 standard was released networking hierarchy. What is can be long. which is now commonly referred to recommended here is Ethernet for as Ethernet II. Xerox then the information network, ARCNET relinquished its trademark. for the control network and CAN ETHERNET EVERYWHERE? for the device network. At the time of the first DIX There has been much discussion standard, the Institute of Electrical recently regarding the applicability and Electronic Engineers (IEEE) NETWORK HIERARCHY of using Ethernet at all levels of the were attempting to develop open control hierarchy. Since Ethernet is network standards through the 802 Device Level so prevalent in the office and committee. In 1985 the IEEE 802.3 Devices such as sensors and frequently used as the enterprise committee published "IEEE 802.3 actuators share a common network for high-end controllers, it Carrier Sense Multiple Access with communications with an I/O would seem to be a natural to use Collision Detection (CSMA/CD) scanner located in a controller. Ethernet at the control level or Access Method and Power for the devices might come even at the device level as Specifications." This technology is

Figure 1 depicts the generalized network model consisting of three separate networks. Although actual systems may not incorporate three separate networks, it is helpful to discuss the services expected at each of the levels. called 802.3 CSMA/CD and not network before actual data arrives. good record keeping, will assign Ethernet; however, it is frequently Ethernet uses Manchester encoding. sequential numbers to each adapter referred to as Ethernet even though card he makes thereby creating a the frame definition differs from The IEEE redefined the preamble to worldwide unique address. With 24- DIX V2.0. Although 802.3 and DIX be seven bytes of preamble, the bits to work with, a lot of adapters frames can coexist on the same same as the DIX preamble, followed can be produced from a single cable, interoperability is not by a one-byte start of frame manufacturer. A list of OUI assured. Therefore, when discussing delimiter (SFD) which looks like the assignments can be found on "Ethernet," it is necessary to clarify last byte of the DIX preamble. There the Internet. 802.3 frames or DIX V2.0 frames. is no change in operation between the DIX preamble and the IEEE To further confuse issues, standard preamble and SFD byte. Both Type and Length Field Ethernet sometimes means an preambles are not considered part The original intention of Ethernet attached protocol — mainly TCP/IP. of the frame when calculating the was never to use its data link layer Ethernet only defines the data link size of the overall frame. as the means for providing and physical layers of the Open guaranteed delivery of data. It was Systems Interconnect (OSI) always the intent that a higher layer Reference Model whereas TCP/IP Destination Address protocol would do that service. defines the transport and network In the DIX standard the first bit of Therefore it was only necessary to layers respectively of the same the 48-bit destination address identify by number which higher model. Therefore, when the indicates if the address is a layer protocol was being used suggestion is made to use standard multicast address or a physical through the two-byte field in the Ethernet at the information, control address. A "0" indicates a unicast DIX frame. Originally, Xerox and device levels, does this mean transmission to the indicated maintained the assignments and TCP/IP connectivity as well? destination while a "1" indicates a now IEEE provides the multicast or group address. administration.

ETHERNET FRAMES The IEEE standard further defines The 802.3 standard does not the second bit of the 48-bit include the type field but instead The two types of Ethernet frames destination to indicate if the defines it as a length field. Per the used in industry are similar. The DIX address is locally administered or 802.3 standard, a value in this field V2.0 frame,frequently referred to as globally administered. This bit is a of 1518 or less indicates the length the Ethernet II frame, consists of an "0" when the address is globally of the data field, while values above eight-byte preamble, six-byte source administered; that is, assigned by this may be ignored, discarded or and destination addresses, a two-byte the Ethernet interface manufacturer. used in a private manner. These out type field used to identify higher of bound values could then be used layer protocols, a variable data byte A 48-bit address of all "1s" is a to identify higher layer protocols field followed by a four-byte frame broadcast address in both DIX and just like DIX frames. check sequence (FCS) field. The IEEE IEEE formats indicating that the 802.3 frame divides the preamble transmission is directed to all What is important here is that since into a seven-byte preamble followed devices on the network. DIX and IEEE frames are identical in by a single byte start of frame terms of the number of bits and delimiter (SFD).The two-byte type length of fields, both frames can field now becomes a two-byte length Source Address coexist on the same network but field. The data field now includes an The 48-bit source address is may not be able to communicate to 802.2 logical link control (LLC) field appended to the transmission as an one another. Much of the existing that precedes the actual data. The aid to the higher layer protocols. It TCP/IP software that binds to FCS remains the same. is not used for medium access Ethernet uses DIX frames and not control. To avoid duplicate node IDs 802.3 frames, so care must be for global addresses, the Ethernet exercised when selecting or Preamble adapter manufacturer obtains an developing software or claiming The DIX preamble consists of 64 Organizationally Unique Identifier interoperability. bits of alternating "1s" and "0s" but (OUI) from the IEEE (for an ending with two "1s" to indicate administration fee).The OUI is 24- that a valid frame is to begin. This bits long and is used as the most Data Field creates a 10 MHz signal that significant portion of the 48-bit A raw (no synchronizes the receivers on the address. The manufacturer, using encapsulated protocol or LLC) can be up to 1500 bytes long but no called a medium to introduce twisted-pair cabling less than 46 bytes. This is the attachment unit (MAU) clamps at and star topology to Ethernet DIX frame. particular points on the cable installations. The10BASE-T Ethernet marked by stripes every 2.5 meters. adapters have internal Although the total available length From the transceiver, an attachment and RJ-45 connectors. Usually two- of the IEEE data field is the same as unit interface (AUI) cable connects pair unshielded cabling is attached the DIX frame, the LLC header to an AUI port on the actual to a hub in a point-to-point fashion. reduces the amount of field Ethernet adapter that fits into the Bus connections are not allowed. available for actual data or payload computer. The AUI port is a DB-15 The connection between an as it is sometimes referred to. If the connector. A coaxial segment can adapter and hub cannot exceed 100 LLC header and actual payload are be up to 500 meters long and AUI meters in length. Hub-to-hub less than 46 bytes, the data field cables are each restricted to 50 connection length can vary must be padded to 46 bytes to meters in length. A total of 100 depending upon the medium used. ensure that the transmission is not transceivers can occupy one trunk If another twisted-pair connection interpreted as a runt packet or segment. Individual trunk segments is used, the maximum length is packet fragment. can be cascaded using repeaters up again 100 meters. With Thinnet it is to 2000 meters. In 1985 the IEEE 185 meters and with thick coaxial standardized this configuration as cable 500 meters. Frame Check Sequence 10BASE5 to signify 10 Mbps Both the DIX and IEEE standard use signaling up to 500 The star topology is much easier to four bytes to hold the CRC-32 meters in length. troubleshoot than a bus system; check on the complete frame from however, the reliability of the hub destination address all the way to Thick is indeed bulky now must be considered in the the end of the data field. The and its topology is not always overall reliability of the system. receiving station calculates its own convenient to wire in a plant. Another reason for the focus on CRC-32, checks on the received Troubleshooting a 100-station twisted-pair is that development of data and compares the results with segment could be a nightmare, so is based on twisted- the transmitted CRC-32 value for a you do not see new 10BASE5 pair and not coaxial cable providing match indicating a successful installations. There is no support for no migration path for installed reception. Note that there is no this cable with Fast Ethernet coaxial cable. inherent mechanism in the Ethernet technology. data link layer protocol to inform the source node that a reception 10BASE-F was accepted or rejected due to a 10BASE2 The 10BASE-F standard is actually a failed CRC-32 check. That task is The answer to the bulkiness of series of fiber optic standards. Fiber left to the higher layer protocol. 10BASE5 along with its expense optics provides long distance, was Thinnet or Cheapernet higher-speed migration, noise standardized in 1985 as 10BASE2. immunity and electrical isolation. ETHERNET PHYSICAL LAYERS Thinnet again was a bus topology There are three media standards: but this time with internal Although Ethernet was originally transceivers. A thin RG-58/u coaxial 10BASE-FL This fiber link designed as a coaxial bus system, cable interconnects up to 30 standard replaces alternate physical layers have stations to a maximum length of older FOIRL standard. evolved since the early 80s. The 185 meters. Segments can be 10BASE-FB This backbone IEEE 802 committee has defined repeated up to 740 meters. BNC standard is not several physical layers and that is style connectors, terminators and very popular. why it is important to specify the taps are used to cable the system. 10BASE-FP This passive hub correct option when selecting Although easier to install than technology is also Ethernet. 10BASE5, the focus on new not popular. installations is towards twisted-pair cabling. This cable is likewise not The 10BASE-FL standard requires a 10BASE5 supported by Fast Ethernet. duplex 62.5/125µm fiber optic The original Ethernet was cable for each link. Transmission configured as a bus system with a distances of up to 2 km are possible thick coaxial cable as the medium. 10BASE-T as well as full-duplex operation. That is what was specified in the In 1990 the IEEE published 10BASE- 1980 DIX standard. An external T after pioneering work was done in the way Ethernet arbitrates access aggravates the collision problem. to the cable. Silence on the line does not What follows is a discussion of the necessarily mean a distant medium access control protocol for a transmitter has not already sent a 10 Mbps half-duplex Ethernet Collision Domain packet down the cable, which will network operating with several This slot time defines the upper eventually result in a collision. nodes. bound limit of the total propagation delay of a transmitted symbol from When a station wants to transmit, it one end of the network to the Collision Detection first waits for an absence of a farthest end and back. This includes A collision is defined as two carrier, which would indicate that the time it takes the symbol to stations attempting to transmit at some other station is transmitting. travel through cables, repeaters and the same time. On coaxial cable As soon as silence is detected, the MAUs and varies with devices used. transceivers, there is circuitry to station waiting to transmit However, regardless of the path, the detect the DC level of the signal on continues to defer until the resulting propagation delay must be the cable. This is the indicator of a Interframe Gap (IFG) time has less than the slot time. Therefore collision. On fiber optic and expired which is 96-bit times the slot time defines Ethernet’s twisted-pair interfaces with separate (9.6µs). If a carrier still appears to maximum network diameter which receive and transmit circuitry, a be absent, the station begins to limits its collision domain. A collision is detected by the transmit while observing its collision domain that exceeds the simultaneous receiving and collision sense circuitry. If no maximum network diameter transmitting of data. Remember that collision is detected, the violates Ethernet’s medium access we are discussing half-duplex transmitting station assumes the control mechanism resulting in Ethernet that allows either transmission was sent successfully. unreliable operation. transmitting or receiving but not at If the transmitter detects an early the same time. Only transmitters collision, one which occurred Collisions can generate runt packets look for collisions and it is their during the preamble, the station that are less than 512 bits in length. responsibility to reinforce a continues to send the preamble These can be detected by the collision with a jam signal. plus 32 bits of data called a jam receiving nodes and discarded Receivers only look for valid signal. This ensures that other accordingly. That is why it is packets and automatically discard stations will note the collision as important that a minimum valid runt packets that are caused by well. After the collision, the Ethernet frame always be sent to collisions. Once a collision is transmitting station will backoff distinguish valid packets from packet detected by simultaneous from retransmitting based upon a fragments. A minimum of 46 bytes transmitters, these transmitters will backoff algorithm. If no collisions in the data field ensures that a valid follow a backoff algorithm are detected after 512-bit times (not Ethernet frame is 512-bits long. counting the preamble), the station is assumed to have acquired the If the network diameter is small, Backoff Algorithm channel and no late collisions collision detection is faster and the When a collision occurs on the should occur on a properly working resulting collision fragments are network, the colliding transmitters network. The collision counter is smaller. As the network diameter will backoff from retransmitting for cleared. This 512-bit time (51.2 µs) increases more time is lost a time determined by a backoff is called the slot time and is critical detecting collisions and the algorithm. This algorithm requires collision fragments get larger. each transmitter to wait an integral Increased network diameter number of slot times (51.2 µs) before attempting a new Ethernet II DIX Frame 64 bits 48 bits 48 bits 16 bits 368 to 12000 bits 32 bits transmission sequence. The integer (46 to 1500 bytes) is determined by the equation: Preamble Individual/ Destination Source Type Data Frame Group Address Address Check k Address Bit Sequence 0 < r < 2 where k = min (n, 10)

The variable k is actually the IEEE 802.3 Frame 56 bits 8 bits 48 bits 48 bits 16 bits 368 to 12000 bits 32 bits number of collisions capped at a (46 to 1500 bytes) maximum of 10. Therefore, r can Preamble SFD Individual/ Globally/ Destination Source Length LLC/Data Frame range from 0 to 1023 when k = 10. Group Locally Address Address Check Address Administered Sequence The actual value for r is determined Bit Address Bit by a random process within each Ethernet node. As the number of Figure 2—Two types of Ethernet frames are used in industry. consecutive collisions increases, the Channel Capture BACKOFF RANGE AS A FUNCTION OF COLLISIONS Collision Estimate of Range Range range of possible backoff times As shown above,the Ethernet on Attempt Number of of Random of Backoff increases exponentially. The number backoff algorithm provides a means Number Other Stations Numbers Times (µs) of possible retries is also capped for peer stations to each gain access 1 1 0……..1 0……..51.2 but at 16. 2 3 0……..3 0……153.6 to the network. Access is provided 3 7 0……..7 0……358.4 to all but in an unpredictable fashion. 4 15 0……15 0……768.0 For example, assume two stations A The question is if access is fair. 5 31 0……31 0…..1587.2 and B on the network wanting to 6 63 0……63 0…..3225.6 transmit. They both wait for an Assume the same two stations A and 7 127 0…..127 0…..6502.4 absence of carrier and then wait for 8 255 0…..255 0…13056.0 B as before. This time, however, they 9 511 0…..511 0…26163.2 the IFG time to expire before both have high amounts of data to 10 1023 0…1023 0…52377.6 initiating a transmission. It does not send and they attempt to send at 11 1023 0…1023 0…52377.6 matter if they are 10 meters or the same time and collide on the 12 1023 0…1023 0…52377.6 2500 meters apart. They could both first attempt. They both back off 13 1032 0…1023 0…52377.6 be sensing silence and 14 1023 0…1023 0…52377.6 but this time A was successful. A’s 15 1023 0…1023 0…52377.6 simultaneously begin to transmit collision counter is cleared but B’s 16 Too High N/A Discard Frame causing a collision at some point. does not clear. If station A has more They each sense the collision and Table 1—Backoff range increases data to send and it is quick to exponentially with the number of back off for either 0 or 1 slot time. assemble another packet to send, it collisions. The odds are 50-50 they will pick might collide with B again. This the same value and collide again. If time B could be selecting higher they do, they will now back off for and higher backoff either 0, 1, 2 or 3 slot times. The times as its collision counter avoiding collisions. The downside of probability of collision is now 25%. continues to increment. However, this approach is that you forfeit the Eventually, one will win in which station A feels it has only inherent multimaster capability of case its collision timer is cleared to experienced the first collision and Ethernet. zero while the other collision timer will probably select a much lower continues to increment until a timeout allowing it to transmit and Another suggestion is to develop a successful transmission. assemble another packet and could token-passing protocol that would beat station B again in the backoff be implemented in Ethernet’s data A high number of retires indicates a contest. This phenomenon of field. This would have to be busy network with more stations channel capture is real and developed and its acceptance wanting to transmit than originally demonstrates that access to the would have to be sought. The assumed. That is why the backoff network is neither fair nor software burden would increase time range is increased predictable. The next time around and technologies such as ARCNET exponentially to provide more station B could get the upper hand already can do this with built-in possible slot times for the additional and limit A’s access. If another firmware transparent to the stations. At ten retries, it is assumed station C decides to transmit as application program requiring no that 1024 simultaneous transmitters well, it could beat out station A due development. exist. This becomes the upper to the state of A’s collision counter. bound limit of stations that can In actuality a station that was last to Others suggest simply increasing coexist on one Ethernet network. arrive could transmit first. Actually this is the logical limit. the data rate to 100 Mbps by using Physically it may be impossible to Fast Ethernet technology. By simply using raw horsepower messages have that many stations on one Improving Ethernet’s Determinism will get through with or without collision domain without violating There has been much discussion in collisions. The collision domain cabling rules. the literature about implementing decreases by a factor of 10 when methods to improve the migrating to 100 Mbps Ethernet determinism of Ethernet. One resulting in a maximum network approach is to incorporate a diameter of only 205 meters, which master/slave protocol such as is a small size network. Of course all MODBUS or OPTOMUX on top of nodes would need to be capable of Ethernet. In this situation, the slaves communicating at 100 Mbps which only respond to the master’s could be a burden for under- commands thereby controlling the Figure 3—For proper operation, a powered microcontrollers. collision domain must be within the traffic on the cable and thus maximum network diameter. One approach is to avoid collisions possible but is also a challenge. ETHERNET MAXIMUM MEDIA SEGMENT LENGTH altogether by using full-duplex Table 2 provides information on the Media type Maximum number Maximum technology and switched hubs. In maximum number of MAUs per of MAUs segment this scheme each node is paired segment and the maximum per segment length (m) with a port on the hub. Each segment length. The maximum Mixing segment node/port arrangement creates it allowable segment length, as well as 10BASE5 100 500 (trunk) own collision domain separate from the repeaters themselves, has been 50 (AUI) all others. There are no collisions assigned delay values by the 802.3 10BASE2 30 185 with a full-duplex link. The specification. Link segment switching hub directs messages to FOIRL 2 1000 other links by observing the The 802.3 specification discusses destination address within the ways to interconnect cable 10BASE-T 2 100 frame. Switching hubs are more segments with repeater sets 10BASE-FL 2 2000 expensive than non-switched hubs without exceeding the collision Table 2—Expansion rules require that and they introduce more latency by domain. A repeater set is defined segments be identified as being either their "store and forward" nature. as repeater electronics and two or mixing or link. The switching hub now becomes more attached MAUs — one for an integral component of the each segment to be connected. cable can be used as link segments. control strategy. The system designer can use either A link segment can only have two transmission system model 1 or transceivers and it must support There is an IEEE 802.1p task group transmission system model 2. full-duplex operation (separate studying schemes that would Approach 2 is the detailed transmit and receive channels) to provide higher priorities to the approach where exact delay speed up collision detection. This transmission of time-critical data. calculations and intergap shrinkage simplified rule does not address all This activity is mainly addressing calculations are made. Approach 1 the possible combinations but it the way multicast frames are sent. is the simplified approach, which is does yield some gross network not as exacting as approach 2. diameters. For example, all five Approach 1 has been further segments cannot be 10BASE5 or Expanding an Ethernet Network simplified by creating the 5-4-3 rule. 10BASE2. If all five were 10BASE-T Expanding an Ethernet network is then the diameter would be 500 possible by the use of repeaters meters. With fiber optics it is while maintaining one collision 5-4-3 Rule different. You cannot use the domain. If expansion is required The 5-4-3 rule states that a system maximum segment length for all beyond a collision domain, this can can have up to five segments in five segments. In the case of only be accomplished by the use of series, with up to four repeaters and 10BASE-F the maximum diameter is bridges, switches or routers. To no more than three mixing 2500 meters. You need to read the maintain one collision domain, a segments. The remaining two standard to understand this symbol sent from the extreme end segments must be link segments. A restriction. of the network must be able to mixing segment is defined as a make a complete round trip within segment that may be connected to The 5-4-3 rule does not address the the slot time of 512-bits (51.2 µs at more than two transceivers. In three repeater configuration which 10 Mbps). Calculating the complete other words, a bus segment. Only yields four segments. In this case, all propagation delay through coaxial cable can be used for a bus segments can be mixing providing a adapters, AUI cables, transceivers, segment (I am ignoring 10BASE-FP) network diameter of 2000 meters trunk cables and repeaters is while fiber optic and twisted-pair for 10BASE5 and 740 meters for 10BASE2. For other configurations you need to refer to approach 2.

ARCNET AS A CONTROL NETWORK

ARCNET was originally developed as an office automation network in the late 70s. Although ARCNET’s use as an office automation network has Figure 4—A switching hub, bridge or router is required to interconnect two or diminished, ARCNET continues to more collision domains. find success in the industrial network, a node can only send a the physical location of the nodes automation industry because its message when it receives the on the network. Once the network performance characteristics are "token." When a node receives the is configured, the token is passed well suited for control. ARCNET token it becomes the momentary from one node to the node with the has proven itself to be very robust. master of the network; however, its next highest node address even ARCNET also is fast, provides mastery is short lived. The length though another node is physically deterministic performance and can of the message that can be sent is closer. All nodes have a logical span long distances making it a limited and, therefore, no one node neighbor and will continue to pass suitable control technology. can dominate the network since it the token to their neighbor in a Although not an IEEE standard, must relinquish control of the logical ring fashion regardless of the ARCNET is defined by ANSI/ATA token. Once the message is sent, physical topology of the network. 878.1. the token is passed to another node allowing it to become the Unlike office automation networks, momentary master. By using token a control network must deliver passing as the mechanism for messages in a time predictable mediating access of the network by fashion. ARCNET’s token-passing any one node, the time protocol provides this timeliness. performance of the network Control network messages are becomes predictable or generally short. ARCNET packet deterministic. In fact, the worst case Figure 5 - The logical ring has nothing lengths are variable from 0 to 507 time that a node takes to deliver a to do with the physical placement of bytes with little overhead and, message to another node can be nodes. The node with the next highest coupled with ARCNET’s high data calculated. Industrial networks address is that node's logical neighbor. rate, typically 2.5 Mbps, yields quick require predictable performance to However, logical neighbors could be responsiveness to short messages. ensure that controlled events occur located at the extreme ends of a Control networks must be rugged. when they must. ARCNET provides physical multi-node network. ARCNET has built-in CRC-16 (cyclic this predictability. redundancy check) error checking and supports several physical Directed Messages cabling schemes including fiber Logical Ring In a transmission sequence, the optics. Finally there must be low A token (ITT — Invitation to node with the token becomes the software overhead. ARCNET’s data Transmit) is a unique signaling source node and any other node link protocol is self-contained in the sequence that is passed in an selected by the source node for ARCNET controller chip. Network orderly fashion among all the active communication becomes the functions such as error checking, nodes in the network. When a destination node. First the source flow control and network particular node receives the token, node inquires if the destination configuration are done it has the sole right to initiate a node is in a position to accept a automatically without software transmission sequence or it must transmission by sending out a Free intervention. pass the token to its logical Buffer Enquiry (FBE).The neighbor. This neighbor, which can destination node responds by In terms of the OSI Reference be physically located anywhere on returning an Acknowledgement Model, ARCNET provides the the network, has the next highest (ACK) meaning that a buffer is Physical and Data Link layers of this address to the node with the token. available or by returning a Negative model. In other words, ARCNET Once the token is passed, the Acknowledgement (NAK) meaning provides for the successful recipient (likewise) has the right to that no buffer is available. Upon an transmission and reception of a data initiate a transmission. This token- ACK, the source node sends out a packet between two network passing sequence continues in a data transmission (PAC) with either nodes. Nodes are assigned addresses logical ring fashion serving all 0 to 507 bytes of data (PAC). If the and one ARCNET network can have nodes equally. Node addresses must data was properly received by the up to 255 uniquely assigned nodes. be unique and can range from 0 to destination node as evidenced by a 255 with 0 reserved for broadcast successful CRC test, the destination messages. node sends another ACK. If the Deterministic Performance transmission was unsuccessful, the The key to ARCNET’s performance For example, assume a network destination node does nothing, and its attractiveness as a control consisting of four nodes addressed causing the source node to timeout. network is its token-passing 6, 109, 122 and 255. Node The source node will, therefore, protocol. In a token-passing assignments are independent upon infer that the transmission failed and will retry after it receives the destroys the token-passing resending of the token continues token on the next token pass. The sequence. Once the token is lost, all until a new logical neighbor is transmission sequence terminates nodes will cease transmitting and found. Once found, the network and the token is passed to the next begin a timeout sequence based returns to the normal logical ring node. If the desired message upon their own node address. The routine of passing tokens to logical exceeds 507 bytes, the message is node with the highest address will neighbors. sent as a series of packets — one timeout first and begin a token pass packet every token pass. This is sequence to the node with the next With ARCNET,reconfiguration of called a fragmented message. The highest address. If that node does the network is automatic and quick packets are recombined at the not respond, it is assumed not to without any software intervention. destination end to form the exist. The destination node address entire message. is incremented and the token resent. This sequence is repeated Several Cabling Options until a node responds. At that time, ARCNET is the most flexibly cabled Broadcast Messages the token is released to the network. It supports bus, star and ARCNET supports a broadcast responding node and the address of distributed star topologies. In a bus message, which is an the responding node is noted as the topology, all nodes are connected to unacknowledged message to all logical neighbor of the originating the same cable. The star topology nodes. Instead of sending the same node. The sequence is repeated by requires a device called a hub message to individual nodes one all nodes until each node learns its (passive or active) which is used to message at a time, this message can logical neighbor. At that time the concentrate the cables from each of be sent to all nodes with one token passes from neighbor to the nodes. The distributed star (all transmission. Nodes that have been neighbor without wasting time on nodes connect to an active hub enabled to receive broadcast absent addresses. with all hubs cascaded together) messages will receive a message offers the greatest flexibility and that specifies node 0 as the If a node leaves the network the allows the network to extend to destination address. Node 0 does reconfiguration sequence is slightly greater than four miles (6.7 km) not exist on the network and is different. When a node releases the without the use of extended reserved for this broadcast function. token to its logical neighbor, it timeouts. Media support includes No ACKs or NAKs are sent during a continues to monitor network coaxial, twisted-pair and glass broadcast message making activity to ensure that the logical fiber optics. broadcast messaging fast. neighbor responded with either a token pass or a start of a ARCNET MAXIMUM MEDIA SEGMENT LENGTH Automatic Reconfigurations transmission sequence. If no Media type Maximum Maximum Another feature of ARCNET is its activity was sensed, the node that number of MAUs segment ability to reconfigure the network passed the token infers that its per segment length (m) automatically if a node is either logical neighbor has left the Coaxial star 2 610 added or deleted from the network. network and immediately begins a Coaxial bus 8 305 If a node joins the network, it does search for a new logical neighbor Twisted-pair star 2 100 not automatically participate in the by incrementing the node address bus 8 122 token-passing sequence. Once a of its logical neighbor and initiating Fiber optic 2 2000 node notices that it is never granted a token pass. Network activity is DC EIA-485 17 274 the token, it will jam the network again monitored and the AC EIA-485 13 213 with a reconfiguration burst that incrementing process and Table 3—Maximum segment length is based upon 2.5 Mbps operation.

Figure 6 - With ARCNET, a distributed star topology is possible using hubs ARCNET Frames ARCNET ANSI/ATA 878.1 designed so that one message will 6 bits 11 bits 11 bits 22 bits 8 or 16 bits 11 to 5588 bits 16 bits get through even with a collision. (1 to 508 octets) Unlike Ethernet, there is no backoff Preamble SOH Source Destination Length SC/Data Frame algorithm. Failed transmitters simply Address Address Check Sequence try again at the next opportunity. The result is high throughput. Figure 7—A byte within an ARCNET frame is preceded by a three-bit preamble.

CAN Data Link Layer ARCNET utilizes RG-62/u coaxial what Ethernet can send in its CAN was designed by Bosch and is cable that is similar in size to packet. currently described by ISO 11898. 10BASE2 Thinnet. In fact, ARCNET’s In terms of the Open Systems coaxial bus option uses the same Interconnection model, CAN style BNC connectors. ARCNET’s Expanding an ARCNET network partially defines the services for twisted-pair option is similar to ARCNET is not a contention based layer 1 (physical) and layer 2 (data 10BASE-T and ARCNET’s fiber optic network and therefore does not option has similar performance to have collision detection or a 10BASE-FL. Newer ARCNET chips collision domain. However, ARCNET link). Other standards such as support variable data rates from 19 has a network diameter that must DeviceNet, Smart Distributed kbps to 10 Mbps and popular EIA- not be violated. With coaxial cable System, CAL, CAN Kingdom and 485 transceivers that utilize twisted- and ten cascaded hubs, the network CANopen (collectively called higher pair cabling. The DC option diameter is 6700 meters at 2.5 layer protocols) build upon the operates over a wide range of data Mbps. This is based upon the fact basic CAN specification and define rates, while the AC option is that the one-way time required for a additional services of the seven restricted to a narrow range of data symbol to travel between the two layer OSI model. Since all of these rates. All cabling technologies can most distant nodes cannot exceed protocols utilize CAN integrated be interconnected with active hubs. 31 µs. This diameter can be greatly circuits, they therefore all comp Unlike Ethernet, ARCNET has more expanded by invoking extended by CAN. than one frame type. Instead of just timeouts without requiring the a data frame, ARCNET has an ITT, need for bridges or routers. This ACK, NAK and FBE (free buffer makes ARCNET about the easiest CAN Medium Access Control enquiry) frame. This is because technology to configure and CAN specifies the medium access ARCNET has build-in flow control. expand. Its expansion rules are control (MAC) and physical layer If a receiver is unable to accept a much simpler than Ethernet’s. signaling (PLS) as it applies to layers transmission, it simply informs the 1 and 2 of the OSI model. Medium transmitter to retry all at another access control is accomplished time. Ethernet does not have flow CONTROLLER AREA using a technique called non- control and it is possible to swamp NETWORK (CAN) destructive bit-wise arbitration. As a receiver thereby losing packets. stations apply their unique An increasing popular device-level identifier to the network, they Figure 7 shows the ARCNET data network is CAN. Originally designed observe if their data are being packet frame (PAC). Like Ethernet, as an on-vehicle network, CAN faithfully produced. If it is not, the ARCNET uses both source and borrows some of the attributes of station assumes that a higher destination addresses but they are Ethernet. Like Ethernet, CAN is a priority message is being sent and, each only one byte in length. The carrier-sense-multiple-access therefore, halts transmission and destination address is repeated to (CSMA) technology. CAN stations reverts to receiving mode. The aid the microcode in the ARCNET listen for silence and continue to highest priority message gets controller chip. Each byte sent by defer for an interframe gap time through and the lower priority ARCNET is preceded by two 1s and before initiating a transmission. messages are resent at another time. one 0 yielding 11 bits and is called When a collision occurs, CAN The advantage of this approach is an octet. The first octet in the data makes the best of the situation. It is that collisions on the network do field is the system code that CAN Standard Frame identifies higher layer protocols like 1 12 bits 6 bits 0 or 64 bits 15 bits 2 7 bits the DIX standard. A two-octet length SOF Identifier RTR IDE Reserved Length Data Frame Ack EOF field identifies long packets (less Check than 508 bytes).Therefore, ARCNET Sequence can send only about one-third of Figure 8—Standard CAN frames utilize an eleven-bit identifier. The RTR bit is not used with DeviceNet not destroy data and eventually all bits in such a way that they become message, one with an identifier of stations gain access to the network. source/destination addresses. Unlike lower binary value, is present and The problem with this approach is the Manchester encoding used by the loser of the arbitration that the arbitration is done on a bit Ethernet, CAN uses the very immediately reverts to receiving by bit basis requiring all stations to efficient non-return to zero (NRZ) mode and completes the reception hear one another within a bit-time encoding with bit stuffing. If at of the message. With this approach (actually less than a bit-time).At a anytime a series of five identical no data are destroyed and, 500 Kbps bit-rate, a bit-time is 2000 symbols are sent out, the therefore, throughput is enhanced. ns which does not allow much time transmitter automatically inserts an The losers simply try again during for transceiver and cable delays. opposite symbol to ensure their next opportunity. The problem The result is that CAN networks are synchronism by the receiver. The with this scheme is that all devices usually quite short and frequently receiver automatically rejects the must assert their data within the less than 100 meters in length at added symbol. same bit-time and before the higher speeds. To increase this sampling point otherwise data will distance either the data rate is The CAN frame begins with a start be falsely received or even decreased or additional equipment of frame (SOF) symbol followed by destroyed. Therefore, a timing is required. the identifier and a remote constraint has been introduced transmission request (RTR) bit. which impacts cabling distance. Neither Smart Distributed System CAN Frames nor DeviceNet use this bit. The CAN transmissions operate using control field includes an IDE bit Expanding a CAN Network the producer/consumer model. used to identify extended 29-bit CAN networks are not easy to When a CAN device transmits data, identifiers. The four-bit length field expand. This is because of its no other devices are addressed but indicates how many data bytes are medium arbitration method that instead the content of the message included in the frame. Like requires decisions to be made is designated by an identifier field. Ethernet, a frame check sequence is within one bit time. Repeaters are This identifier field, which must be used but incorporates only a CRC- only useful at the low data rates unique within the network, not 15 check. Unique to CAN is the where distance is limited solely by only provides content but the two-bit ACK field. All CAN receivers cable attenuation. At the higher data priority of the message as well. All are required to acknowledge a rates the limit is cable delay and not other CAN devices listen to the successfully received CAN cable attenuation. Adding more sender and accept only those transmission. This is done within electronics in the form of a repeater messages of interest. This filtering the transmission and noted by the introduces more delay further of the data is accomplished using transmitter. This is another example decreasing the length of the CAN an acceptance filter, which is an of how efficient CAN is. network. The only way to extend integral component of the CAN CAN networks is to use bridging or controller chip. Data, which fail the Bus arbitration is acceptance criteria, are rejected. accomplished using a CAN(DeviceNet) MAXIMUM MEDIA SEGMENT LENGTH Therefore, receiving devices non-destructive bit- Data Rate Maximum number Maximum consume only that data of interest wise arbitration (kbps) of MAUs per segment segment length (m) from the producer. scheme. It is possible 500 64 100 that more than one 250 64 250 A CAN frame consists mainly of an device may begin 125 64 500 identifier field, a control field and a transmitting a message Table 4—CAN will operate at data rates besides the data field (figure 8).The control at the same time. Using ones specified by DeviceNet. field is six bits long, the data field is a "wired AND" zero to eight bytes long and the mechanism, a dominant identifier field is 11 bits long for state (logic 0) overwrites the APPLICATION standard frames (CAN specification recessive state (logic 1). As the PRESENTATION 2.0A) or 29 bits long for extended various transmitters send their data SESSION frames (CAN specification 2.0B). out on the bus, they simultaneously TRANSPORT Source and destination node listen for the faithful transmission of NETWORK addresses, integral to Ethernet and their data on a bit by bit basis until DATA LINK ARCNET,are not used by CAN. it is discovered that someone’s PHYSICAL However, higher layer protocols dominant bit overwrote their Figure 9 - Ethernet, ARCNET and CAN such as DeviceNet and Smart recessive bit. This indicates that a define the lower two layers of the OSI Distributed System define identifier device with a higher priority Reference Model. routing techniques that break up usually just one network and Bridges operate at the data link the CAN collision domains into usually private at that. Do we really layer and are used to interconnect separate subnets. This approach is want the burden of an IP protocol similar subnets into one logical similar to the way Ethernet collision when we are not interconnecting network. Bridges are effective in domains are separated by using a other networks at the control level? expanding Ethernet and CAN switching hub. networks but are not popular with Finally, there is the issue of the ARCNET. A switched hub is unique real-time performance of TCP/IP. to Ethernet and is actually a special TCP/IP This protocol suite was never class of bridge. By breaking up a So far what has been discussed was designed with speed in mind. It large network into separate the data link performance of was designed for the reliable collision domains, a larger Ethernet, ARCNET and CAN. transmission of packetized geographic network can be Protocols sit on top of the data link messages over multiple routes. realized. Bridges introduce data layer and one of the most popular is This is important at the information latency because packets must be the TCP/IP suite of protocols. In fact level but not the control level. completely stored and forwarded to many people, Ethernet means The recommendation here is to between subnets. Switches have TCP/IP as well. The transport use Ethernet and TCP/IP at the techniques to reduce this latency. control protocol (TCP) provides the information network level only. guaranteed delivery of messages Routers operate at the network while the internet protocol (IP) layer and must be "protocol aware." provides the means of routing Hubs, Bridges and Routers For example, routers respond to IP messages between different Hubs, bridges and routers are used addressing conventions and either networks. With the latest version to expand networks. Hubs operate block or forward IP messages. This of Microsoft’s Windows products, at the physical layer. They provide introduces latency and, therefore, TCP/IP is built-in so it is easy to signal boost, preamble regeneration the use of routers should be configure your Ethernet or ARCNET and signal retiming. Hubs are quite confined to the information level adapter for TCP/IP as long as you effective in providing these only. Routers for Ethernet are have the proper software driver for functions for Ethernet and ARCNET common while routers for ARCNET the adapter you choose. CAN is a but not as effective with CAN and CAN are not. different story. Since CAN data because of the increased delay packets are so small (only eight cause by the additional electronics. bytes), fragmentation is required to Even with that said, signal latency is encapsulate the IP and TCP headers very low with hubs. and data into the data field. This is just not practical. However, with Ethernet and ARCNET there is sufficient room to carry the TCP/IP information even though large messages still require fragmentation. In a non-Windows environment you will need to provide the TCP/IP software which requires about 50K of memory — a burden for microcontrollers.

The other issue is addressing. Each IP node requires a 32-bit address that must be assigned by the node itself or by a host computer attached to the network. This address differs from the physical Ethernet or ARCNET address and care must be exercised when setting up an IP network. The very nature of IP is to exchange data over several separate Figure 10—TCP/IP data is encapsulated in Ethernet frames. networks. The control network is A similar method is used with ARCNET. SYSTEM CONSIDERATIONS data latency. Ethernet’s popular transmitting, its output is no less twisted-pair wiring further reduces than a 15-volt P-P dipulse. A What has been discussed is the its network diameter. Using matched filter tuned to 2.5 Mbps performance attributes of three ARCNET as a control network receives this same dipulse providing networking technologies—Ethernet, allows for simple geographic immunity to noise. Unlike Ethernet, ARCNET and CAN. The performance expansion. ARCNET does not have sensitive of these technologies differs as well collision detection circuitry as their suitability at the three levels vulnerable to outside interference. of the control network hierarchy. Determinism We will study the issues involved in CAN provides good determinism CAN has also proven to be quite making the final determination of even though high priority robust. In-vehicle communications what network to use. identifiers are capable of demands high immunity to dominating a network. Application external noise. layer protocols such as DeviceNet Powered Bus minimize this effect by assigning DeviceNet and Smart Distributed node IDs within the identifier field. Application Layer Protocols System specify a power bus along This has the tendency of evening Ethernet, ARCNET and CAN are with a CAN data bus. This makes it out priorities. ARCNET provides the termed data link layer protocols and convenient to wire up switches and best determinism due to its token- by themselves provide no value. small actuators without the need to passing protocol while Ethernet They must be eventually coupled provide a separate power cable. provides the worst due to its to an application layer protocol in Networks such as ARCNET and contention-based medium access order to perform meaningful Ethernet have no provision for control. Protocol stacks such as control. At the Device level, powering devices making them less TCP/IP further confuse the DeviceNet and Smart Distributed attractive for use as a device determinism debate. System provide this application network. layer to CAN. If Ethernet is to be used at this level, a common Electromagnetic Compatibility application layer would have to Packet size (EMC) be developed. Ethernet has the largest packet size DeviceNet provides a CAN cable and is in the best position to send that includes two shielded pairs At the information level there are out large amounts of data. ARCNET covered with an overall shield. ways for the application to link to can do the same but not with the ARCNET is predominantly wired the TCP/IP suite of protocols which same throughput. CAN with its with coaxial cable. Although in turn links to the data link layer. eight-byte packets is not suitable for Ethernet has coaxial cable options, In a UNIX environment, it is Sockets sending out large amounts of data. the office automation market, and in a Windows environment, it is Therefore, Ethernet is best suited which fuels demand for Ethernet, WINSOCK. Supporting either of for handling the large amount of has standardized on unshielded these standards ensures operation data sent out on the information twisted-pair wiring called on a wide range of computers. level network. category 5. At the control level it is different. Although twisted-pair wiring is The control level is usually Distance popular in the United States, it is considered a private network, and If you exclude techniques such as less popular in Europe where there there is no standardized application bridging, switching and routing, is more sensitivity to EMC issues layer. Control Techniques’ CTnet or ARCNET provides the largest brought on by the CE marking Eurotherm’s ALIN incorporate a network diameter and is the easiest directive. There is a question if the private application layer on top to expand with the simplest of office grade Ethernet adapters can of ARCNET. expansion rules. Ethernet has the pass the heavy industry generic next best distance capability while immunity standard (EN50082-2) CAN has the worst. Hubs introduce with unshielded twisted-pair cable. One, Two or Three Networks very little data latency and are the Ethernet hubs, switches, bridges and There has been discussion best choice for increasing network routers may not pass the higher regarding the collapse of the three diameter. Bridges, switches and immunity standard as well. network hierarchy into one or two routers break the collision domain networks. For example, could a restrictions but introduce greater ARCNET’s coaxial star transceiver is TCP/IP network be used for both extremely robust. While the information network and control network? Although conceptionally pleasing, there is risk with this approach. Firewalls would have to be put in place to guard the control network from unauthorized access. Routers would need to be configured to ensure that data file transfers at the information level will not impact the determinism required at the control level. Also the control network must be immune to a "PING" request from outside the control network. Figure 11 — Ethernet, ARCNET, One approach to this security and CAN controllers (left to right) problem is to use Ethernet and TCP/IP but have two networks—one for control and one for information. devices are usually office grade Some machines would then be devices, they do not receive the required to have two Ethernet same EMC testing that industrial adapters. This approach certainly products receive; nor are they provides the desired isolation but designed to work in industrial if there is a commitment to two environments. They are, therefore, networks, why not have one less suited to the normally higher Ethernet and one ARCNET? noise industrial environment. Also due to Ethernet’s twisted-pair low At the device level it is hard to amplitude signaling, Ethernet is imagine having a TCP/IP network. A more susceptible to electrical noise Motorola 6805 4K microcontroller than ARCNET or CAN. Also, as mounted into a proximity switch ARCNET and CAN have built-in can barely execute a DeviceNet determinism, Ethernet must be slave program. Increasing the adapted to provide the normally performance and memory of the needed control and device network microcontroller just so it can run a determinism at the protocol level. TCP/IP stack does not make There have been a number of economic sense. suggested protocols; however, in- depth testing will be needed to fully evaluate these protocols. Also setting up a large Ethernet network CONCLUSION is not a simple process due to the collision domain rules. ARCNET It has been shown that Ethernet, and CAN provide a much simpler ARCNET and CAN will provide the setup process. necessary networking capability needed at the Information, Control and Device levels, respectively. There has been a lot of discussion of using Ethernet at the Control and Device levels due to its "simplicity" and its perceived low cost. Although Ethernet can perform at these levels, ARCNET and CAN are better suited to the Control and Device levels. As these low cost Ethernet AUTHOR

ETHERNET, ARCNET, and CAN—Proposed Network Hierarchy for Open Control, 1999.

George Thomas, Contemporary Controls [email protected]

REFERENCES FOR MORE INFORMATION:

Practical Networking With Ethernet, Charles E. Spurgeon, 1997, International Thomson Computer Press

CAN System Engineering From Theory to Practical Applications, Wolfhard Lawrenz, 1997, Springer-Verlog www.industrialethernet.com

Switched and Fast Ethernet, Second Edition, Robert Breyer and Sean Riley, 1996, Macmillan Computer Publishing USA

TCP/IP Clearly Explained, Second Edition, Pete Loshin, 1997, Academic Press

TCP/IP Illustrated, Volume 1, The Protocols, W. Richard Stevens, www.arcnet.com 1994, Addison-Wesley Publishing Company

ARCNET Tutorial & Product Guide, Contemporary Controls, 1998

Extending CAN Networks by Incorporating Remote Bridging, George Thomas,1997, 4th CAN Conference, Berlin, Germany www.can-cia.de

International Standard ISO/IEC 8802-3 ANSI/IEEE Std 802.3, 1996, The Institute of Electrical and Electronic Engineers, Inc.

ARCNET is a registered trademark of Datapoint Corporation. Contemporary Controls, ARC Control and ARC DETECT are registered trademarks of Contemporary Embedded Networking Control Systems, Inc. Specifications are subject to change without notice. Other product names may be trademarks or registered trademarks of their respective companies. www.ccontrols.com ©Copyright 1999 Contemporary Control Systems, Inc. www.ccontrols.com