Chapter 5: AD12-8 Driver Reference
Manual Number: 00650-014-4
Page 5-5
Example:
int task,params[5],status;
/* these are globally declared variables */
task = 2;
params[0] = 14;
/* fetch gain code for point address 14*/
a12drv(FP_OFF(&task),FP_OFF(params),FP_OFF(&status));
/* call the driver */
Task 3: Fetch Point Address for a Point List Index
Returns a previously assigned point address for a given point list index.
Notes:
None.
Input:
params[0]: Point list index.
Output:
Data:
params[1]: Point address for the given point list index.
Error Codes:
status = 0: No error.
status = 1: Invalid task number, task > 17, or driver not initialized.
status = 5: Invalid point address, or index.
Example:
int task,params[5],status;
/* these are globally declared variables */
task = 3;
params[0] = 6;
/* fetch point address for the 6th point in the point
list*/
a12drv(FP_OFF(&task),FP_OFF(params),FP_OFF(&status));
/* call the driver */
Task 4: Assign Gain Code to Range of Point Addresses
Assigns a given gain code to a given range of point addresses.
Notes:
1. The first point address of the range must be less than or equal to the last point address. To assign
a gain code to a single point address, make the first and last point address equal.
2. These gain code settings are only meaningful if the AT16-P is being used.
3. The following are the possible gain codes.