Chapter 5: AD12-8 Driver Reference
Manual Number: 00650-014-4
Page 5-3
Input:
params[0]: Type of initialization
0 = Automatic initialization using the configuration file, no other
parameters are required.
1 = Manual initialization using information provided in the passed
parameters.
params[1]:
Base Address
params[2]:
Interrupt (IRQ) level
params[3]:
Voltage range, 5 or 10 volt
params[4]:
Input polarity
0 = Unipolar
1 = Bipolar
Output:
Data:
NONE
Error Codes:
status = 0: No error.
status = 1; Invalid task number, task > 17 or driver not initialized.
status = 2: Invalid base address, params[0] > 0x3f8 or < 0x200
status = 3: Card does not respond.
status = 15: Voltage range not 5 or 10.
status = 20: Error opening configuration file.
status = 21: Error reading configuration file.
status = 22: Invalid configuration file data.
Example:
int
task,params[5],status;
/* these are globally declared variables */
task = 0;
params[0] = 1;
/* manual initialization */
params[1] = 0x300;
/* base address = 300 hex */
params[2] = 3;
/* use IRQ3 */
params[3] = 5;
/* voltage range is 5 volts */
params[4] = 1;
/* bipolar range */
a12drv(FP_OFF(&task),FP_OFF(params),FP_OFF(&status));
/* call the driver */