Download Print this page

Keithley ADC-16 User Manual page 39

Analog input board

Advertisement

ADC-16
USER
GUIDE
NOTE: Failure to declare all variables before opening the driver will cause the program
pointers to be shifted and will cause the program to fail!!!
4.
Load the ADC-16s hardware configuration, and open the driver.
*
5 . Initialize the driver and board, and establish communications between the driver and program.*
6. EITHER
a. Execute a simple ADC-16 operation.
OR
b. Select the desired group of ADC-16 operations, referred to as the group's Frame. Execute
these operations, taking some data.
*
Indicates that this function is performed in the "Quick-Start'' programs. (see next section)
Choose Step 6a for simple applications such as performing a single A/D conversion or reading a
digital input port. Choose Step 6b for more complex operations (an interrupt-based scan of the
multiple channels).
The following sections describe the various parts of the flow diagram. However, many programmers
will learn faster by simply referring to the various example programs supplied with the ADC-16.
Quick-Start Program
To aide in the creation of programs, the Distribution Software includes a Quick-Sfarf program. This
program includes all driver loading, pointer definition, and ADC-16 initialization; it is provided as
standard QuickBASIC source code with an Insert Your Code
H e r e
section. The Quick-Start program
for QuickBASIC versions is QUICKBAS.BAS QuickBASIC Version 4.0 or greater and/or
Professional BASIC Version 7.0 or greater.
In your initial programming efforts, start with this program and add new sections to the existing code.
This should prove simpler than going through the effort to rewrite the driver, pointer and
initialization code.
Loading & Including The Driver
In QuickBASIC, the driver needs to be loaded at the QB command line. This procedure is as follows:
QB /L ADCl6QB. QLB
In Quick/Professional BASIC Version 7.0 and greater, use
QBX /L ADCl6QBX.QLB
The program itself will also need to contain the following INCLUDE statement.
QuickBASIC Versions 4.0 and
4.5
$INCLUDE: 'Q4IFACE.BI'
6 - 8

Advertisement

loading