Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we RESET a USB connection (windows XP) from LabVIEW?

Tried that, still locks my machines up.

Jonathan M. Slavic
Senior Staff Engineer
Mine Safety Appliances Co. (MSA)
0 Kudos
Message 11 of 17
(1,765 Views)

What's really odd, is that sometimes I can get it to work, other times not.

Jonathan M. Slavic
Senior Staff Engineer
Mine Safety Appliances Co. (MSA)
0 Kudos
Message 12 of 17
(1,763 Views)

I'm am going to be out of the office for a week or so, but here are some ideas:

 

Try adding a sequential wait to the code to see if it just needs to be slowed down for some reason. For that matter, try just running in single step mode and see if it work in slow motion.

 

Try running NI Trace and see if you can monitor the USB output...not sure if that will work with the DLL though.

 

Find another USB sniffer app. I have a link to one at work, but can't remember what it is now.

 

From the Device Manager, try uninstalling your USB drivers/devices, then re-installing them.

 

Contact NI support and see if they can help.

0 Kudos
Message 13 of 17
(1,754 Views)

Tried all those, even in contact with FTDI, nobody seems to know what's happening.

Jonathan M. Slavic
Senior Staff Engineer
Mine Safety Appliances Co. (MSA)
0 Kudos
Message 14 of 17
(1,751 Views)

It's been a while since I started this thread, but I would still love to see an answer for it.

Basically, every once in a while, with almost ANY USB device, I find myself having to pop the plug in and out of the port to reset it.  We're talking drive enclosures, cDAQ devices, FTDI, my cell phones, etc.

 

I have searched and searched and though many drivers have a RESET command, I have not found the equivalent of telling the USB hub to reset the connection.  Sure, there are lots of ways to look at your own specific application and try to prevent this from happening, but sooner or later I end up popping up a dialog that says "pull it then plug it, please".  On a couple testing systems we even went so far as to put relays on the USB lines.

 

 

0 Kudos
Message 15 of 17
(1,748 Views)

Jed,

According to this discussion on StackOverflow, you may be able to use the DevCon command-line utility to remove and rescan.

 

Beyond that, there seem to be many replies stating that this is simply not possible due to how USB devices behave at the electronic level. Particularly of note is the following comment: "The usb host (the pc) can send a message to the device to tell it to shut down, but once it's done that it's up to the device to start back up again. The host can't force it to."

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 16 of 17
(1,744 Views)

Jared,

 

Can you get devcon to work on Win7?  I can't get it to return the list of USB devices by using listclass usb.  It worked in XP.  If you can get it working, please post an example because this would save lots of headaches.

Jonathan M. Slavic
Senior Staff Engineer
Mine Safety Appliances Co. (MSA)
0 Kudos
Message 17 of 17
(1,735 Views)