VISA Find Resource Function
- Updated2025-01-28
- 5 minute(s) read
VISA Find Resource Function
Queries the system to locate the devices associated with a specified interface.

Inputs/Outputs
![]() expression matches the value specified with the devices available for a particular interface. The description string specified sets the criteria to search an interface—GPIB, GPIB-VXI, VXI, All VXI, Serial, or All—for existing devices. The following table includes valid special characters and operators.
The search criteria specified in the expression parameter has two parts, a regular expression over a resource string and an optional logical expression over attribute values. The regular expression is matched against the resource strings of resources known to the VISA Resource Manager. If the resource string matches the regular expression, the attribute values of the resource are matched against the expression over attribute values. If the match is successful, the resource has met the search criteria and is added to the list of resources found. The following table includes valid regular expressions.
By using the optional attribute expression, you can construct flexible and powerful expressions with the use of logical ANDs (&&), ORs(||), and NOTs (!). You can use equal (==) and unequal (!=) comparators to compare attributes of any data type, and other inequality comparators (>, <, >=, <=) to compare attributes of numeric data type. Use only global attributes in the attribute expression. Local attributes are not allowed in the logical expression part of the expr parameter. The following table includes valid expression parameters.
![]() search mode determines how the function returns found interfaces in the find list output, either by canonical names or aliases. The default is 0. This input accepts the following values.
![]() error in describes error conditions that occur before this node runs. This input provides standard error in functionality. ![]() find list is an array of strings, each string specifying one interface found by the function. ![]() return count specifies the number of matches found. The number of matches found is the number of strings in the find list array. ![]() error out contains error information. This output provides standard error out functionality. |
LabVIEW lists resources in an I/O control according to the chosen I/O control class type and the Filter VISA Names dialog box, so you might not need to call this function.
All resource strings returned by this function are recognized by VISA Open. However, this function does not necessarily return all strings that you pass to the VISA Open function. This is especially true for network and TCP/IP resources. If a resource does not appear in the list, you can explicitly add the resource in the NI-VISA configuration utility, such as (Windows) Measurement & Automation Explorer, (Linux) visaconf, or (Mac OS X) NI-VISA Configuration. The configuration utility also has options that expand or limit the set of resources that this VI returns.