04-01-2011 10:38 AM
I am looking for a method by which I can discover any (and all) available GPIB boards in a system. I want to avoid having the user enter the board number into the final application. I can already search for existing GPIB devices once I have board number. Any thoughts? This application is written in C# using VS 2008 using the NI4882 dll wrapper. The target system will have the Windows XP OS.
04-04-2011 04:12 PM
Hi Mark,
So I'm not possitive about how to do this with the 4882 wrapper, but it's pretty easy using VISA. If you have NI-VISA installed, you can go to:
Start -> all programs -> national instruments -> visa -> examples -> .NET -> findresources -> cs -> findresources.sln
to see the details of how to find any resources connected. VISA will be able to detect you GPIB devices. Hope that helps!
04-04-2011 04:29 PM
I am not certain I have VISA installed. I do have the VISA folder in my National Instruments folder which could be a pretty good indication. I am using the GPIB-USB-HS interface. When I run the findResources solution it is unable to find any resources even using the ?* query. I can see my equipment throught the USB interface using Measurement & Automation Explorer so I know it's connected. Am I missing something here?
04-05-2011 02:50 PM
Hey Mark,
It seems like you have VISA installed if that folder is there. One thing you can try is using NI Spy Capture to show all the calls used into the VISA driver. It you are in Measurement and Automation Explorer (MAX), go t o tools -> NI VISA -> VISA interactive control, you should be able to send out a ?* querey which will pop up the devices that you see in MAX. If you run Spy Capture for this and Spy Capture again when you are trying out your calls with C#, you can then compare and see what differences you get and know what calls you are missing.
04-05-2011 03:19 PM
NI VISA does not show up under the tools menu for MAX.
04-05-2011 04:40 PM
I downloaded and installed NI VISA 4.3. I now see instruments in VISA interactive control. I will give GPIB discovery a try with VISA.
04-05-2011 06:48 PM
The findResources example for VISA had the information I needed. Thanks for the help.