Manual Number: 00650-014-4
Page 6-14
AD12-8 Manual
Each bit position in the eight bits used is one digital output bit.
The direction of the eight digital bits on the AD12-8 is programmable by
jumper selection on the card. See
CHAPTER 3: HARDWARE
CONFIGURATION AND INSTALLATION
for details.
Error Codes:
AD128_SUCCESS:
Operation was performed without error.
AD128_DigitalIn
Function:
Reads a byte from the digital input port.
Syntax:
Visual BASIC:
AD128_DigitalIn(value as Integer) as Integer
C:
int PASCAL AD128_DigitalIn(int *value);
*value:
Pointer to return the value read from the digital input port.
Notes:
Even though the
value
parameter is a 16 bit value, the driver will only use
the lower eight bits of the number.
Each bit position in the eight bits used is one digital output bit.
The direction of the eight digital bits on the AD12-8 is programmable by
jumper selection on the card. See
CHAPTER THREE: HARDWARE
CONFIGURATION AND INSTALLATION
for details.
Error Codes:
INVALID_PTR:
The gain code pointer is invalid.
AD128_SUCCESS:
Operation was performed without error.
AD128_SetCounter
Function:
Set up the indicated counter.
Syntax:
Visual BASIC:
AD128_SetCounter(Byval counter as Integer, Byval mode as Integer,
Byval loadvalue as integer, Byval bcd as integer) as Integer
C:
int PASCAL AD128_SetCounter(int counter,int mode, unsigned loadvalue,
int bcd);
counter:
Counter number to set up.
mode:
Counter mode, possible values are 0 to 5.
loadvalue:
Initial counter load contents.
bcd:
Number system to count by. If
bcd
= 1 then counter counts in BCD if 0,
counter counts in binary.
Notes:
The counter will begin counting whenever its gate is brought and held high.
For a more complete discussion of the counter/timers please see
CHAPTER
8: PROGRAMMABLE INTERVAL TIMER
.
Error Codes:
INVALID_COUNTER: Counter number is not 0,1 or 2.
INVALID_MODE:
Counter mode is not 0 through 5.
AD128_SUCCESS:
Operation was performed without error.