File Exchange

image thumbnail

findInstrument - Find and connect to instruments using the model or manufacturer name

version (7.45 KB) by Gautam Vallabha
Simplifies connecting to a USB or GPIB instrument using the model name, vendor name or VISA resource


Updated 01 Sep 2016

View License

obj = findInstrument('STR') returns an interface object to an instrument whose model name, vendor name or VISA resource matches any part of the string STR.

findInstrument requires the Instrument Control Toolbox™ and a VISA adaptor, and currently only works with USB and GPIB instruments.

(See the published MATLAB file for sample outputs)
% see a list of all the available instruments

% find an instrument by model number
obj = findInstrument('34405');

% find an instrument by model number, using Agilent VISA
obj = findInstrument('34405', 'agilent');

% find an instrument by model number and
% create a device object
obj = findInstrument('33120');
fgen = icdevice('agilent_33120a.mdd', obj);

% find an instrument by matching a manufacturer name
obj = findInstrument('tek');

% find an instrument by the model code in the VISA resource
obj = findInstrument('0x0618')

Comments and Ratings (4)

Great tool, but does not work for me.

Pawel Kocwa

Helpful example for me to use the Instrument Control Toolbox.
By the way, is "%#ok<CTCH>" just purely a comment in the try catch block or it actually means something ?
Also, when there is an error thrown, should the function returns instead of continuing ?


If you add a dot to the regexpi line "(?<resource>[A-Z0-9:.]+)" it is also recognising TCPIP VISA resources. (constructor=visa('ni', 'TCPIP0::');


Updated license

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux