Manual Number: 00650-014-4
Page 5-20
AD12-8 Manual
5. The buffers must be declared globally or the driver will not be able to find their segment.
6. Using this task, a 25MHz 386 computer will achieve throughput approaching 34,000 samples
per second.
Input:
params[0]: Offset of the data buffer address.
params[1]: Offset of the point/gain buffer address.
params[2]: Number of conversion to make.
Output:
Data:
params[3]: Number of conversions completed.
The buffers will contain the conversions and the point/gain data respectively.
Error Codes:
status = 0: No error.
status = 1: Invalid task number, task > 17, or driver not initialized.
status = 3: Card does not respond.
status = 5: Point list error, list empty.
Example:
int task,params[5],status;
/* these are globally declared variables */
int datbuf[100],chnbuf[100];
/* these are globally declared variables */
task = 16;
params[0] = FP_OFF(datbuf);
/* pass offset of data buffer */
params[1] = FP_OFF(chnbuf);
/* pass offset of point/gain buffer */
params[2] = 100; /* number of conversions */
a12drv(FP_OFF(&task),FP_OFF(params),FP_OFF(&status));
/* call the driver */