Data Acquisition Toolbox
  Function/Property:
    Search    Help Desk 

Device Objects, Channels, and Lines

Data acquisition device objects are the basic toolbox elements you use to access your hardware device. Channels and lines are the basic hardware device elements with which data acquisition tasks are performed.

Device Objects

Device objects provide a gateway to the functionality of your hardware, and allow you to control the behavior of your acquisition. Each device object is associated with a specific hardware subsystem. The device objects supported by the Data Acquisition Toolbox allow you to access analog input (AI), analog output (AO), and digital I/O (DIO) subsystems. The association between device objects and hardware subsystems is shown below.


You can find out what subsystems are supported by your data acquisition hardware and how they are constructed with the daqhwinfo function. For example, the following command returns the constructor syntax for the susbsystems that are supported by a sound card.

Creating a Device Object

To create a device object, you call specific M-file functions called object creation functions (or constructors). These M-files are based on MATLAB object-oriented programming capabilities, which is described in the Using MATLAB book. For example, to create an analog input object for a sound card, you issue the command

With device objects, you can control data acquisition behavior by configuring property values. For example, an analog input object contains all the necessary information for executing any supported analog input task. This object is then passed to the data acquisition engine which will, based on the contents of the object (the property values), carry out the desired task. For example, to set the sampling rate of your sound card to 8 kHz, issue the command

Properties and value are discussed in more detail on page 2-15 and Chapter 7, "Property Reference."

Before a data acquisition task can be performed, you must associate hardware channels or lines with the device object.



[ Previous | Help Desk | Next ]