Application development, Overview, Operating modes – Measurement Computing ADLIB WIN User Manual

Page 17

Advertising
background image

Chapter 4 Application Development

4-1

4. APPLICATION DEVELOPMENT

4.1 OVERVIEW

The ADLIB WIN driver is an extensive set of both function and structure based library routines that provide
an easy to use, hardware independent, software interface to ADAC products. Developers are shielded from
the time consuming task of designing and interfacing to DAQ hardware in any environment. This allows the
programmer to spend less time in the development, design and coding of an application program.

4.2 OPERATING MODES

All ADLIB DAQ board acquisitions specify operation mode of the hardware and software. The modes
include the Software Cycles, Data Transfer and Notification Methods defined below.

Cycle Modes:

See function AL_SetCycleMode(…)

AL_SINGLE_CYCLE

In Single Cycle mode, after a device is started, it transfers a specified
number of samples between the device and one or more buffers in the
processor’s memory and then stops. After each buffer is filled, the
calling application program is “notified” that a transfer has completed.

AL_CONTINUOUS_CYCLE

In Continuous Cycle mode, after you start a device, it continues
transferring buffers in circular fashion. If you have more than one buffer
defined, it fills up the first, moves to the next, the next, etc., until it fills
the last one. Then the device “wraps around” and starts filling the first
buffer again. After each buffer is filled, the calling application program
is notified that a transfer has completed.

Data Transfer Methods:

See function AL_SetDataTransferMethod(…)

AL_DTM_SOFTWARE

The Software Transfer Methods assumes a hardware-clocking source is
selected.

When a FIFO is available, the driver collects all samples available in the
FIFO each time the AL_GetDoneBufferPtr() function is called, returning
a pointer to the buffer only when it has filled with the specified number
of samples. It’s the applications responsibility to call the
AL_GetDoneBufferPtr() function in a timely manner, otherwise the
FIFO will overflow, generating an error condition. In this case a pointer
to the incomplete buffer will be returned with the appropriate error flags
set in the buffer structure itself.

AL_DTM_DMA

The DMA Transfer Method is asynchronous, meaning the transfers
happen automatically in the background without software intervention
while the application program is doing something else. The application
program calls AL_GetDoneBufferPtr() function to determine if an input
buffer is ready for processing, or if an output buffer is ready to accept
new data.

Advertising