LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

USB RAW wildcard designation

This resource string used to work under XP:
status = viFindRsrc (SessionUSB, "USB0::0x104D::0xCEC7::NI-VISA-*?::RAW",VI_NULL, VI_NULL, USBDesc);

Using windows 7 and LabWindow/CVI 2009 Version 9.1.1 the wildcard *? designation no longer works and I must specifically include and recompile a unique serial number. Is there a wild card designator for Win7 and LabWindow/CVI 2009 ?

Thanks

0 Kudos
Message 1 of 4
(4,232 Views)

I was able to get the wildcard to work on my Windows 7 x64 / CVI 2013 system. 

 

Please try running the example C function located here:

ftp://210.123.36.53/VXIpnp/WinNT/NIvisa/Examples/C/General/FindRsrc.c

and tell me what the output from your console is. 

 

The example calls viFindRsrc with the parameter "?*INSTR", which for me returns the resource ASRL1::INSTR, which is the lone serial port in my computer. 

 

Does manually entering your USB resources serial number cause the program to function as expected?

Nathan Murphy
0 Kudos
Message 2 of 4
(4,213 Views)

Nathan,

 

Thanks for your reply. I have a USB power meter that can be randomly plugged into any of a half dozen usb ports on my system. Manually entering the USB serial number causes the program to work. However, under Win 7, when I plug my instrument into the different USB ports on my system, I get a different serial number reported at each port. Other wise I would be more than happy to hard code in a unique serial number. Under XP, the serial number is always 0 regardless of which USB port it is plugged into. My company internet is blocking the link you posted. Is there another way for me to get your example code.

 

Thanks,

Alan

0 Kudos
Message 3 of 4
(4,207 Views)

Here's the example I'd like you to try:

 

Nathan Murphy
0 Kudos
Message 4 of 4
(4,200 Views)