Manual Number: 00650-014-4
Page 5-14
AD12-8 Manual
4: Replicate a point address function assignment to a range of point addresses.
params[1]:
source address to replicate
params[2]:
first point address in destination range
params[3]:
last point address in destination range.
Output:
Data:
SUBTASK 1:
params[3]:
temperature in tenths of
O
F.
params[4]:
temperature in tenths of
O
C.
Error Codes:
status = 0: No error.
status = 1: Invalid task number, task > 20, or driver not initialized.
status = 5: Point error, point address out of range.
status = 13: Invalid subtask, not between 1 and 4.
status = 16: Invalid curve.
Example:
int task,params[5],status;
/* these are globally declared variables */
task = 10;
/* linearize the passed value */
params[0] = 1;
/* manual linearization subtask */
params[1] = ‘t’; /* for t type thermocouple */
params[2] = 1801;/* counts * 16 at gain of 200 */
a12drv(FP_OFF(&task),FP_OFF(params),FP_OFF(&status));
/* call the driver */
/* values returned in params[3] and params[4] */
/* assign curve to a point address */
params[0] = 2;
/* curve assignment subtask */
params[1] = 0;
/* first point address on first AT16-P */
params[2] = ‘T’; /* T for reference junction */
params[3] = ‘F’; /* F for degrees F */
a12drv(FP_OFF(&task),FP_OFF(params),FP_OFF(&status));/*call the driver*/
/* assign a range of ±5 volts in millivolt increments to a point address.*/
params[0] = 3;
/* range assignment subtask */
params[1] = 22;
/* point address to assign */
params[2] = -5000;
/* lower range */