Main Content

propinfo

Instrument object property information

Syntax

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

Arguments

obj

An instrument object.

'PropertyName'

A property name or cell array of property names.

out

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

Type

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

Constraint

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

ConstraintValue

Property value constraint. The constraint can be a range of valid values or a list of valid character vector values.

DefaultValue

The property default value.

ReadOnly

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.

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: 0

To 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

See Also

|