David Ferster wrote: > Is there any way to reset a USB device from LabVIEW (maybe via a > dll)? Best of all would be a way to simulate the device being > unplugged and plugged in again. I notice, for example, that you can > right click on a device listed in the device manager and disable and > enable it. Something like that...
That only unloads and reloads the device driver, as far as I know. There are ways to do that via (PITA) DLL calls but if the device itself has screwed up, power cycling it is the best option. If you do want to try unloading and reloading the device driver, get a copy of the Windows SDK, free or cheap from Microsoft. It's not something I'd be allowed to give example code for, unfortunately. If this is for internal use, it may be quicker to make a lashup USB cable in which the power line is controlled by a relay, in turn controlled by (in order of increasing difficulty) a DIO line on a DAQ card, a control line on a serial port or a line on a parallel port. -- Dr. Craig Graham, Software Engineer Advanced Analysis and Integration Limited, UK. http://www.aail.co.uk/
