visadevlist
Description
returns a table
containing information about available VISA resources using an installed VISA driver. If you
have multiple drivers installed, MATLAB® uses the preferred VISA set in your VISA vendor's configuration utility
software. The following interface types are supported: TCP/IP (using VXI11 and HiSLIP),
TCP/IP Socket, USB, GPIB, Serial, VXI, and PXI. Use resourceList
= visadevlistvisadev
to
connect to a device.
uses name-value arguments to limit the time or scope of returned information.resourceList
= visadevlist(Name=Value
)
Examples
Use visadevlist
to list all available VISA resources on your
machine.
resourceList = visadevlist
resourceList = 6×6 table ResourceName Alias Vendor Model SerialNumber Type __________________________________________ _________________ ______________________ ___________ ____________ ______ 1 "USB0::0x0699::0x036A::CU010105::0::INSTR" "NI_SCOPE_4CH" "TEKTRONIX" "TDS 2024B" "CU010105" usb 2 "TCPIP0::169.254.2.20::inst0::INSTR" "Keysight_33210A" "Agilent Technologies" "33210A" "MY57003523" tcpip 3 "ASRL1::INSTR" "COM1" "" "" "" serial 4 "ASRL3::INSTR" "COM3" "" "" "" serial 5 "GPIB0::5::INSTR" "FGEN_2CH" "Agilent Technologies" "33522B" "MY52800145" gpib 6 "GPIB0::11::INSTR" "OSCOPE_2CH" "TEKTRONIX" "TDS 1002" "0" gpib
ResourceName
and Alias
identify each resource,
and you can use either one as an input when you create a visadev
object. The Vendor
, Model
, and
SerialNumber
columns provide additional information about the
instrument or device. The Type
column contains the type of VISA
interface.
Use an array of custom identification commands to find available resources.
customIdentification = [["USB0::0x0699::0x036A::CU010105::0::INSTR", "*IDN?"]; ... ["TCPIP0::169.254.2.20::inst0::INSTR", "*ID?"]; ... ["USB0::0x0699::0x03C4::C024548::0::INSTR", ""]]; deviceInfo = visadevlist(Identification=customIdentification)
deviceInfo = 4×6 table ResourceName Alias Vendor Model SerialNumber Type __________________________________________ _________________ ______________________ ___________ ____________ ______ 1 "USB0::0x0699::0x03C4::C024548::0::INSTR" "" "" "" "" usb 2 "USB0::0x0699::0x036A::CU010105::0::INSTR" "NI_SCOPE_4CH" "TEKTRONIX" "TDS 2024B" "CU010105" usb 3 "TCPIP0::169.254.2.20::inst0::INSTR" "Keysight_33210A" "Agilent Technologies" "33210A" "MY57003523" tcpip 4 "GPIB0::5::INSTR" "FGEN_2CH" "Agilent Technologies" "33522B" "MY52800145" gpib
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: Timeout=30
Allowed time to return all VISA resources, specified in seconds. The default timeout period is 10 seconds. The specified value of must be 2 or greater.
Example: Timeout=30
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Specifies amount of ID information returned. The argument
Identification
takes one of the following values:
Logical
true
— (default) All information is returned from the default identification command.Logical
false
— This prevents returning vendor, model, and serial number information, and leaves theType
field asunset
.N-by-2 array of strings, with each row defining the resource name and its custom identification command. Those devices not specified in the array return the default identification information. To prevent reading the vendor, model, and serial number values, use an empty string for the identification command. See List Resources with Custom Identification Commands.
Example: Identification=false
Data Types: logical
Output Arguments
List of VISA resources, returned as a table. The table has the following columns.
VISA resource name, returned as a string scalar. The resource name identifies
information about the resource, such as interface type, address, board, or port
number. Use this name as an input for visadev
to create a connection to your VISA resource.
VISA alias associated with a resource, specified as a character vector or
string scalar. If an alias has been assigned to a VISA resource using the vendor's
configuration utility software, it appears here. You can use this name as an input
for visadev
to create a connection to your VISA resource.
Instrument manufacturer, returned as a character vector or string scalar. This value is empty if the VISA interface type does not provide information about the manufacturer.
Instrument model, returned as a character vector or string scalar. This value is empty if the VISA interface type does not provide information about the model.
Unique serial number associated with an instrument, returned as a character vector or string scalar. This value is empty if the VISA interface type does not provide information about the serial number.
Type of VISA resource, returned as one of the supported VISA interfaces. Some properties and object functions are specific to an interface type.
Tips
visadev
returns all VISA resources on the system, whether connections to them exist or not. To get a list of existing VISA device connections, usevisadevfind
instead.
Version History
Introduced in R2021aThis function now accepts the name-value argument Identification
, to
suppress ID information and support custom identification commands..
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)