Data Acquisition Toolbox    

Creating an Analog Input Object

You create an analog input object with the analoginput function. analoginput accepts the adaptor name and the hardware device ID as input arguments. For a list of supported adaptors, refer to The Hardware Driver Adaptor. The device ID refers to the number associated with your board when it is installed. Some vendors refer to the device ID as the device number or the board number. The device ID is optional for sound cards with an ID of 0. Use the daqhwinfo function to determine the available adaptors and device IDs.

Each analog input object is associated with one board and one analog input subsystem. For example, to create an analog input object associated with a National Instruments board with device ID 1:

The analog input object ai now exists in the MATLAB workspace. You can display the class of ai with the whos command.

Once the analog input object is created, the properties listed below are automatically assigned values. These general purpose properties provide descriptive information about the object based on its class type and adaptor.

Table 4-1: Descriptive Analog Input Properties 
Property Name
Description
Name
Specify a descriptive name for the device object.
Type
Indicate the device object type.

You can display the values of these properties for ai with the get function.


  Getting Started with Analog Input Adding Channels to an Analog Input Object