Main Content

visadevlist

List available VISA resources

Since R2021a

    Description

    example

    resourceList = visadevlist 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 visadev to connect to a device.

    resourceList = visadevlist("Timeout",time) returns all VISA resources found within the specified period, in seconds. The default timeout period is 10 seconds. The value of time must be 2 or greater.

    Examples

    collapse all

    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.

    Output Arguments

    collapse all

    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, use visadevfind instead.

    Version History

    Introduced in R2021a