Six Things to Know about USB Instrument Control

By Contributed Article | March 30, 2016

To ensure the longevity of your test system, National Instruments explains the six things you need to know about USB instrument control.

Subscribe-g80

 

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 standalone instrumentation. As more instrument manufacturers begin to include USB ports on their devices, it is important to understand several issues regarding USB to ensure the longevity of your test system.

USB 3.0 Does Not Necessarily Mean Super-Speed

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.5Mb/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 12Mb/s: Until the introduction of High-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 480Mb/s: Introduced in the High-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 1Gb/s: This was introduced with the USB 3.0 standard.

Every successive USB standard has maintained backward 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 its 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.

USB connections type B

Figure 1. The USB Type-B device port offers PC instrument control.

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) 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.

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.

USB plug-and-play connectivity also has led to the development of interactive tools that can instantly load when you connect a USB instrument. Immediately after you connect a compatible instrument to the PC via USB, the PC detects the connected instrument and shows an autoplay dialog. With a single mouse click, the interactive tool connects to the instrument, begins displaying live data acquisition, and provides remote instrument control.

Windows device recognition

Figure 2. Windows OS automatically detects specific USBTMC Tektronix instrumentation, which NI SignalExpress Tektronix Edition can then control.

USB Connectivity is Available 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 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 Ensure Longevity of Test Systems

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 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.

Visit National Instruments online.

Get the Latest News
x