Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

How to restart a USB connection without unplugging USB?

Posted in LabVIEW and Instrument Control forums.


I working with a device in which I sometimes have to reset the USB connection in order for a command to work. This entails unplugging and plugging the USB back into my computer. Is there a way to do this via LabVIEW without physically unplugging and plugging it back in? Or is there a way to use a power supply and a spliced USB cable to take away power and resupply it back to the USB?


0 Kudos
Message 1 of 6

I have seen people splice 5V line of USB cable through a USB-controlled relay and control the relay to disconnect/connect the USB device.

Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 6

Hi, I'm new to the forum. I have changed the Tektronix IP address to I can't detect the oscilloscope to the NI MAX (version 20.0.0f0). Hope you can help.

The connection is here below. 

Windows 7 Tektronix oscilloscope>LAN cable>USB 3.0 Ethernet adapter (RJ45 to USB adapter)> Windows 10 PC



0 Kudos
Message 4 of 6

You might be able to use the Windows Management Instrumentation (WMI) infrastructure or PnPUtil to do what you want.


pnputil /restart-device "USB\VID_045E&PID_00DB\6&870CE29&0&1"


You can interface with the WMI using .NET calls in LabVIEW.


Here is an example of how to get the device information via the WMI.


The WMI provides methods you can use to control the device as well.  You can download a tool called WMI Explorer to view details of the interface (see Microsoft's website to download the WMI Explorer).


As shown above there are Enable/Disable and Reset methods available.


Be sure to read Microsoft's documentation for details





Here is information on the PnPUtil which might work better




Note: NI-VISA seems to only work well and be robust for USB Test & Measurement class devices and products manufactured by National Instruments.



0 Kudos
Message 5 of 6

Note: Microsoft suggests using PnPUtil.  See my post above.




0 Kudos
Message 6 of 6