Three Hidden Demons in your Network
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
Three Hidden Demons in your Network To get the full benefit from this paper, please read “DeviceNet Physical Layer, an Insider’s View” first. Demons … What are demons anyway … most people don't want to believe they exist, and those that believe in them fear them. They fear them, not because they understand the danger they may or may not represent, but because their lack of knowledge paralyzes them with the fear that they may have to deal with one some day. Let's take a deep breath and boldly name the demons lurking in your network: Bus Errors, Marginal Media, and the granddaddy of all demons, Noise (or electrical interference). The demons are lurking in your network, and the only way they can harm you is if you ignore them and simply hope they don’t bother you. The goal of this paper is to arm you with the information you need to exorcise the demons and assure long-term reliable operation of your DeviceNet networks. This paper addresses the network physical layer only and avoids upper layer topics such as messaging details and object models. Bus Errors Bus errors are the ultimate manifestation of a physical layer problem. It is quite common for a network to experience some bus errors and continue to operate correctly, which means that there are a significant number of networks with borderline physical layer problems that remain undiagnosed. There are a number of different causes for bus errors and, while some error sources cannot be completely avoided, it is reasonable to expect the vast majority of networks to operate error free. You can’t check for bus errors by looking at the indicator lights on the scanner or slave devices, you have to use a diagnostic tool. Any non-zero level of bus errors deserves investigation. The absence of bus errors is not an indication that your network is healthy. CAN Error Detection The CAN specification requires all nodes to check all messages for errors, regardless of the intended recipient. If any node detects a problem with a transmission it transmits an error frame, which corrupts the remainder of the original message and causes all other nodes (including the transmitting node) to detect the error also. The implications of this scheme are significant. One faulty node can cause errors during other node’s transmissions, even if the faulty node is not actively communicating. A localized error source (such as a cable problem) can cause errors in the transmissions of all nodes in the network. Analyzing Error Rates Examining individual node error rates can be a powerful diagnostic tool, but failing to properly analyze the results can lead to misdirected efforts. The rate of errors on a single node has extremely limited value by itself. The real diagnostic value is in comparing the ratio of errors to successful messages (Error Rate / Message Rate) of all nodes in the network. A localized problem will usually show up as a disproportionate error rate on the affected node(s). Caution: if the affected node(s) are not actively communicating then errors will only show up on the nodes that are actively communicating! To contact us: www.Woodhead.com 1 All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
Three Hidden Demons in your Network Marginal Media Media problems can range from invisible, causing no bus errors, to severe where communication is not possible at all. Marginal media conditions often result in no bus errors at all, but can grow in severity and ultimately cause serious trouble. The connectors and interface circuitry inside each device can also be considered part of the media and should not be overlooked when tracking down the source of improper signals. Common media installation problems such as short and opens almost always affect operation to the point where they are noticed. Other problems are not so obvious. Problem Symptoms How to diagnose Corroded Zero or more bus errors, Invalid CAN signal or differential voltages, with or Connections possibly intermittent. without the presence of errors, are an indication of poor Deteriorating or invalid connections, which can be caused by a number of CAN signal voltages. factors, including connector corrosion. Corroded connections become intermittent and ultimately fail completely. Corrosion almost always decays signal quality before errors occur. Early detection can be achieved by recording a “baseline” of dominant and recessive voltages for each signal and differential voltages at installation time and periodically checking for deterioration. Loose or Zero or more bus errors, Invalid CAN signal or differential voltages, with or Improperly possibly intermittent. without the presence of errors, are an indication of poor Installed Deteriorating or invalid connections, which can be caused by a number of Connectors CAN signal voltages. factors, including loose or improperly installed connectors. Loose connections can be intermittent or simply poor electrical connections. Intermittent connections operating perfectly one minute than completely failing the next, and often do not result in improper signal voltages. Poor connections cause various levels of signal distortion, which may or may not consistently cause bus errors. Relying solely on error rates or signal measurements is not adequate to detect both variations of loose connections. If errors are present, analyzing the relative error rate of all nodes on the network can help isolate a section of cable or connectors to be checked. Suspect connectors can be checked by applying mechanical force to the suspect connector while monitoring the network error rate and/or signal voltages. 2 To contact us: www.Woodhead.com All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
Three Hidden Demons in your Network Problem Symptoms How to diagnose Damaged Zero or more bus errors. Cable damage can occur as a result of stress Cable (stretching and bending) encountered during installation, and also occurs as a result of accidental or unavoidable damage after installation. Some systems that must flex the cable (i.e. robot arms & other moving equipment) cause unavoidable stress damage to cables over time. Accidental damage typically causes immediate failure, and while this is annoying it is unavoidable and does not cause long-term reliability problems as the problem is detected and repaired relatively quickly. Stress damage results in the same types of symptoms as poor connections and corrosion. Cable that has been stressed no longer has the same impedance or shielding characteristics, which affects signal distortion, noise and signal attenuation. When cable suffers sufficient damage to cause communication problems, the dominant/recessive signal and differential levels will change, and bus errors become more likely. Verifying all system voltages after installation is a good way to check for installation stress damage. Early detection of unavoidable stress damage (i.e. in flex applications) can be achieved by recording a “baseline” of dominant/recessive and signal voltages at installation time and periodically checking for deterioration. Excessive Intermittent or continuous If the dominant and recessive signal and differential Cable Length bus errors. voltages, and common mode voltage are all valid, but bus errors still occur, excessive cable length is a possibility. If reducing the network length by disconnecting a section of cable (and/or a few nodes at the end of the network) eliminates the errors then a thorough check of cable length is warranted (don’t forget to add a terminator if you disconnect part of the trunk) Missing/Excess Zero or more bus errors. No termination is indicated by a non-zero recessive Terminators Possibly invalid CAN voltage, but this symptom could also be an indication of signal voltages. an open in one of the signal wires. Excess or missing Excessive termination causes a low dominant terminators are not differential voltage, but the same symptom can also guaranteed to cause bus indicate an open or short in a signal wire. It often takes errors. Incorrect more than one extra terminator to cause the dominant termination is more likely differential to fall outside the acceptable range. to cause problems at Excessive or missing termination can cause signal higher baud rates. distortion, which is manifested as bus errors. Bus errors caused by incorrect termination typically affect all nodes equally (relative to their message traffic). Checking termination is an important step in tracking down the source of unexplained bus errors. To contact us: www.Woodhead.com 3 All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
Three Hidden Demons in your Network Noise Noise is the demon that strikes fear in the hearts of many. Noise is poorly understood, partly due to the complex nature of the physics involved, and partly due to the fact that systems installation guidelines are designed to eliminate the need for users to deal with noise issues. Discussions about noise range from those that are too technical for the average person to make use of, to vague theoretical discussions that have no practical application. It is my intent to walk a fine line providing sufficient detail to convey a general understanding of the nature of noise, while limiting detailed information to that required for practical applications. Noise Sources Noise is caused by external influence. Three common methods of influence are electromagnetic, magnetic and electrical. All three involve an alternating or transient electrical signal in one cable or piece of equipment causing a similar signal in the network cable. The level of noise signal induced in the network cable is affected by the strength of the noise source, the proximity of the network cable to the noise source and cable characteristics. EMI Electromagnetic interference (EMI) occurs when a cable or device intentionally or unintentionally emits electromagnetic radiation (e.g. radio waves). Intentional emitters include cell phones, personal communicators, radio modems and wireless networks – basically anything that uses radio waves to perform a function. Unintentional radiators include virtually any equipment that contains a microprocessor, digital electronics or uses high frequency or high-energy signals in its operation. A great deal of industrial systems incorporate high-energy electrical equipment. Even though the electrical supply itself is not high frequency (60Hz AC or DC), the way it is used often results in unintentional radiation of EMI (for example, arc welders, electric furnaces, drives & servos, contactors etc.). Regulations exist for both intentional and unintentional radiators limiting the output levels to specific levels in various frequency bands. All intentional and unintentional radiators are tested to ensure compliance with appropriate levels. Equipment intended for residential use have tighter emission requirements, commercial and industrial requirements are looser. Certain types of industrial equipment that simply cannot be designed with low emissions have very lax emission requirements. Special care should be taken to protect network cabling from known high emission sources. Noise induced in a network cable as a result of EMI is usually quite high in frequency (100’s of kHz to GHz). Magnetic (Inductive) Coupling Magnetic interference occurs when the alternating magnetic field around a cable or piece of equipment induces an alternating current in a network cable. The effect is the same that occurs intentionally in a transformer; an alternating current in one conductor causes an alternating magnetic field, which in turn, induces a proportional alternating current in a second conductor. Magnetic coupling occurs at frequencies from Hz to GHz, and is limited by distance – the network cable has to be located quite close, and parallel to, the magnetic field to be significantly affected (i.e. two cables in the same wire tray). 4 To contact us: www.Woodhead.com All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
Three Hidden Demons in your Network Capacitive Coupling Any two electrical conductors in close proximity form a capacitor. The electric fields related to the positive and negative charges in the two conductors interact and can permit high frequency electrical signals to pass between the conductors just as if they were electrically connected. The impedance (effective resistance) of this capacitive connection is related to the frequency of the signal, the total area of the two conductors that is in proximity and the distance between the conductors. Two cables that run in the same wire tray for a distance have a relatively large area in close proximity to each other and consequently have relatively high capacitive coupling. Noticeable noise induced in a network cable via capacitive coupling can cover a wide frequency range from kHz to GHz and usually resembles the original noise source. Examining the frequency and nature of the noise can often provide clues to the source of the interference. Electrostatic Discharge Electrostatic Discharge (ESD) is not a method of external influence; rather it is a signal source that can induce noise in a network cable by one of the three methods already described. ESD occurs more often than you might think. Any time two electrically conductive items are insulated from each other it is likely that they will have a difference in voltage. When the two items come into contact or close proximity a current flows between them until the voltage difference is neutralized. Even though the two parts involved in a discharge have a DC voltage difference, the discharge pulse itself is not purely DC and contains a broad spectrum of frequencies that can range from kHz to MHz. In some cases, when the difference in voltage is sufficient, the current flow can jump gaps and form a spark. Many discharges are not detectable by humans as the voltage difference is insufficient to cause a spark or be felt. Any equipment can build up electrical differences due to friction with the air or moving parts. In cases where non-conductive moving parts exist (especially static generating materials such as acrylic) static build-up and frequent discharge is likely. A low-level discharge (when there is no detectable spark) directly into a network cable can cause a transient of several volts. Depending on the nature of the discharge the result can be differential and/or common mode noise with the same effect on communications as noise from other sources. High-level discharges (usually with a detectable spark) directly into the network cable can cause serious network problems and even permanent damage to network components depending on the voltages involved. High-level discharges (usually with a detectable spark) result in very large current pulses. These discharge pulses are a noise source like any other and can induce noise in the network cable via electromagnetic and capacitive coupling depending on the strength of the discharge and proximity to the network cable. Noise induced as a result of ESD is usually random in nature and often takes the form of a relatively large, short duration, noise signal. To contact us: www.Woodhead.com 5 All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
Three Hidden Demons in your Network Susceptibility Testing Standards exist for testing the susceptibility of industrial control equipment to EMI and other types of interference, including electrostatic discharge. Each test standard has a number of levels, or classes, of equipment operation: A) Equipment tolerates test conditions with no change in operation B) Equipment fails under test conditions, but automatically recovers C) Equipment fails under test conditions and requires manual intervention (i.e. reset) to resume normal operation and D) Equipment in non-functional after exposure to test conditions. The product manufacturer determines which level of operation is appropriate. The presence of a compliance mark (CE, for example) on a product is no guarantee that the product will operate fault-free in a factory environment. Only examination of the test standards the product was tested to will tell you what the product can be expected to tolerate. Noise & DeviceNet Noise is a difficult thing to deal with and, in the case of DeviceNet, there are two different types of noise effects to consider: differential and common mode. To understand the difference you need to know how data is transmitted on DeviceNet (review “DeviceNet Physical Layer, an Insider’s View”, Common Mode Voltage and Grounding & Shielding). DeviceNet uses differential transmission; data is transmitted as opposite signals on two wires. The receiver subtracts the signal on one wire from the other to extract the data signal. This technique has several advantages, including good noise immunity. Common Mode Noise When the two signal conductors are twisted together (or placed in close proximity as in flat media) they each tend to pick up the same noise signal relative to ground. This is called common mode noise. A differential receiver cancels common mode noise when it subtracts one signal from the other like this: Received Signal = (SIGNAL_A + Common Mode Noise) – (SIGNAL_B + Common Mode Noise) = SIGNAL_A – SIGNAL_B + Common Mode Noise – Common Mode Noise = SIGNAL_A – SIGNAL_B (Common Mode Noise is cancelled) Now for the bad news: The receiver cancels common mode noise, but only if both signal voltages are within the range the receiver is designed to handle (common mode range). If the total of the nominal signal voltage range, DC common mode voltage and common mode noise exceed the receiver’s common mode range, it may incorrectly interpret the bus level resulting in bit errors. 6 To contact us: www.Woodhead.com All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
Three Hidden Demons in your Network Differential Noise Depending on the proximity and type of noise source, as well as characteristics of the cable, there is a certain amount of difference in the noise signal picked up by the wires relative to each other. This is called differential noise. Since differential noise looks just like the data signal (as a voltage difference between the data wires), the receiver cannot cancel it: Received Signal = SIG_A – SIG_B + Differential Noise Differential noise can cause bit errors if has sufficient magnitude to change the differential signal voltage from Dominant to Recessive or vice-versa. How Much Common Mode Noise is OK? Since common mode noise is cancelled by the receiver, it has no negative effect until the total of the nominal signal voltage range, DC common mode voltage and common mode noise exceed the receiver’s common mode range. With signal voltages outside the receiver’s common mode range, it is not guaranteed to properly decode differential signals correctly. In the case of DeviceNet, there is no specified common mode noise limit, but by making a few inferences we can arrive at a rule of thumb. The nominal signal range for DeviceNet is 0.5V to 4.5V (ISO11898, CAN dominant signal levels) The maximum DC common mode voltage is 5V (DeviceNet specification) Transceivers must work with a normal signal range from –5V to 10V (DeviceNet specification) Few commercially available CAN transceivers meet this requirement! Commercially available CAN transceivers (that meet DeviceNet’s signal requirements) have a common mode range of –7V to 12V By adding the signal range (0.5V to 4.5V) to the maximum DC common mode voltage (5V) we arrive at the nominal signal voltage range including common mode voltage effects (-4.5V to 9.5V). Since many devices (but not all) include a shottky diode in the DC common connection we should add a typical 0.5V positive offset to the maximum voltage. The result is a nominal signal range of –4.5V to 10V. By comparing the nominal signal range (-4.5V to 10V) and the transceiver common mode range (-7V to 12V) we can determine the maximum p-p common mode signal that can be tolerated without violating the receiver common mode range (4Vp-p, assuming a symmetrical noise signal). Due to the nature of noise, it is extremely difficult to capture and measure the maximum amplitude. It is wise to assume that the peak noise level is somewhat higher than measured. For this reason 3Vp-p max is a safe practical limit for common mode noise. Differences in the amount of DC common mode voltage in a system (managed by end-user), or the transceivers common mode range (controlled by product developer) affect the total common mode noise that can be tolerated before bit errors become likely. To contact us: www.Woodhead.com 7 All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
Three Hidden Demons in your Network How Much Differential Noise is OK? Since differential noise looks just like the data signal (as a voltage difference between the data wires), the receiver cannot cancel it. Differential noise can cause bit errors if has sufficient magnitude to change the differential signal voltage from Dominant to Recessive or vice-versa. The receiver dominant differential threshold is 0.9V (ISO11898, ECU dominant signal levels) The minimum dominant differential on the bus is 1.2V (ISO11898, bus dominant signal levels) The receiver recessive differential threshold is 0.5V (ISO11898, ECU recessive signal levels) The maximum recessive differential on the bus is 12mV (ISO11898, bus recessive signal levels) By subtracting the dominant receiver threshold (0.9V) from the bus minimum dominant differential (1.2V) we determine than a 0.3V margin exists. Therefore, differential noise in excess of 0.6Vp-p (assuming a symmetrical noise signal) can cause incorrect interpretation of a dominant bus state. By subtracting the bus maximum recessive differential (12mV) from the recessive receiver threshold (0.5V) we determine than a 0.498V margin exists. Therefore, differential noise in excess of 0.996Vp-p (assuming a symmetrical noise signal) can cause incorrect interpretation of a recessive bus state. The different noise margins for dominant and recessive bus states recognizes the fact that there is a lower load impedance between CANH and CANL when a node is transmitting a dominant bit (the driving transceiver acts as an additional bus load as far as the differential noise is concerned) and consequently lower induced noise for a given noise source. Measuring Common Mode Noise An oscilloscope can be used to check noise levels, but be careful: Improper connection of the scope can result in high noise readings that don’t reflect the actual noise in the system. Use a scope with a minimum of 100MHz bandwidth Connect two scope probes to the two CAN signals (Channel A – white, Channel B – blue) Connect the ground lead of each probe to DC common with as short a ground lead as possible (1-2 inches). Grounding both probes is essential, as is using the same type of probe and length of ground on both probes. Ground leads longer than 3 inches are likely to affect the accuracy of noise measurements. It is difficult to directly measure the noise signal, as the data signal is also present. The data signal frequency on DeviceNet is ½ of the baud rate or less (62.5kHz, 125kHz or 250kHz), typical noise signals have a much wider frequency range. If the noise signal is greater than 3Vp-p (or a single spike is more than1.5V over the normal signal level) bit errors are more likely to occur on networks with maximum DC common mode voltage. Networks with lower DC CMV have proportionally higher common mode noise margins. It is often easier to set the scope trigger at 11V and -6V (just inside the maximum signal range for typical CAN chips) and check for any spikes over those levels. Since the scope is referenced to DC common, it is necessary to perform this test at each end of the network, and at the power supply in order to check the full network common range of the network. If you see unfavorable voltages, there is probably either a DC common mode voltage or common mode noise problem. In either case the network cannot be relied upon for long-term error-free operation. 8 To contact us: www.Woodhead.com All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
Three Hidden Demons in your Network The easiest option is to use a tool that measures the common mode voltage of the network, including common mode noise. This type of tool can check the total common mode voltage (DC common mode voltage and common mode noise) of the system by connecting at only one place in the network, saving eliminating the time-consuming effort of testing in multiple locations. Measuring Differential Noise Differential noise can be measured using the same scope connections as common mode noise. Configure the scope to display the difference between the two signals (Channel A – Channel B, some scopes perform this directly, others require you to invert one channel then display the sum of the two). The difference between the two signals is the differential voltage, which includes the data signal and differential noise. The data signal has the same frequency characteristics described above, but has an amplitude equal to the sum of the individual signal amplitude. You can expect some data bits to have a much higher amplitude during the start of a frame and at the very last dominant bit of a message, this is caused by multiple nodes transmitting dominant bits simultaneously. The key indicators to look for are: A) a recessive state where the differential noise takes the differential signal over 0.5V and B) a dominant state where the differential noise forces the differential signal below 0.9V. If you see either of these conditions, there is sufficient differential noise to cause bit errors – you may not actually see bit errors at this point, but the conditions are ripe for problems. Ideally there should be significantly lower levels (very close to zero) of differential noise on a network. The easiest way to check differential noise levels is to use a tool that independently measures the dominant and recessive differential signal levels and records minimum and maximum levels. By comparing “normal” signal levels with minimum and maximum levels, the level of noise can be determined. Reducing Noise Noise control should be considered before a system is installed rather than assuming it can be ignored until a problem exists. The following rules can be used to design minimum-noise systems, or to reduce noise in systems that have not been installed with low noise in mind. Follow recommended shielding & grounding practices for each network, do not mix shielded and unshielded network segments Use only recommended cable types and avoid substitutions of cables that “seem” to be similar. Simply comparing the number of conductors and wire gauge is not enough; even the insulation and shield construction has an effect. This is especially important to minimize differential noise. Keep maximum distance between network cables & other cables in a system, use separate wire trays and conduit if possible. Avoid placing network cables near high current cables where the power is turned on and off rapidly (i.e. motor drives & servos) or the current flow changes rapidly (i.e. welders). Independent wire trays with separation distances measured in feet is a wise choice. Where network cables must cross other cables, cross them at 90º to minimize capacitive, and inductive coupling. A cable that crosses other than at 90º is, in effect, parallel for a short distance and subject to higher induced noise. Shielded cable is effective in reducing common mode noise levels when properly connected and grounded. Improper grounding or failing to connect the shield of all cable segments can eliminate the benefit of the shield, and in some cases can actually increase noise levels in the cable. To contact us: www.Woodhead.com 9 All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
Three Hidden Demons in your Network Improving Common Mode Noise Tolerance DeviceNet’s common mode noise limit is a function of the level of DC common mode voltage (DC CMV) in the power system (voltage drop in the network common conductor). The sum of DC common mode voltage and common mode noise must be less than ±6.5V (±7V is the actual transceiver limit). With the maximum 5V DC CMV only ±1.5V (3Vp-p) remains for common mode noise before bit errors can be expected. This is sufficient for most systems, but in some cases high levels of common mode noise are unavoidable. Every volt reduction in DC CMV results in a ±1V (2Vp-p) increase in the common mode noise budget. In systems where unavoidable common mode noise exists, and all noise reduction steps have been taken, the common mode noise tolerance can be increased by moving the power supply, or adding another power supply to reduce the system DC common mode voltage. Real example: A robot system consists of a control panel, robot arm with numerous servomotors, and a DeviceNet network connecting the controller to end-of-arm tooling I/O devices. The network cable and servo power wires must all pass through the inside of the arm; maintaining distance between the cables in the arm is not possible. From the base of the robot to the control panel, the network and power cables follow different paths to minimize noise coupling. Tests indicate that 3.3Vp-p of common mode noise is induced in the network cable when the servos are energized. Since noise measurements are often affected by the test equipment itself it is prudent to assume that the actual noise under all conditions is somewhat higher than measured. This level of noise is getting close to the point where it may cause communication errors in systems with 5V DC CMV. Further testing determines that the DC common mode voltage of the system is 0.3V, confirming the predicted CMV from the design phase. Since the DC CMV is 4.5V lower than the maximum permitted, the acceptable noise margin for this system can be increased by the same amount from 3Vp-p to 7.5Vp-p. The measured noise (3.3Vp-p) is much less than the calculated noise margin (7.5Vp-p), which indicates that reliable operation is assured. The reliability of this determination is entirely dependent on accurately measuring the maximum noise levels. To confirm the calculations, a tool that measures system common mode voltage is connected to the robot for a period of time. The total common mode voltage (including DC and noise) is measured at 3.65V confirming the calculated results. 10 To contact us: www.Woodhead.com All trademarks contained herein are the property of their respective owners. © 2005 Woodhead Industries, Inc.
You can also read