From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB VISA recovery when reconnection of USB or Reset of DUT

Hi,

I am using the USB serial port for communication. Whenever the reset button pressed the USB connection will lost so that VISA will generate error. After few seconds the the USB COM will detect in PC. I tried to programatically recover the connection by VISA close, open and configure again when error happens. This process will keep on progress until upto get a VISA communication with no error case. But its behaving randomly like when i tried reset 5 times, 3 times successfully recovered and getting the boot messages from device. But i have to solve this random nature. SOme times if reset pressed and recovey not success, once agian pressing the reset will recover the connection. But i need a good solution to avoid this random nature. Please suggest me a good method.

Thanks & regards,

sree

0 Kudos
Message 1 of 3
(3,254 Views)

Unfortunately I think this might just be a side-effect of the unreliability of connecting/disconnecting USB devices on Windows - sometimes devices aren't recognised when repeatedly connected/disconnected.

 

One tool that might help you is Devcon.exe - it's a Windows command line utility that can probe the information in Device Manager. You could use it to detect whether or not Windows has found/recognised the device before trying to open communications with it and even restart devices. You can just about do anything with it that you can do in Device Manager. There's some information about it here: https://support.microsoft.com/en-us/kb/311272

 

You can call it from LabVIEW using the System Exec VI.

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 3
(3,244 Views)

First upon thanks,

Every time windows detecting the device after the reset. Also the VISA find resource function showing the presence after reset.

Thanks & regards,

sree

 

0 Kudos
Message 3 of 3
(3,229 Views)