ACCES I/O Products, Inc.

AD12/16 DLL Driver Documentation

Overview

There are five functions exported by this DLL: AD1216_Setup(), AD1216_Go(), AD1216_Status(), AD1216_Stop(), and AD1216_GetData(). Each function is also exported in underscored form(i.e, _AD1216_Setup()); these are equivalent.




AD1216_Setup()

function AD1216_Setup(ulBase: LongWord; ubIRQ: Byte; iReservedA: SmallInt; iReservedB: SmallInt; ubStartStop: Byte; loBipolar: WordBool; dfGain: Double; var lpdfRate: Double; lNumPoints: LongInt): LongInt; cdecl;

long AD1216_Setup(DWORD ulBase, byte ubIRQ, int iReservedA, int iReservedB, byte ubStartStop, WORD loBipolar, double dfGain, double *lpdfRate, long lNumPoints)

Comments

AD1216_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().

AD1216_Setup() also provides data via the lpdfRate parameter.




AD1216_Go()

function AD1216_Go: LongInt; cdecl;

long AD1216_Go()

Comments

AD1216_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().




AD1216_Status()

function AD1216_Status: LongInt; cdecl;

long AD1216_Status()

Comments

AD1216_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().




AD1216_Stop()

function AD1216_Stop: LongInt; cdecl;

long AD1216_Stop()

Comments

AD1216_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().




AD1216_GetData()

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

long AD1216_GetData(void *lpBuf, DWORD ulBufSize)

Comments

AD1216_GetData() retrieves the point list acquired as an array of single values.

Parameters

Return Values

If the function succeeds, it returns the number of bytes actually placed in memory. This value will be zero or greater.

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