Main Content


Instrument object property information


out = propinfo(obj)
out = propinfo(obj,'PropertyName')



An instrument object.


A property name or cell array of property names.


A structure containing property information.


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



The property data type. Possible values are any, ASCII value, callback, instrument range value, double, character vector, and struct.


The type of constraint on the property value. Possible values are ASCII value, bounded, callback, instrument range value, enum, and none.


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 always, never, whileOpen, and whileRecording.

Interface Specific

If the property is interface-specific, a 1 is returned. If a 0 is returned, the property is supported for all interfaces.

out = propinfo(obj,'PropertyName') returns the structure 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.


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,

ans = 
               Type: 'double'
         Constraint: 'none'
    ConstraintValue: ''
       DefaultValue: 512
           ReadOnly: 'whileOpen'
  InterfaceSpecific: 0

To display the default value for the EOSMode property,

ans =


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

See Also