beautypg.com

Controlling the device, Driver loading, Device initialization – Dataman 520 Series User Manual

Page 6: Data acquisition loop

background image


Development kit for DATAMAN 520 series

Programmer’s Guide

2. Controlling the device

This chapter contains information about the device initialization, setting device
parameters and measurement using development kit.

2.1. Driver loading

First of all, it is necessary to load the device driver using

LoadDriver

function.

int LoadDriver( void );

Appropriate error code is returned, if device driver loading fails.

2.2. Device initialization

After successful device driver loading, it is time to perform device initialization.


Function

InitHardware

initializes device.


int InitHardware(void *DeviceContextBuffer);

As a parameter, pointer to the

DeviceContextBuffer

structure is required. After

successful initialization, this structure will be filled with device dependent parameters
(such as memory size, available timebases etc.)


If the InitHardware returns

ERROR_OK

, device is ready for communication.

Now it is possible to set the device parameters with

proper functions

.

2.3. Data acquisition loop

Application should enter data acquisition loop after device initialization. Data
acquisition is controlled by function

Data

. (fig. 2.3.1. for block diagram).

- 6 -