| Instrument Control Toolbox | ![]() |
Return information about available hardware
Syntax
out = instrhwinfo
out = instrhwinfo('interface')
out = instrhwinfo('interface','adaptor')
out = instrhwinfo(obj)
out = instrhwinfo(obj,'FieldName')
Arguments
Description
out = instrhwinfo
returns hardware information to the structure out. This information includes the toolbox version, MATLAB version and supported interfaces.
out = instrhwinfo(' returns information related to the interface specified by interface')
interface. interface can be serial, gpib, or visa. For the GPIB and VISA interfaces, the returned information includes installed adaptors. For the serial port interface, the returned information includes the available ports and the object constructor name.
out = instrhwinfo(' returns information related to the adaptor specified by interface','adaptor')
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 agilent, ni, cbi, cec, iotech, and keithley. The VISA adaptors are agilent and ni.
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 object, then JAR file information is returned
out = instrhwinfo(obj,' returns hardware information for the field name specified by FieldName')
FieldName. FieldName can be a single string or a cell array of strings. out is a 1-by-N cell array where N is the length of FieldName. You can return the supported values for FieldName using the instrhwinfo(obj) syntax.
Example
The following commands illustrate some of the ways you can get hardware-related information without creating an instrument object.
out1 = instrhwinfo;
out2 = instrhwinfo('serial');
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.0 (R12)'
AdaptorName: 'AGILENT'
VendorDriverDescription: 'Agilent Technologies VISA Driver'
VendorDriverVersion: '1.1000'
vsdll = instrhwinfo(vs,'AdaptorDllName')
vsdll = D:\V6\toolbox\instrument\instrumentadaptors\win32\
mwagilentvisa.dll
| instrhelp | instrreset | ![]() |