Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA USB driver

We have had some success with the VISA USB driver in communicating with our instruments. We use the driver in the raw mode, and our platforms are 2000 and XP, VISA 3.3.1 and LabVIEW 7.1.

In the production context of the LabVIEW program, UUTs are switched in and out all day long. Always, after a certain point, the USB never works again (never enumerates) until the computer is rebooted. I am beginning to suspect that this is due to the "surprise disconnect" USB condition, when the test is finished with the UUT. I wonder if there is a more proper way to operate this service and test program.

Order of operation:

1. Plug in UUT to USB port
2. wait 10 seconds for device to enumerate
3. check registry to verify that NIVIUSBK.SYS service has started.
4. Unplug UUT from USB port

So, with this chain of events we do not even open a VISA connection to the driver. After a certain point, devices that previously worked no longer enumerate. Do I need to 'remove' the device when done, as if it were a "pen drive", and if so, how do I do that programmatically? Do I need to point my pointy finger somewhere else, as in a USB hub disabling a port for some (surprise) reason?

Hoping NI Week was scintillating...
Message 1 of 4
(6,283 Views)
Modem,

I have a quite similar setup here and had heavy problems with USB devices too. One reason was a badly designed USB chip integration in the UUTs, but there seems to be some quircks in the system or LV USB handling as well.

We had found a way to react on problems using the devcon utility (http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q311272). This one is a kind of Command line alternative to the device manager and can do a lot of things with external PnP devices like rescan, disable etc.

I have created some LabVIEW7.1 shells around system exec and devcon that allows me to handle all my USB-related problems.  Attached you'll find an example of one of those VIs. Please be aware that it expects devcon.exe to be found in a special directory. You have to download devcon.exe and change the VI to call devcon on its new location.

HTH  and
Greetings from Germany!<br>-- <br>Uwe
Message 2 of 4
(6,278 Views)
This problem might be related to a small memory leak that was detected in the USB portion of NI-VISA 3.3.1. We will make sure the memory leak will be fixed in the next version of NI-VISA when it releases. Hopefully, that will fix the problem.

-Josh
0 Kudos
Message 3 of 4
(6,259 Views)
Thanks for the pointer to devcon. It seems like a very useful tool. I think I must have a problem with my computer; when it gets into the error condition, where nothing will enumerate, even devcon will not return from the command "devcon rescan". At least it responds to CTRL-C
0 Kudos
Message 4 of 4
(6,230 Views)