Data Acquisition Toolbox    

Returning Property Names and Property Values

Once the device object is created, you can use the set function to return all configurable properties to a variable or to the command line. Additionally, if a property has a finite set of string values, then set also returns these values. You can use the get function to return one or more properties and their current values to a variable or to the command line.

The syntax used to return common and channel/line properties is described below. The examples are based on the analog input object ai created for a sound card and containing two channels.

Common Properties

To return all configurable common property names and their possible values for a device object, you must supply the device object to set. For example, all configurable common properties for ai are shown below. The base properties are listed first, followed by the device-specific properties.

To return all common properties and their current values for a device object, you must supply the device object to get. For example, all common properties for ai are shown below. The base properties are listed first, followed by the device-specific properties.

To display the current value for one property, you supply the property name to get.

To display the current values for multiple properties, you include the property names as elements of a cell array.

You can also use the dot notation to display a single property value.

Channel and Line Properties

To return all configurable channel (line) property names and their possible values for a single channel (line) contained by a device object, you must use the Channel (Line) property. For example, to display the configurable channel properties for the first channel contained by ai,

All channel properties and their current values for the first channel contained by ai are shown below.

As described in the preceding section, you can also return values for a specified number of channel properties with the get function or the dot notation.


  Configuring and Returning Properties Configuring Property Values