LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scanning for GPIB instruments

I need example LabVIEW code showing how to scan a GPIB bus for instruments, similar to that of MAX. I would like my application to provide a list of devices so that the user can select a device.

Thanks in advance!
0 Kudos
Message 1 of 7
(4,260 Views)
There are two ways to do this. One is to use the VISA Find Resource function on the Instrument I/O>VISA>VISA Advanced palette. Specify a search pattern and it will return an array of strings with the VISA Resource names. You can limit the scan to just GPIB by using the right expression (see the help for expression syntax). The other way is to simply drop a VISA Resource Name control on the front panel. Clicking on the right side arrow will list all available resources. You can't do any filtering with this so you will also get a list of serial and parallel ports.
Message 2 of 7
(4,260 Views)
Excellent response. Thank you very much for you help!
0 Kudos
Message 3 of 7
(4,261 Views)
Hi B_Meyers
You addressed this question two years ago. It seems to me that you developed the application I want to do. The question is if you would mind to share this application or program. I would like to build an application where the user is scanning the ports and choses the devices he wants to use.
 
Thanks for any hint
Yariv
0 Kudos
Message 4 of 7
(4,112 Views)

It's really pretty simple. In the picture, I populate the items in combo box.

Message Edited by Dennis Knutson on 10-16-2006 07:30 AM

Message 5 of 7
(4,104 Views)

Hi,

 

This is an old topic, but of current interest for me. I've used all the methos presented in this post. I found even another solution by using system configuration VI's as you can see in the attached picture.

 

However, none of this methods reproduce exaclty what Scan For Instruments from NI Max does. Sometimes, if i don't run the scan from instruments from NI max firstly, no matter what method of instrument identification in labview i use, some instruments won't be identified.

 

I've been thinking for a fourth solution, but i don't have the knolewdge yet to do it. It requires calling some DLLs or some .NETs i think. I've been playing with NI I\O Trace, and recorded the functions called  when pressing the Scan For Instruments button form NI Max. However, i don't know where i can access those functions. I think there are in a DLL or .NET somewhere in the National Instruments -> Labview folder, but i don't know exactly where and how to call them. ( i know i have to use call dll vi or .net vi, but what would be the input parameters to call the functions, and where are those function stored so that i can access them).

 

Does anyone has any idea on how to approach this matter ? I would really appreciate if someone can offer me a perspective on how to do it !

 

Regards,

Daniel

 

0 Kudos
Message 6 of 7
(2,424 Views)

I would take the output of the "Find VISA Resources" vi (use the example Dennis showed above)

 

Then send the IEEE common command, identify querry (*IDN?) to every active GPIB address

 

Now you will have a list of what instrument is on what GPIB address just like Ni-Max

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 7
(2,398 Views)