Why is My USB Data Acquisition Device Not Responding?

Updated Jan 18, 2018

Issue Details

Sometimes my USB data acquisition device stops responding. Why is this happening? What is the best way to re-establish communication, and how can I prevent this behavior in the future? 

There are two similar but distinct problems you may encounter:

The first issue (identified as Issue 1) occurs when you are using a device on a USB 1.1 host controller or hub and you unplug a separate device or insert a new device. In some cases all devices on the controller or hub are reset by the USB controller. This reset may stop active acquisitions and invalidate existing sessions to the device, but the device will be immediately usable from a new session.

Any driver calls to the current session(s) may result in the following symptom: Error -1074130544 occurred: The session handle is not valid.

The second problem (Issue 2) occurs when you are using a device plugged into a USB 2.0 host controller, and you unplug or insert a second device. In some cases your device stops responding and must be reset from the host, either interactively using MAX or programmatically using the driver.

The following error is a symptom of Issue 2: Error -50405 occurred: No transfer is in progress because the transfer was aborted by the client. The operation could not be completed as specified.

Solution

Re-establishing Communication 
To re-establish communication with a USB DAQ device, perform one of the following procedures. Not all procedures listed here work in every situation; therefore, if one option doesn't work, then try another one.

As a first step, try plugging in your device into a different USB port on your computer.  This can cause your computer to do another auto-detect on your hardware and re-establish communication.

You can also try to programmatically reset the USB DAQ device. Click on the community example link in the related links section for details. This method will also try to re-establish communication.

Issue 1 Restoration Options
  • Close the open driver session (niScope_close or DAQmxClearTask) and open a new one to the device (niScope_init or DAQmxCreateTask).
  • Reset the device from the open driver session (niScope_ResetDevice or DAQmxResetDevice)
  • Open Measurement& Automation Explorer (MAX) and expand Devices and Interfaces to locate your device. Right-click the device in the list and select Reset Device.
Issue 2 Restoration Options
  • Reset the device from the driver (niScope_ResetDevice or DAQmxResetDevice).
  • Open Measurement& Automation Explorer (MAX) and expand Devices and Interfaces to locate your device. Right-click the device in the list and select Reset Device.
  • Disconnect and reconnect your device from the system.
  • Reboot the system.
To verify that your NI USB device is now working, open Measurement& Automation Explorer (MAX) and expand Devices and Interfaces. Then right-click your NI USB device and click Self Test. 

Avoiding Communication Loss 
Under normal circumstances your USB device should not stop responding during acquisition. However this issue can occur on some PCs when plugging or unplugging additional USB devices while the computer is powered on. 

If your application requires plugging/unplugging of additional USB devices and you are experiencing communication loss with your USB data acquisition device, a powered hub connected to USB 2.0 may help. Alternatively, consider trying a different PC.

If you are using a laptop computer, check your power settings to make sure that the USB ports are not being turned off to conserve power.

WAS THIS ARTICLE HELPFUL?

Not Helpful