With plug-and-play connectivity and the near ubiquity of USB ports on modern PCs and laptops, USB has become a popular choice for controlling stand-alone instrumentation. As more instrument manufacturers begin to include USB ports on their devices, it is important to understand several issues surrounding USB to ensure the longevity of your test system.
Many of today’s test applications require the transfer of large amounts of data from instrument to PC. When choosing instrumentation, you need to know which transfer rates your PC supports. The USB standard provides four data transfer rates:
Low-Speed – Data transfer at 1.5 Mb/s. Devices such as mice and keyboards typically use this lowest transfer speed. This was part of the original USB 1.0 standard.
Full-Speed – Data transfer at 12 Mb/s. Until the introduction of Hi-Speed USB in 2000, this was the fastest transfer speed for USB. This was also part of the original USB 1.0 standard.
High-Speed – Data transfer at 480 Mb/s. Introduced in the Hi-Speed USB standard (USB 2.0), the high-speed transfer rate made USB a viable option for sending large amounts of data such as audio and video.
Super-Speed - Data transfer at 1 Gb/s. This was introduced with the USB 3.0 standard.
Every successive USB standard has maintained backwards compatibility with older standards. While the USB 2.0 specification introduced the high-speed transfer rate, it also maintained backward compatibility with the lower-speed rates, as did the USB 3.0 with it's predecessors. As such, devices are often called USB 3.0-compatible while only supporting the low, full, and high-speed transfer rates. When purchasing new instrumentation, look for the phrase “Super-Speed USB” to ensure that the instrument can support the fastest transfer rates.
A USB Type B Device Port Is Required for Instrument Control
There are two different types of USB ports that can appear on an instrument – Type A host ports and Type B device ports. Type A host ports, recognized by their flat, elongated appearance, are more common, but you cannot use them for instrument control. You only can use these connectors to control other USB devices – typically to save data to USB memory sticks or add mouse and keyboard support to an instrument. To allow an instrument to be controlled from a PC, you need Type B device ports, recognized by a more square shape. When examining instrument data sheets, look for references to USB device ports or USB instrument control to make sure you can remotely control your instrument.
Figure 1.The USB Type B device port offers PC instrument control.
The USB Test and Measurement Class Simplifies Application Development
Because USB instruments do not adhere to a set communication protocol, programming them can be a major challenge. To help remedy this, the USB Implementers Forum (USB-IF) defined a specific device class called the USB Test and Measurement Class (USBTMC). Designed to emulate the IEEE 488.1 standard, you can program instruments that support USBTMC like their GPIB counterparts. This device class greatly simplifies instrument control because you can use industry-standard application programming interfaces (APIs) such as NI-VISA to send and read instrument commands without having to implement the lower-level communication protocols.
For devices that do not support USBTMC, you need to use either a vendor-provided driver or program the device in USB RAW mode. NI-VISA provides support for communicating in USB RAW mode, but you need to contact the instrument vendor for the specifics of its communication protocol.
You Can Reduce (or Eliminate) Setup Time with Plug-and-Play Connectivity
One of the greatest advantages of USB compared to other buses is its support of plug-and-play connectivity. Using tools such as the NI Measurement & Automation Explorer (MAX), USBTMC instruments are automatically detected and configured for the system. Unlike Ethernet/LAN, there is no need to enter IP addresses or hassle with company firewalls to connect to your instrumentation.
You Can Get USB Connectivity From Your Current Instrumentation
With GPIB converters, you can gain many advantages of USB instrument control such as plug-and-play connectivity, ease of use, and easy access to USB ports while still using your current GPIB instrumentation. You can accomplish this through devices such as the NI GPIB-USB-HS+, a Hi-Speed USB device that can turn any USB port into a fully functional GPIB controller. Because you can use your current instrumentation, you can conserve your investment in hardware and software and save money in development costs without programming new instrumentation.
Industry-Standard Software Interfaces Help Ensure the Longevity of Your Test System
While USB is a popular communication bus today, the history of the computer industry has shown that today’s hot technology could be obsolete tomorrow. Because of this history, it is important to make decisions to ensure the longevity of your test system even if communication buses change. You can do this by using the Virtual Instrument Software Architecture (VISA) and National Instruments LabVIEW plug-and-play instrument drivers. With these technologies built on top of the communication bus, you can program your systems with a standard API regardless of the bus you are using – whether it is GPIB, USB, serial, or Ethernet/LAN. As long as the instrument’s programming interface does not change, switching between communication buses requires little or no code modification and helps ensure the longevity of your test system.