Chapter 5: AD12-8 Driver Reference
Manual Number: 00650-014-4
Page 5-11
6. If the timers are used to generate the start-conversion signals, then they should be configured
using TASK 14, before calling TASK 9.
7. TASK 11, SUBTASK 0 is used to disable interrupts before completion of the scan. When the
scan completes normally, the interrupts are disabled automatically.
8. See Sample 2 for a basic example of how to set up and use interrupts.
Input:
params[0]:
Subtask to perform, 1, 2, or 3.
1: Initiate interrupt data acquisition.
params[1]:
Interrupt level (IRQ)
params[2]:
Number of conversion to make.
params[3]:
Offset of the packed data buffer address.
params[4]:
Segment of the packed data buffer address.
params[5]:
A/D Trigger mode.
2: Check for end of interrupt scan.
3: Return unpacked data
params[1]:
Offset of data buffer.
params[2]:
Offset of point/gain buffer
params[3]:
Number of conversions made
Output:
Data:
SUBTASK 1:
The buffers will contain the conversions and the point/gain data respectively.
SUBTASK 2:
params[1] = 0 if scan complete, task number if still in progress.
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 error, point list is empty.
status = 7: Invalid number of conversions, not between 1 and 32767.
status = 10: Interrupt task already active.
status = 11: Interrupt not between 2 and 7.
status = 12: Interrupt already unassigned. ( SUBTASK 3)
status = 13: Invalid subtask, not 1, 2 or 3.
status = 14: Invalid trigger mode, not 1 or 2.