View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

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

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

5.0
5.0 | 2 ratings Rate this file 9 Downloads (last 30 days) File Size: 7.45 KB File ID: #25593 Version: 1.0.0.1

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

by

 

16 Oct 2009 (Updated )

Simplifies connecting to a USB or GPIB instrument using the model name, vendor name or VISA resource

| Watch this File

File Information
Description

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.
  
--------------
EXAMPLES
(See the published MATLAB file for sample outputs)
% see a list of all the available instruments
 findInstrument;
           
% find an instrument by model number
 obj = findInstrument('34405');
 fopen(obj)
 query(obj,'*IDN?')
 fclose(obj)
 
% 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')

Required Products Instrument Control Toolbox
MATLAB release MATLAB 7.3 (R2006b)
Other requirements Requires a VISA adaptor (freely available from Agilent, Tektronix or NI)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
26 Nov 2015 KiungChung Wong

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 ?

08 Jul 2010 Joerg

Joerg (view profile)

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

Updates
01 Sep 2016 1.0.0.1

Updated license

Contact us