10-13-2008 01:53 PM
Is there a way to simulate disconnecting and re-connecting a USB device from within a VI? During ESD testing, one of our devices is "freezing," and the only way get it back up and runnning is to unplug, and replug in the device. This is occuring with a LabVIEW built EXE, resetting the EXE does not work.
Any help or suggestions would be greatly appreciated!
Thanks,
Andrew
10-14-2008 04:40 PM
Hi Andrew,
Thanks for the post - I had noticed you've not had any replies... so the least I can do is look into this a bit for you (and generate some activity!). Which I can look into this more tomorrow when Im back in the office.
I am aware you can reset a DAQmx device, but this wouldn't be the same as a full power down i.e. removing the plug. And Im not sure if this could be done as such. I will look into some more tomorrow.
A better question / aspect maybe to try and understand why the freezing is happening, could you maybe supply the code AND more details of your application?
Kind Regards
10-14-2008 05:12 PM
10-15-2008 04:11 AM
Hi Andrew, Find the attached content.. It is used to remove any hardware from your compuer.... I hope you'll enjoy lot..
Regards :
Malhar
10-15-2008 07:54 AM
Hi,
I would still advise that you try to find what the root cause of this issue is?
Also, me and a few collegues at NI UK weren't aware of any 'offical' method of simulating a full power down/power up (i.e. deeper than a reset). I am insterested in your upload Malhar, but it didn't seem to contain all the required components. Would you be able to repost/unpassword this, to allow us to take a look?
For the record, we have seen the use of devcon before.
Kind Regards,
James.
10-15-2008 09:08 AM
Malhar wrote:Hi Andrew, Find the attached content.. It is used to remove any hardware from your compuer.... I hope you'll enjoy lot..
As I noted in this thread, please don't password-protect VIs that you post on this forum.The intent is for people to look at code so they can learn how to do things.
10-16-2008 12:15 PM
The problem is occuring during an ESD test and appears to be at a "lower" level than LabVIEW. I have error handling to attempt to reconnect to disconnected devices or powered off devices, which works fine, but this one fault requires a full "reboot". I will try devcon and let you know if I have success! Any other suggestions are appreciated.
Thank you,
Andrew
10-16-2008 07:43 PM
Hi Andrew,
Try this when running your ESD test. Rather than unplugging and puggling it in again, try this:
1. Go to device manager
2. Right-click the USB port in question
3. Disable the port
4. Re-enable the port
If that doesn't do the trick, then I don't know if it would be worth wasting your time trying to programmatically reset the port using LabVIEW. Is it possible that something else is triggering the problem? If your application is simple, would you mind posting a quick screenshot and sharing what hardware, software (w/ versions), and drivers (w/ versions) you have and how everything is set up?
Thanks,
Dan Richards
10-17-2008 09:18 AM
I apologize but am unable to post a screenshot of the software, if your recommendation does not work, I will try to create a simplified VI that I can post that exhibits the same issue. This test is to obtain a CE stamp and requires that the hardware recover, without operator action, from an ESD. I will also talk to my test engineer to see if he can provide any more details that may be helpful.
I greatly appreciate all of your help
-Andrew
10-17-2008 03:27 PM
Sounds good! Let us know if that works, then you'll know that perhaps there is a way to programmatically get access to the device again.
Thanks,
Dan Richards