Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect when new USB connection to PC is made/available and connection time (duration)

I have a device that I am trying to connect to and communicate with that must be periodicaly powered off and back on.  The problem is that sometimes the device will connect to the PC after as little as 10s and anywhere up to 60s and then I have to wait another 5s before the device will communicate properly.  I do not want to put a 65s delay loop in my code for automated testing since it will obviously add lots of test time.    I would really like to detect when a new connection is made, then monitor when that connection time reaches 5s, and then I can try talking to it.

 

Are there any functions that will allow me to query when a new USB connection has been established?  Or how long a particular USB connection has been made?  I have looked and do not see any (I'm using LabView 8.5).  Is the functionality in newer versions?

 

If not, has anyone written a VI to do this?

 

Thanks,

Dave

0 Kudos
Message 1 of 2
(3,184 Views)

Did you try a search in the LabVIEW board? This question has actually been asked before. For example, try this thread:

 

http://forums.ni.com/t5/LabVIEW/USB-Enumeration/m-p/1109086

Message 2 of 2
(3,151 Views)