Manual Number: 00650-014-4
Page 5-6
AD12-8 Manual
*DLQ&RGH
$732XWSXW5DQJH6ZLWFK6HWWLQJV
*2))
*21
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
*$,1
$XWR5DQJH
4. A gain code of 8 indicates an auto range channel. When the point address is read, the driver will
first read at a gain of 2 (gain code 1), and from this reading, determine the best gain to use for
the second reading to achieve the best resolution.
Input:
params[0]: First point in point address range.
params[1]: Last point in point address range.
params[2]: Gain code to assign.
Output:
Data:
None.
Error Codes:
status = 0: No error.
status = 1: Invalid task number, task > 17, or driver not initialized.
status = 5: Invalid point address, or index.
status = 6: Invalid gain code.
Example:
int task,params[5],status;
/* these are globally declared variables */
task = 4;
params[0] = 1;
/* first point address in range*/
params[1] = 15;
/* last point address in range */
params[2] = 3;
/* gain code of 3 */
a12drv(FP_OFF(&task),FP_OFF(params),FP_OFF(&status));
/* call the driver */