There are a couple of options for you to retrieve the list of GPIB Devices. The one that I would suggest is to use the VISA API instead of the 488.2 API to achieve this. In the VISA API, there is a method called "Find" in the CNiVisaResourceList Class. It returns a list of names of resources in the VISA system. It also takes in inputs where you can use a regular expression to specify exactly which interface you want to search.
Thanks for the reply. I think I found the method you recommended but I couldn't find information on the expression that is used in the FindResources function. I did find an example but it returns instruments as well as the board/device which I don't need. I would just like the board/device returned. Is there an expression that does this? May seem trivial but if I have twenty instruments hooked to one board/device I don't want twenty items returned, I just want one.
A sample of my code is below:
Dim vs As NationalInstruments.VisaNS.ResourceManager Dim resources() As String vs = NationalInstruments.VisaNS.ResourceManager.GetLocalManager resources = vs.FindResources("GPIB?*INSTR")
I know this thread is quite old but do you have an example of what could be used in VB or VBA for how to find all instruments on a GPIB? And what references would have to be added for it to work?