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?
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.
Hi, I'm new to the forum. I have changed the Tektronix IP address to 192.168.1.2. 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
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.