Bus-independent Instrument Control and Communication
Wide availability of new PC buses has raised the possibility of use for instrument control
Dany Cheij
As popular computer buses make their way into the instrumentation arena, interfacing to and controlling instruments through these buses becomes a possibility. With the possibility, however, comes the burden of incorporating these varying buses into the same instrumentation system. The key to overcoming this hurdle lies in using a robust and flexible software architecture that allows instrument control and communication without requiring knowledge of the details of the specific instrument interfacing bus.
Traditionally, the most popular buses for instrument control have been the General Purpose Interface Bus (GPIB) and the Serial (RS-232) bus. GPIB was designed specifically for instrument control and is defined in the IEEE 488 standard. It is mainly used for controlling instruments in industrial environments. GPIB provides a robust and proven method for controlling instruments in harsh environments at transfer rates of up to 8 MB/s. On the other hand, RS-232 has been used for automating laboratory and scientific instrumentation such as scales and balances, which typically require much slower transfer rates. While both have been very popular in this domain, the wide availability of new PC buses has raised the possibility of their use for instrument control. The two PC buses most considered are Ethernet and USB.
Although Ethernet is new to instrument control applications, it is a mature technology widely used for measurement systems in many other capacities. Instrument control applications over Ethernet can take advantage of the unique characteristics of the bus, including remote control of instruments, facilitated sharing of instruments among users, and easy publication of the resulting data. Some of the drawbacks of Ethernet for instrument control are transfer rates, determinism, and security. Although theoretical Ethernet transfer rates can reach 1 Gb/s, these rates are rarely realized because of other network traffic, network overhead, and inefficient data transfer. This uncertainty of transfer rates results in non-deterministic transfers across Ethernet. Finally, for sensitive data, users must take additional security measures to ensure data integrity and privacy.
The Universal Serial Bus (USB) was designed primarily to connect PCs to peripheral devices, such as keyboards, scanners, and disk drives. USB is a plug-and-play technology, where the USB host automatically detects and configures new devices. With the latest revision of the USB specification, the maximum bus throughput has been increased up to 60 MB/s. USB delivers an inexpensive and easy-to-use connection between devices and PCs. There are some drawbacks to USB for instrument control. Cables are not industrial graded, which potentially allows data loss in noisy environments. Because there is no latching mechanism for USB cables, they can be pulled out of the PC or instrument relatively easily. Also, the maximum cable length in USB systems is 30 m, including the use of inline repeaters.
Because of the very slow adoption of these buses in instrument control, future systems will most likely consist of instruments with a mixture of connectivity options. Software compatibility and integration are the key to any user’s success in a mixed I/O world. Software that maintains backward compatibility, while seamlessly integrating new buses, can make the difference between spending three hours bringing a new instrument online and spending three months rewriting an entire application. Users can take advantage of these new buses by using bridges. For example, you can connect a GPIB device to a USB port by using a GPIB to USB bridge. The beauty of these bridges is that they are software-transparent and allow you to reuse your existing software.
Software is also key to incorporating instruments with native connectivity through these buses. As a step toward industry-wide software compatibility, several instrument and software vendors developed one specification for I/O software, the Virtual Instrument Software Architecture or VISA. VISA defines one application programming interface (API) for instrument communication regardless of the bus being used. Because of this, you can preserve your software investment when you migrate to new interface buses or mixed I/O systems.
The future of new buses such as Ethernet and USB in instrument control systems remains unclear. In the meantime, users can easily take advantage of new computer bus technology for their applications using bus bridges. Regardless of which bus becomes the standard in the future, users will demand compatibility with their existing software and applications before they adopt any new technology. The best way to maintain the investment in software and hardware throughout the life of an instrumentation system is to use a stable software architecture capable of integrating these differing architectures.
Dany Cheij is Instrument Control Product Manager at National Instruments. He may be contacted at [email protected].