Using USBTMC to Communicate With Your USB Instrument

Updated Oct 16, 2018

Reported In

Hardware

  • USB Cable

Driver

  • NI-VISA

Issue Details

  • I have a USB instrument that communicates using USBTMC. I would like to start using it with LabVIEW. What is USBTMC and how can interface with my instrument using LabVIEW?
  • My USBTMC device works correctly in Windows but is not showing in Linux,

Solution

Windows

On Windows, NI-VISA 3.0 or later allows you to communicate as a controller to USBTMC compliant devices, and it is configured to detect USBTMC compliant devices. To use such a device, connect it to your computer. If NI-VISA is properly installed, the device will be installed as a USB Test & Measurement Class Device. When you open Measurement & Automation Explorer (MAX), the new device will now appear under Devices and Interfaces » USB Devices. You can then use this resource name as you would use any other GPIB resource. 
 

Macintosh

On Macintosh you will need NI-VISA 3.2 or later. Open the VisaConfig application and the device will be listed under USB resources. 
 

Linux

On Linux you will need NI-VISA 3.2 or later. Open the VisaConfig application and the device will be listed under USB resources. 
 
In Linux Red Hat, some usbtmc devices can have conflict with the kernel's usbtmc module. To temporarily unload the usbtmc module, run ‘rmmod usbtmc’ as root with the instrument connected and powered on. A more permanent workaround is to blacklist the module so that it doesn’t load any longer. On Redhat, it seems the way to do that is documented here: External Site: Blacklisting a Module

Additional Information

USBTMC stands for USB Test & Measurement Class. USBTMC is a protocol built on top of USB that allows GPIB-like communication with USB devices. From the user's point of view, the USB device behaves just like a GPIB device. For example, you can use VISA Write to send the *IDN? query and use VISA Read to get the response. The USBTMC protocol supports service requests, triggers and other GPIB specific operations. 

USBTMC allows instrument manufacturers to upgrade the physical layer from GPIB to USB while maintaining software compatibility with existing software, such as instrument drivers and any application that uses VISA.  

It is important to note that not all USB devices are USBTMC compliant. The device manufacturer has to add the support in the device firmware to support USBTMC. Traditional instruments, such as DMMs and scopes, with USB ports are most likely to support USBTMC. Refer to the instrument's documentation to determine if it is USBTMC compliant. 

For more information on the syntax of the resource name, refer to the description for viOpen in the NI-VISA Product Manual in the Related Links section below.

WAS THIS ARTICLE HELPFUL?

Not Helpful