Advertisement
Articles
Advertisement

When Do Test and Measurement Apps Need More than USB?

Sat, 11/12/2011 - 8:09am
Chuck Cimino, Keithley Instruments, Inc., www.keithley.com

LISTED UNDER:

USB is a convenient and low cost data communications interface for many test and measurement applications, but you need to be aware of limitations and choose carefully between USB and other alternatives.


Many engineers are now using the Universal Serial Bus (USB) to connect test instruments to PCs, which function as controllers or are used for data collection and manipulation. For relatively simple bench and small system applications, USB is a good fit because it’s simple to use and relatively inexpensive. USB has become universally available, especially given the popularity of slot-less laptops, netbooks, and even some types of tablet computers now in labs and on engineer’s benches.

For more robust system-intensive applications, a more sophisticated and fault tolerant interface such as Ethernet based LAN eXtensions for Instrumentation (LXI) can be a better choice. LXI overcomes most of the scalability and reliability limitations of USB systems, and offers more features and performance options than do USB systems. Knowing when to choose one over the other is crucial for getting the most bang for your buck and avoiding reliability or performance shortfalls.

Why is USB so Popular?

Why are USB interfaces so widely used in test and measurement (T&M) applications? For one thing, they are essentially free on all modern desktop, laptop, and some tablet computers. For another, since the release of the USB 2.0 specification, configuring USB systems is very easy and operating system support has become more stable. When you also consider that a growing number of test instruments now also have a standard USB port, and there is wide availability of low cost USB converters, you can understand why USB-based test systems have become so popular.

Typically, PCs automatically recognize most common USB devices, such as flash drives, USB backup drives, and USB-GPIB convertors, when they are connected to a USB port. If you install a VISA driver on the PC that supports the USB Test and Measurement Class (USBTMC) protocol, then connecting a test instrument is almost as easy as connecting USB-based consumer products. The only requirement is that the instrument itself supports the USBTMC protocol. The TMC protocol emulates SCPI commands which are used with GPIB-based instruments, thus providing some degree of backward test code compatibility when migrating to USB.

USB test and measAnother reason for USB’s popularity is that USB ports can meet the data-transfer requirements of many, if not most, bench and small-scale test systems (at least in theory – rarely are the interface speeds the limiting factor in T&M systems!). The theoretical maximum data rate for USB 2.0 connections is 480 Mbit/s, or 60 Mbytes/s. This bandwidth is shared amongst all the devices connected to a USB host port, but most small systems have only one or two instruments connected to the port. So, even if the test instruments have to share the host’s bandwidth, there’s typically plenty of headroom; and most test applications won’t slow down noticeably, unless there is a large amount of data transfer or very low latency requirements. 

What are USB’s T&M Limitations?

Despite the popularity of USB as a T&M interface, it does have some limitations. Operating system issues and bulky programming environments can limit USB performance, cause the port to hang up, and occasionally disconnect USB devices. A related issue is that USB interfaces were not designed to work in environments that have high ambient or ground line electrical noise, such as the factory floor or mobile automotive environments. The high noise levels in these environments can cause USB transmission problems that could corrupt data, slow the data transfer rate, or even result in disconnections and test failure. By contrast, LAN physical specifications included differential signals and high isolation from ground-based noise sources and current loops.

Sometimes communications disconnects are a result of bugs in the instrument’s USB interface or test application software, such as time outs or other error cases. The problem with connection failures is lack of a mechanism to automatically and seamlessly restore a disconnected USB device. This makes USB instruments unsuitable for use in systems that must run unattended, and for which test sequence interruption is intolerable.

Another limitation is that USB cables are not positively locked into their sockets and are also limited to a maximum length of five meters without amplification. This means they are not well suited for systems that include many different instruments, or where instruments are physically separated by substantial distances. The expandability of systems that use USB interfaces is also limited because as you increase the length of USB cables, the bandwidth of the connection decreases. You can expand interconnections and increase distances by using hubs; but clearly the USB interface wasn’t meant for connecting devices that are far away from the computer.

There are also issues associated with the use of hubs and external power sources. For example, if a USB device takes its power (+5 V) from the USB bus, there are limitations on how much current it can draw before it is cutoff by the PC or hub. Also, a USB hub that takes its power from the host bus can only supply 100 mA per port up to a total of four ports. That said, a USB hub that has its own power supply can provide up to 500 mA per port, and the number of ports would depend on the capabilities of the hub’s power supply.

What are Major Criteria for Selecting LXI?

For large instrument count, physically distributed and/or high reliability test system applications, LXI is a much better choice than USB. Since its data communications are based on Ethernet physical and protocol technologies, cable length versus performance tradeoffs really are not an issue – LXI LAN cable lengths can be many hundreds of meters or longer without degradation. At the test site, test instruments can be meters and even rooms apart and still be directly and inexpensively connected to one another with standard Cat 5 cables without significant degradation in bandwidth and data transfer rates.

If an LXI instrument loses connection to the computer briefly -- say due to an extreme noise burst or other device error -- Ethernet TCP/IP error and delivery assurance protocols will detect this and automatically retry the disrupted data packets. This process isn't completely automatic for all cases or seamless to the application and so requires some smarts in the test software. Nevertheless, the LXI and LAN standards at least provide for test systems to recover and continue to run even if the instruments are occasionally disconnected from the network.

Another big advantage of LAN and LXI for T&M is that if desired, you can easily connect LXI instruments together for PC control and monitoring via the World Wide Web. Because each LXI instrument is assigned an IP address, you can choose to access it from any computer on the Internet, no matter where in the world that computer is located, assuming access provisions around security layers and IT firewalls are made. The LXI standard also specifies that each instrument have a Web interface by which a user can control the instrument and retrieve measurement data from it.

Some companies like Keithley go far beyond the minimum Web interface required by LXI to provide comprehensive instrument setup, control, and monitoring. In the case of Keithley’s script-capable instruments, high levels of programmability without the use of external software packages is possible.

A Case In Point

Keithley was once called on to create a high speed DAQ front end using USB communications, as specified for a major automaker’s in-vehicle T&M system. Subsequently this system experienced noise-related data errors and system crashes as a result of insufficient USB noise tolerance in its very harsh mobile vehicle test environment. Because of these inherent environmental noise effects on USB communications integrity, the automaker was forced to add expensive fixes to counteract the connection problems. These included double shielded custom USB cables, filtering devices, optically isolated converters, dedicated power and ground wiring, plus software reconnect drivers and test program check/redo measures. Based on that experience, USB was ultimately ruled out in favor of LXI for future versions of the DAQ system, as it was clear the level of noise tolerance needed was not properly considered.

Beyond USB and LXI

In the future, users will have even more choices than USB and LXI for interconnecting instruments in a T&M system. For example, wireless standards – including WiFi, Bluetooth, and Zigbee – may be possible and have provisions for T&M. As always, good system design starts with a clear understanding of critical system requirements so that appropriate communications technologies can be selected that provide needed capabilities – which include connectivity, extendibility, longevity, more than adequate throughput, remote and local access, sufficient noise immunity, and data integrity


About the Author

Chuck Cimino is a Marketing Director for Keithley Instruments, Inc. located in Cleveland, OH. He has been with Keithley for more than 30 years in various engineering, project and product management and business development roles. He has a degree in Electrical Engineering and an MBA from the Weatherhead School at CWRU. He can be reached at ccimino@keithley.com, or by calling 440-248-0400. 
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