Documentation

# instrhwinfo

## Syntax

```out = instrhwinfo out = instrhwinfo('interface') out = instrhwinfo('drivertype') out = instrhwinfo('interface','adaptor') out = instrhwinfo('drivertype','drivername') out = instrhwinfo('ivi','LogicalName') out = instrhwinfo('interface','adaptor','type') out = instrhwinfo(obj) out = instrhwinfo(obj,'FieldName') ```

## Arguments

 `'``interface``'` A supported instrument interface. '`drivertype`' Instrument driver type, may be `matlab`, `ivi`, or `vxipnp`. `'``adaptor``'` A supported GPIB or VISA adaptor. `'drivername'` Name of `ivi`, VXIplug&play, or MATLAB® instrument driver. `'LogicalName'` IVI® logical name value. `'``type``'` Type of VISA interface. `obj` An instrument object or array of instrument objects. `'FieldName'` A field name or cell array of field names associated with `obj`. `out` A structure or array containing hardware information.

## Description

`out = instrhwinfo` returns hardware information to the structure `out`. This information includes the toolbox version, the MATLAB software version, and supported interfaces.

`out = instrhwinfo('interface')` returns information related to the interface specified by `interface`. `interface` can be `Bluetooth`, `gpib`, `i2c`, `serialport`, `spi`, `tcpip`, `udp`, or `visa`. For the GPIB and VISA interfaces, the information includes the installed adaptors. For the serial port interface, the information includes the available ports and the object constructor name. For the TCP/IP and UDP interfaces, the information includes the local host address.

`out = instrhwinfo('drivertype')` returns a structure, `out`, which contains information related to the specified driver type, `drivertype`. `drivertype` can be `matlab`, `vxipnp`, or `ivi`. If `drivertype` is `matlab`, this information includes the MATLAB instrument drivers found on the MATLAB software path. If `drivertype` is `vxipnp`, this information includes the found VXIplug&play drivers. If `drivertype` is `ivi`, this information includes the available logical names and information on the IVI configuration store. You can use an IVI-C driver.

`out = instrhwinfo('interface','adaptor') ` returns information related to the adaptor specified by `adaptor`, and for the interface specified by `interface`. `interface` can be `gpib` or `visa`. The returned information includes the adaptor version and available hardware. The GPIB adaptors are `keysight` (note that `agilent` still also works), `ics`, `mcc`, `adlink`, and `ni`. The VISA adaptors are `keysight` (note that `agilent` still also works), `ni`, `rs`, and `tek`.

`out = instrhwinfo('drivertype','drivername')` returns a structure, `out`, which contains information related to the specified driver, `drivername`, for the specified `drivertype`. `drivertype` can be set to `matlab`, or `vxipnp`. The available `drivername` values are returned by ```out = instrhwinfo('drivertype')``` .

`out = instrhwinfo('ivi','LogicalName')` returns a structure, `out`, which contains information related to the specified logical name, `LogicalName`. The available logical name values are returned by `instrhwinfo('ivi')`.

`out = instrhwinfo('interface','adaptor','type')` returns a structure, `out`, which contains information on the specified type, `type`. `interface` can only be `visa`. `adaptor` can be `ni`, `ics`, `keysight` (note that `agilent` still also works), `mcc`, `adlink`, or `tek`. `type` can be `gpib`, `vxi`, `gpib-vxi`, `serial`, or `rsib`.

`out = instrhwinfo(obj)` returns information on the adaptor and vendor-supplied DLL associated with the VISA or GPIB object `obj`. If `obj` is a serial port, TCPIP, or UDP object, then JAR file information is returned. If `obj` is an array of instrument objects, then `out` is a 1-by-n cell array of structures where `n` is the length of `obj`.

`out = instrhwinfo(obj,'FieldName')` returns hardware information for the field name specified by `FieldName`. `FieldName` can be a single character vector or a cell array of character vectors. `out` is an m-by-n cell array where `m` is the length of `obj` and `n` is the length of `FieldName`. You can return the supported values for `FieldName` using the `instrhwinfo(obj)` syntax.

## Examples

The following commands illustrate some of the ways you can get hardware-related information without creating an instrument object.

```out1 = instrhwinfo; out2 = instrhwinfo('serialport'); out3 = instrhwinfo('gpib','ni'); out4 = instrhwinfo('visa','agilent');```

The following commands illustrate some of the ways you can get hardware-related information for an existing instrument object.

```vs = visa('agilent','ASRL1::INSTR'); out5 = instrhwinfo(vs) out5 = AdaptorDllName: [1x67 char] AdaptorDllVersion: 'Version 1.2 (R13)' AdaptorName: 'AGILENT' VendorDriverDescription: 'Agilent Technologies VISA Driver' VendorDriverVersion: '1.1000' vsdll = instrhwinfo(vs,'AdaptorDllName') vsdll = D:\V6\toolbox\instrument\instrumentadaptors\win32\ mwagilentvisa.dll```

## Tips

You can also display hardware information via the Workspace browser by right-clicking an instrument object, and selecting Display Hardware Info from the context menu.

### Note

To get a list of options you can use on a function, press the key after entering a function on the MATLAB command line. The list expands, and you can scroll to choose a property or value. For information about using this advanced tab completion feature, see Using Tab Completion for Functions.

평가판 신청