From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Search VISA resources to find Custom Aliases

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)
  • Other

    Software

  • LabVIEW

    Driver

  • NI DAQmx
  • NI VISA

Code and Documents

Attachment

Overview
This VI demonstrates the four different search methods included in the VISA Find Resource VI.

 
Description
Here is a brief description of the example:

This Example code shows the four different search methods included in the VISA Find Resource VI. Using those four different search methods you can find all the VISA resources in your system. However, the VISA Find Resource VI can return Alias names of VISA resources but not search by Alias. This code includes the ability to then search the returned Aliases/Resources.

 

Requirements

  1. LabVIEW 2012 (or compatible)
  2. NI-VISA
  3. NI-PXI Devices

Steps to Implement or Execute Code

  1. The "Search VISA" string control is the search string for the first 3 methods employed by the VISA Find Resource VI (Canonical Names Only, Aliases Only, and Include All Aliases), and "?*" is the required search input for the fourth method (Include Matching Aliases).
  2. The "Search Which Method" control lets you choose which of the four search methods you would like to search for Aliases in.
  3. The "Search String" string control is the string that you are searching for within the chosen VISA Find Resource search method

 

Additional Information or References

VI Snippet

Search VISA Parse 2012 NIVerified.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.