Advertisement
Articles
Advertisement

CAN-Bus Analyzers: From Cables to Communications

Thu, 03/24/2011 - 11:29am
Jon Titus, Senior Technical Editor
Don't let bus and data problems derail CAN-bus designs.

Jon TitusEngineers know about tools for controller-area network (CAN) applications that help identify problems with bits and bytes. But they might get fooled into ignoring low-level problems that can occur down at the "wire-and-connector" level. Without good instruments, those problems can prove difficult to find.

"You might have equipment that has operated properly for years yet now the CAN-bus system seems to become unstable or just doesn't work right," said Wolfgang Langer, director of marketing for Softing North America. "So you need a cable tester that attaches at any point in a network to examine electrical characteristics. That type of analyzer doesn't look at the data, it looks at the signal and it can tell you at, say node A, the signal is good, but behind this node the signal is bad. Often the problem comes down to a bad mechanical connection or corrosion on a connector contact."

Equipment designers also must pay attention to where they place CAN cables. "Sometimes a cable runs close to a motor or a motor starter, for example," explained Langer. "Those devices can create enough EMI to influence CAN-bus signals. A cable tester can detect this type of problem and help you better route cables through a machine."

ec1104es101Fig1-alt-web"One common problem we run into involves bus termination," explained Josh Pearl, sales manager at IXXAT. "You should have a termination resistance of about 120 Ohms at each end of the network. But many times the installed resistors have the wrong value or someone forgot to install them. If you have a short or a slow network, you might not see a problem. But as you increase the bus speed or length, more problems become apparent. So you need good analysis tools for the physical bus."

"You must be concerned about signal quality, too," stressed Pearl. "You need to know that you have the correct bus-signal voltages because CAN signals use a differential voltage arrangement. You need to know that when the bus goes into its recessive state that the CAN High and CAN Low lines are at the same voltage. Then when the network becomes active, do the CAN High and CAN Low signals provide the proper differential voltage? You also need to know if you have excessive overshoot on signals. Those things combine to give you a sense of signal quality."

After you analyze and solve physical-bus problems, you might need tools that help analyze bus traffic to ensure proper operation at higher protocol levels. "A typical company usually has a CAN network that includes different types of I/O devices, controllers, and systems," said René Hackl, product manager for PHYTEC America. "You assume you have known-good CAN devices with the proper configurations and CAN cables properly installed. But even so you could run into problems that require analysis of bus transactions."

"We have software that lets you record all the traffic on a CAN-bus system so you can analyze a trace file with time stamps to see perhaps that a message got sent but it didn't arrive at some nodes," said Hackl. "And you can play back recorded files to recreate network traffic to help you determine the cause of a lost CAN message."

"CAN-based equipment will transmit error messages that normally you don't care too much about," said Hackl. "In most cases, the equipment handles such problems without affecting network performance. But suppose the error persists and gets worse. The CAN system might still work but it's just a matter of time before it fails. By looking at the error messages, you could detect an increase in their number, determine where they come from, and fix the problem."

The X-Analyser from Softing, for example, specifically looks at the CAN protocol layers. "Often people add an upper protocol layer such as CANopen," explained Langer. "So we can give them a lot of information at that level and they can see the information one CANopen node sends to another. The analyzer also will test network nodes. You write a script to emulate other devices so you can test CAN devices you have developed as well as complete networks"

"You need tools that will interpret the information for a protocol such as CANopen," stressed Pearl of IXXAT. "Not only can engineers see a data object sent to node 1, they can see a temperature value in degrees Celsius. The CAN in Automation (CiA) organization has created standard device and application profiles so when your system or devices use a standard profile, the analyzer knows how to interpret CANopen communications. The CiA also has device profiles for encoders, motion controllers, sensors, and so on. A commercial tool can parse the CANopen messages into data with the units and formats you want."

For further reading:

CAN in Automation: http://www.can-cia.org/

IXXAT canAnalyser: http://www.ixxat.com/cananalyser_en.html

PHYTEC America PCAN-Diag: http://www.phytec.com/products/can/can-diagnostic-tools/index.html and http://www.peak-system.com/Details.114+M599e0ef6b70.0.html?&L=1.

Softing CAN Tester and X-Analyser: http://www.softing.com/home/en/industrial-automation/products/can-bus/diagnostic-tools/index.php?navanchor=3010149.  

Voss, Wilfried, "A Comprehensible Guide to Controller Area Network," Copperhill Media, 2008. www.copperhillmedia.com.

Bus-analysis hardware, such as this IXXAT tester, can trigger on bus events, monitor bus events, and simulate a network device. Software analyzes communications to help locate electrical and communication problems.
Advertisement

Share this Story

X
You may login with either your assigned username or your e-mail address.
The password field is case sensitive.
Loading