ACCES I/O Products, Inc.

AD12-8 DLL Driver Documentation

Overview

There are five functions exported by this DLL: AD128_Setup(), AD128_Go(), AD128_Status(), AD128_Stop(), and AD128_GetData(). Each function is also exported in underscored form(i.e, _AD128_Setup()); these are equivalent.




AD128_Setup()

function AD128_Setup(ulBase: LongWord; ubIRQ: Byte; iReservedA: SmallInt; iReservedB: SmallInt; lpChannelTable: Pointer; ulCTSize: LongWord; lpGainTable: Pointer; ulGTSize: LongWord; var lpdfRate: Double; lNumPoints: LongInt): LongInt; cdecl;

long AD128_Setup(DWORD ulBase, byte ubIRQ, int iReservedA, int iReservedB, void *lpChannelTable, DWORD ulCTSize, void *lpGainTable, DWORD ulGTSize, double *lpdfRate, long lNumPoints)

Description

AD128_Setup() should be called first for each point set to acquire.

Parameters

Return Values

If the function succeeds, it returns zero.

If it fails, it returns nonzero. To get extended error information, call GetLastError().

AD128_Setup() also provides data via the lpdfRate parameter.




AD128_Go()

function AD128_Go: LongInt; cdecl;

long AD128_Go()

Description

AD128_Go() initiates the acquisition of a point set.

Parameters

This function receives no parameters.

Return Values

If the function succeeds, it returns zero.

If it fails, it returns nonzero. To get extended error information, call GetLastError().




AD128_Status()

function AD128_Status: LongInt; cdecl;

long AD128_Status()

Description

AD128_Status() can be called to get the number of points yet to be acquired in the point set.

Parameters

This function receives no parameters.

Return Values

If the function succeeds, it returns the number of points remaining. This value will be zero or greater.

If it fails, it returns a negative value. To get extended error information, call GetLastError().




AD128_Stop()

function AD128_Stop: LongInt; cdecl;

long AD128_Stop()

Description

AD128_Stop() ceases point list acquisition.

Parameters

This function receives no parameters.

Return Values

If the function succeeds, it returns zero.

If it fails, it returns nonzero. To get extended error information, call GetLastError().




AD128_GetData()

function AD128_GetData(lpBuf: Pointer; ulBufSize: DWORD): LongInt; cdecl;

long AD128_GetData(void *lpBuf, DWORD ulBufSize)

Description

AD128_GetData() retrieves the point list acquired.

Parameters

Return Values

If the function succeeds, it returns the number of bytes actually placed in memory.

If it fails, it returns a negative value. To get extended error information, call GetLastError().