12-16-2014 08:58 PM
I have a USB device I am controlling in Labview 2014 64 bit. I'm controlling it as a USB RAW device and I've noticed something peculiar I haven't seen on other USB RAW devices I've controlled.
Normally, when I execute the "VISA Find Resources" primitive, the USB device of interest is in the array of VISA Resource strings returned. However, if a VISA Reference to the device is opened and VISA Find Resources is executed again, it no longer appears in the list. It's as if it has disappeared. This also occurs if a reference to the device is opened implicitly by using the VISA Resource string directly with a VISA write. The device will reappear in the list of devices until the VISA reference is explicitly closed.
Using my USB analyzer, I noticed that when the VISA reference is open, it hasn't really disappeared. Rather, all subsequent low-level Windows IRPs fail with STATUS_ACCESS_DENIED until I explicitly close the VISA reference.
As I've mentioned before, I've controlled other devices and never had this issue., The only difference is that I used interrupt transfers to communicate with the previous devices and this device I use control transfer to get/set data.
This is a major problem for me as I use the VISA Find Resources primitive in a device auto-detection scheme. If I can't trust the list of VISA devices that is returned to be accurate, then I'm in trouble.
Can anyone help explain?
Thanks!
12-17-2014 06:33 PM
Hello,
I suspect that this disappearance is due to the method in which the VISA Find Resource locates channels. Since the behavior you are experiencing exists only on the control pipeline USB RAW devices while the resources are reserved, it most likely has to do with how these devices are queried.
Does the device remain visible in MAX?
How are you creating the USB RAW driver?
Can you please look at this community example? It might provide you with a work around for your device discovery. https://decibel.ni.com/content/docs/DOC-6743
How is your program architected? Are you planning on opening the reference to this device in parallel to your discovery program?
Can you please try to create a log using I/O Trace? This monitors all commands that go through the VISA driver.
I also think that this link, could be a good reference for developing in the future.
Regards,