Interface and Property Help
instrhelp Function
Note
instrhelp
will be removed in a future release. For
serialport
, tcpclient
,
tcpserver
, udpport
,
visadev
, and bluetooth
objects, use
help
instead.
You can use the instrhelp
function to:
Display command-line help for functions and properties.
List all the functions and properties associated with a specific instrument object.
An instrument object is not only for you to obtain this information, but also to display all functions and properties associated with the object, as well as the constructor help. For example, to see this information for a GPIB object, type:
instrhelp gpib
To display help for the EOIMode
property, type:
instrhelp EOIMode
You can also display help for an existing instrument object. For example, to
display help for the MemorySpace
property associated with a
VISA-GPIB-VXI object, type:
v = visa('keysight','GPIB-VXI0::80::INSTR'); out = instrhelp(v,'MemorySpace');
Alternatively, you can display help via the Workspace browser by right-clicking an instrument object and selecting Instrument Help from the context menu.
propinfo Function
You can use the propinfo
function to return the
characteristics of the Instrument Control Toolbox™ properties. For example, you can find the default value for any
property using this function. propinfo
returns a structure
containing the following fields:
Field Name | Description |
---|---|
| The property data type. Possible values are
|
| The type of constraint on the property value. Possible
values are |
| The property value constraint. The constraint can be a range of values or a list of character vector values. |
| The property default value. |
| The condition under which a property is read only. Possible
values are |
| If the property is interface-specific, a
|
For example, to display the property characteristics for the
EOIMode
property associated with the GPIB object
g
,
g = gpib('ni',0,2); EOIinfo = propinfo(g,'EOIMode')
EOIinfo = Type: 'string' Constraint: 'enum' ConstraintValue: {2x1 cell} DefaultValue: 'on' ReadOnly: 'never' InterfaceSpecific: 1
This information tells you the following:
The property value data type is a character vector.
The property value is constrained as an enumerated list of values.
There are two possible property values.
The default value is
on
.The property can be configured at any time (it is never read-only).
The property is not supported for all interfaces.
To display the property value constraints,
EOIinfo.ConstraintValue
ans = 'on' 'off'
instrsupport Function
Execute this function to get diagnostic information for all installed hardware
adaptors on your system. The information is stored in a text file,
instrsupport.txt
in your current folder and you can use this
information to troubleshoot issues.
Overview Help
The overview help lists the toolbox functions grouped by usage. You can display this information by typing
help instrument
For the code for any function, type
type function_name
Documentation Examples
This guide provides detailed examples that show you how to communicate with all supported interface types. These examples are contained in all the appropriate sections throughout the documentation. For example, in the sections about Bluetooth® communication, you will find examples of communicating with Bluetooth instruments.
The examples use specific peripheral instruments, GPIB controllers, string commands, address information, and so on. If your instrument accepts different string commands, or if your hardware is configured to use different address information, you should modify the examples accordingly.
There are also some examples that show special applications of the Toolbox or show complete workflows of certain features or interfaces. These appear in the Examples list at the top of the Instrument Control Toolbox Documentation Center main page. You do not need an instrument connected to your computer to use these tutorials as they use prerecorded data.
Online Support
For online support of Instrument Control Toolbox software, visit the MathWorks® website. This site includes documentation, examples, solutions, downloads, system requirements, and contact information.