Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 rating:
 1 out of 5     Rate this Document

Programmatically Retrieving VISA Resource Names in LabVIEW

Primary Software: Driver Software>>NI-VISA
Primary Software Version: 4.0
Primary Software Fixed Version: N/A
Secondary Software: Driver Software>>NI-VXI/VISA

Problem:
How can I retrieve the VISA resource name from Measurement and Automation Explorer programmatically in LabVIEW?

Solution:
LabVIEW coincides with the Measurement & Automation Explorer in retrieving the VISA resource names of GPIB and VXI devices. There is a control on the front panel that can be used that is a drop down box list containing all the VISA resource names. In order to add this to your front panel:

  1. Right-click on the front panel to bring up the Controls Palette

  2. Choose the I/O sub-palette

  3. Choose the VISA Resource Name control and place on the front panel



The VISA Resource Name control will be a drop down list containing all of the VISA resources including VXI, GPIB, and others. Now if you want to only display in the list certain resource names follow the steps below:

  1. Right-click on the Visa Resource Name control and choose I\O Name Filtering... This should bring up a new window titled Filter VISA Names.

  2. Now check the box next to Limit interface types (Instr class only). Now the menu at the bottom of the window should no longer be dim.

  3. Place check marks next to the specific types of instruments that you want listed in the VISA Resource Name control such as GPIB, Serial, USB, VXI, etc..



Now that the control is filtered you can then pick which device you want to communicate with instead of typing it in.

NOTE : You can also find the resource name using the "VISA find resource.vi" which queries the system to locate the devices associated with a specified interface.  You can use the VISA property node, under General Settings:Resource Name and Interface Information: Interface Name. Please see the attached example which performs the above task.

Related Links:
Product Reference: VISA Resource Name Control Help

Attachments:
VISA interface name programatically.vi

VXI_Name2.JPG - VXI_Name2.JPG


Report Date: 10/17/2006
Last Updated: 08/25/2008
Document ID: 42GHNJAC

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit