• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Advertise
  • Subscribe

Test & Measurement Tips

Oscilloscopes, electronics engineering industry news, how-to EE articles and electronics resources

  • Oscilloscopes
    • Analog Oscilloscope
    • Digital Oscilloscope
    • Handheld Oscilloscope
    • Mixed-signal Oscilloscope
    • PC-based Oscilloscopes – PCO
  • Design
  • Calibration
  • Meters & Testers
  • Test Equipment
  • Learn
    • eBooks/Tech Tips
    • FAQs
    • EE Training Days
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Video
    • EE Videos
    • Teardown Videos
  • Resources
    • Design Guide Library
    • Digital Issues
    • Engineering Diversity & Inclusion
    • Leap Awards
    • White Papers
  • Subscribe
You are here: Home / New Articles / Remote Communication with USBTMC

Remote Communication with USBTMC

June 21, 2019 By Lee Teschler 1 Comment

Simple connections employing USB can replace more expensive GPIB setups in test instrumentation.

Aaron Fernando, B&K Precision Corp.
Engineers from a variety of industries use USB and USBTMC (USB Test & Measurement Class) to remotely control test and measurement instruments from a host computer. It is useful to compare USBTMC to the widely used GPIB interface. The process of setting up an instrument for remote communication using USBTMC is relatively simple.

usbtmc comm setup
The USBTMC communication setup using a PC with supporting VISA software and a standard A-to-B USB cable as it would take place with a B&K 9115 Multi-range DC Power Supply.

Typically, end-users are looking for a simple way to connect test instruments to a computer for automated control and measurement recording. For many years, these connections typically followed the IEEE 488 format. This is a short-range digital communications eight-bit parallel multi-master interface bus specification first created as HP-IB and now commonly called GPIB. In recent years, it has also become attractive to make simple test-instrument connections via USB. Although USB provides the hardware, it is the TMC (Test and Measurement Class) driver that standardizes the process of initializing and programming test instruments remotely.

The USBTMC driver provides simple plug-and-play operation and GPIB-like communication at a relatively low cost. Remote communication is made possible by a standard USB cable where data transfers in a binary and/or ASCII format. The TMC driver on the PC and the instrument TMC firmware provide two-way communication for reading and writing instrument commands.

Unlike USB raw connections, the TMC driver does not require any complicated setup or configuration procedures. The only requirement for plug-and-play operation with a USBTMC-supported device is installation of a VISA (Virtual Instrument Software Architecture) I/O library which contains all the necessary drivers for remote communication. Input and output functions are handled with the VISA write command strings such as “*IDN?” and the VISA read response string from the instrument.

Why USB/USBTMC?

The application determines whether or not a USBTMC scheme makes sense. For simple benchtop or laboratory applications, USBTMC is often the preferred interface for remote communication. In addition to USB and LAN interfaces, GPIB also remains widely used, especially in larger ATE systems.

GPIB and USBTMC
A comparison of GPIB and USBTMC shows why
the latter standard is becoming more widely used.

Although GPIB has been the staple interface for over 40 years, its cost has remained rather high. Compared to GPIB, the ubiquitous use of USB by system and computer manufacturers make it commonly available and easily accessible. Most modern PCs have at a minimum of four to six standard USB interfaces. In contrast, GPIB takes place via controller cards added to a PC and can cost an additional $200 or more. Alternatively, USB-to-GPIB controller adapters range from $500 to $1,000. The GPIB cables alone (depending on length), cost anywhere from $80 to over $300.

All in all, GPIB can be an expensive proposition for simple benchtop applications. Most instrument manufacturers, including B&K Precision, now provide USB connections and support for their equipment, making USBTMC a more attractive option.

Nevertheless, both interfaces have their own advantages and disadvantages. Specifically, consider the approximate cost for a five-meter cable – a mere $6 for USB compared to $170 for GPIB. USBTMC is built upon the USB 2.0 standard which supports a theoretical bandwidth of up to 480 Mbps (60 MB/sec). However, with isolation it is de-rated to 12 MB/sec. This speed is still much higher than GPIB at 1 MB/sec.

USBTMC-compliant instruments are also backward-compatible with GPIB protocols that comply with IEEE 488.1 and IEEE 488.2 standards. These standards are important because they define a set of instrument-specific commands known as Standard Commands for Programmable Instrumentation (SCPI). In a nutshell, USBTMC requires little effort to setup thanks to its true plug-and-play operation, especially useful in cases where instruments are often interchanged.

Rated for a longer cable length, GPIB does still have some advantages over USB. The higher noise immunity and ruggedness of GPIB connectors appeals to many engineers working around large ATE systems and numerous arrays of test racks. And sometimes engineers are more comfortable with GPIB and cannot justify spending the time or money to replace existing GPIB systems.

Many manufacturers, including B&K Precision, label some USB-compliant instruments ‘USBTMC’ directly. Other instruments labeled ‘USB’ or ‘Device’ might still be USBTMC compliant, so it’s best to check the instrument specifications or documentation to verify compatibility.

The initial setup of a USBTMC instrument only requires VISA software installation. NI-VISA is widely used software provided by National Instruments Corp. that implements this architecture. This package also includes the Measurement & Automation Explorer (NI-MAX) which allows for auto-detection and remote communication with test instruments from a PC.

usbtmc
The general communication model for a USBTMC interface. USBTMC client software must be able to support the endpoints shown. A USBTMC subclass specification may make some of the endpoints optional. The control endpoint is required by the USB 2.0 spec. The Bulk-OUT endpoint is required and is used to provide a high-performance, guaranteed delivery data path from the Host to the device. The Host must use the Bulk-OUT endpoint to send USBTMC command messages to the device, and the device must process the USBTMC command messages in the order they are received. The Host must also use the Bulk-OUT endpoint to set up all transfers on the Bulk-IN endpoint. The Bulk-IN endpoint is required and is used to provide a high-performance, guaranteed delivery data path from the device to the Host. The Host must use the Bulk-IN endpoint to receive USBTMC response messages from the device. The Interrupt-IN endpoint is used by the device to send notifications to the Host. A USBTMC subclass specification may require an Interrupt-IN endpoint. If the interface descriptor has bInterfaceProtocol = 0, then no subclass specification applies and the USBTMC interface is not required to have an Interrupt-IN endpoint. The Host USBTMC driver may optionally support additional endpoints if the endpoints are required by a USBTMC subclass specification.

Once NI-VISA is installed on the computer, the connection and powering-up of any USBTMC device would trigger the automatic installation of the correct instrument drivers. Check the device manager on a Windows system to verify a resource called “USB Test and Measurement Device” is available. A common problem faced by Windows users is the automatic download of incorrect drivers as a result of not first downloading and installing VISA software before connecting the instrument to the computer; be sure that the instrument communication setting is set to USBTMC.

Moving forward, test and measurement manufacturers will continue to incorporate USB and USBTMC as a standard interface. GPIB connectivity is now commonly offered as a more expensive option and is reserved for larger test systems. For simple benchtop applications, the combination of plug-and-play connectivity, low cost, and GPIB emulation combine to make USBTMC a more widely used option for test and measurement equipment.

In that regard, B&K Precision moderates a github repository resource where users can find code samples in a variety of languages, LabVIEW drivers, and USBTMC utilities for Linux environments. Users can also find a full step-by-step tutorial video on installing the required software and setting up an instrument for remote communication using USBTMC on the B&K Precision YouTube page.

You may also like:

  • USB plugs
    What’s new in USB Power Delivery 3.0
  • PCIM
    Gallery: Interesting instruments on display at PCIM Europe

  • User review: Tektronix AFG31000 arbitrary function generator

  • Inside Teledyne LeCroy’s oscilloscope workshops

  • Basics of oscilloscope controls

Filed Under: FAQ, Featured, Meters & Testers, New Articles, Test Equipment Tagged With: b&kprecision, FAQ

Reader Interactions

Comments

  1. Tabb Mayo says

    June 5, 2020 at 3:30 pm

    Alas, my experience is somewhat different. I agree that VISA appears to be the interface to use but I could not gain access to it. I downloaded the NI-VISA distribution and it successfully installed or so it said. I even found the “references” in the VBA list. However, when I tried to call any NI-VISA type or method, VBA reported that these were not defined. I interpret this to mean, not included in the C language sense. I tried everything I knew to do, even tampering with the registry through regsvr32 but to no avail.

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Featured Contributions

Why engineers need IC ESD and TLP data

Verify, test, and troubleshoot 5G Wi-Fi FWA gateways

How to build and manage a top-notch test team

How to use remote sensing for DC programmable power supplies

The factors of accurate measurements

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Test & Measurement
We’ve gathered articles that include hands-on product tryouts and reviews. Indeed, every article in this issue uses an oscilloscope in one way or another so you might just call this “The Oscilloscope Tech Toolbox.”

EE TRAINING CENTER

EE Learning Center
“test
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.
bills blog

RSS Current Electro-Tech-Online.com Discussions

  • My Advanced Realistic Humanoid Robots Project
  • Hitachi SuperScan Elite 802 CRT Monitor Issues (Model CM802U)
  • Sanity Check – Peltier "Cooler" for Heating and Cooling
  • Funny Images Thread!
  • I am ready to move from electrical and electronics field but confused where ?

Footer

EE World Online Network

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips

Test & Measurement Tips

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy