propinfo
Instrument object property information
Syntax
out = propinfo(obj)
out = propinfo(obj,'PropertyName')
Arguments
| An instrument object. |
| A property name or cell array of property names. |
| A structure containing property information. |
Description
out = propinfo(obj) returns the structure
out with field names given by the property names for
obj. Each property name in out contains
the fields shown below.
Field Name | Description |
|---|---|
| The property data type. Possible values are
|
| The type of constraint on the property value. Possible
values are |
| Property value constraint. The constraint can be a range of valid values or a list of valid 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
|
out = propinfo(obj,'
returns the structure PropertyName')out for the property specified by
PropertyName. The field names of
out are given in the table shown above. If
PropertyName is a cell array of property names, a
cell array of structures is returned for each property.
Examples
To return all property information for the GPIB object
g,
g = gpib('ni',0,1);
out = propinfo(g);To display all the property information for the
InputBufferSize property,
out.InputBufferSize
ans =
Type: 'double'
Constraint: 'none'
ConstraintValue: ''
DefaultValue: 512
ReadOnly: 'whileOpen'
InterfaceSpecific: 0To display the default value for the EOSMode property,
out.EOSMode.DefaultValue ans = none
Tips
You can display all instrument object property names and their current values
using the get function. You can display
all configurable properties and their possible values using the set function.
When specifying property names, you can do so without regard to case, and you can
make use of property name completion. For example, if g is a GPIB
object, then the following commands are all valid.
out = propinfo(g,'EOSMode'); out = propinfo(g,'eosmode'); out = propinfo(g,'EOSM');
Version History
Introduced before R2006a