Products & Services Solutions Academia Support User Community Company

Learn more about Data Acquisition Toolbox   

Toolbox Components

Information and Interaction

The Data Acquisition Toolbox software consists of three distinct components:

As shown in the figure, these components allow you to pass information between the MATLAB workspace and your data acquisition hardware.

The preceding diagram illustrates how information flows from component to component. Information consists of:

M-File Functions

To perform any task with your data acquisition application, you must call M-file functions from the MATLAB environment. Among other things, these functions allow you to:

For a listing of all Data Acquisition Toolbox functions, refer to Functions — Alphabetical List. You can also display all these functions by typing

help daq

Data Acquisition Engine

The data acquisition engine (or just engine) is a MEX-file (shared library that is executable within the MATLAB software) that

While the engine performs these tasks, you can use MATLAB for other tasks such as analyzing acquired data. In other words, the engine and the MATLAB software are asynchronous. The relationship between acquiring data, outputting data, and data flow is described next.

Flow of Acquired Data

Acquiring data means that data is flowing from your hardware device into the data acquisition engine where it is temporarily stored in memory, until you explicitly extract it using the getdata function.

If you do not extract this data, and the amount of data stored in memory reaches the limit for the data acquisition object (see daqmem(obj)), a DataMissed event occurs. At this point, the acquisition stops.

The rate at which the acquisition stops depends on several factors including the available memory, the rate at which data is acquired, and the number of hardware channels from which data is acquired.

The flow of acquired data consists of these two independent steps:

  1. Data acquired from the hardware is stored in the engine.

  2. Data is extracted from the engine and stored in the MATLAB workspace, or output to a disk file.

These two steps are illustrated below.

Flow of Output Data

Outputting data means that data is flowing from the data acquisition engine to the hardware device. However, before data is output, you must queue it in the engine with the putdata function. The amount of data that you can queue depends on several factors including the available memory, the number of hardware channels to which data is output, and the size of each data sample.

The flow of output data consists of these two independent steps:

  1. Data from the MATLAB workspace is queued in the engine.

  2. Data queued in the engine is output to the hardware.

These two steps are illustrated below.

Hardware Driver Adaptor

The hardware driver adaptor (or adaptor) is the interface between the data acquisition engine and the hardware driver. The adaptor's main purpose is to pass information between MATLAB and your hardware device via its driver.

Hardware drivers are provided by your device vendor. For example, to acquire data using a National Instruments board, the appropriate version of the NI-DAQ driver must be installed on your platform. For further information about NI-DAQmx and Traditional NI-DAQ drivers, see NI-DAQmx Versus Traditional NI-DAQ Drivers. Hardware drivers are not installed as part of the toolbox with the exception of a special parallel port driver that allows access to the port's protected memory addresses. Additionally, a suitable driver is usually installed on PCs that are equipped with a sound card. For the remaining supported devices, the drivers must be installed.

Supported Hardware

You can obtain most adaptors either from the MathWorks or from the device vendors. See the supported hardware page at www.mathworks.com/products/daq/supportedio.html for a list of vendors whose hardware the toolbox supports, and for information about how to obtain an adaptor. The toolbox provides the following adaptors. The name of the vendor or device is also listed in the table.

Adaptor Provided by the Data Acquisition Device

Vendor or Device

Adaptor Name

Advantech

advantech

Measurement Computing

mcc

National Instruments NI-DAQmx adaptors

nidaq

National Instruments Traditional NI-DAQ adaptors

nidaq

Parallel port

parallel

Windows sound cards

winsound

As described in Examining Your Hardware Resources, you can list the installed adaptor names with the daqhwinfo function.

Unsupported Hardware

Refer to the supported hardware page for Data Acquisition Toolbox software at www.mathworks.com/products/daq/supportedio.html for the list of vendors whose hardware the toolbox supports, and for information about how to obtain an adaptor. If the device you are using is not listed on this page, you can do one of the following:

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS