Chapter 5: AD12-8 Driver Reference
Manual Number: 00650-014-4
Page 5-17
Output:
Data:
params[1]: Digital input value.
Error Codes:
status = 0: No error.
status = 1: Invalid task number, task > 17, or driver not initialized.
Example:
int task,params[5],status;
/* these are globally declared variables */
task = 13;
a12drv(FP_OFF(&task),FP_OFF(params),FP_OFF(&status));
/* call the driver */
Task 14: Counter/Timer Setup
Load the given counter/timer with a count value and mode.
Notes:
1. For a complete discussion of the counter/timers, see
CHAPTER 8: PROGRAMMABLE
INTERVAL TIMER
.
Input:
params[0]: counter number 0, 1 or 2.
params[1]: counter mode, between 0 and 5.
params[2]: counter load count.
Output:
Data:
None.
Error Codes:
status = 0: No error.
status = 1: Invalid task number, task > 17, or driver not initialized.
status = 8: Invalid counter, not 0, 1 or 2.
status = 9: Invalid counter mode, not between 0 and 5.
Example
:
int task,params[5],status;
/* these are globally declared variables */
task = 14;
params[0] = 1;
/* counter 1 */