Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Discovering Available GPIB Boards

 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.

- Mark Hillig
0 Kudos
Message 1 of 7
(3,910 Views)

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!

Sarah Yost
Senior Product Marketing Manager
0 Kudos
Message 2 of 7
(3,899 Views)

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?

- Mark Hillig
0 Kudos
Message 3 of 7
(3,896 Views)

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.

Sarah Yost
Senior Product Marketing Manager
Message 4 of 7
(3,884 Views)

NI VISA does not show up under the tools menu for MAX.

- Mark Hillig
0 Kudos
Message 5 of 7
(3,882 Views)

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.

- Mark Hillig
0 Kudos
Message 6 of 7
(3,880 Views)

The findResources example for VISA had the information I needed.  Thanks for the help.

- Mark Hillig
0 Kudos
Message 7 of 7
(3,877 Views)