Download Print this page

Keithley ADC-16 User Manual page 36

Analog input board

Advertisement

CHAPTER 6 THE CALL DRIVER
530
BrdNum%
=
0
'First ADC-16 board
540
CALL ADC16GetDevHandle%(BrdNum%,ADCl6A,ErrFlag%)
550
BrdNum%
=
1
Second ADC-16 board
560
CALL ADC16GetDevHandle%(BrdNum%,ADCl6B,ErrFlag%)
570
m a n %
=
0: Gain% = 0
580
CALL KADRead(ADC16A, m a n % , Gain%, =Value% (0)
,
ErrFlag%)
590
PRINT
"The f i r s t ADC-16 returned",ADValue% (0)
600 m a n %
=
5: Gain%
= 0
610 CALL KADRead(ADC16B, m a n % , Gain%, ADValue% (0)
,
E r r F l a g % )
620
PRINT
"The second ADC-16 returned",ADValue% (0)
Note that line 580 uses the first ADC-16 Handle as set-up in line 540, while line 610 uses the second
Handle.
Other Immediate operation commands include
KDIRead
KDOWrite
Read the digital inputs.
Write to the digital outputs.
FRAMES
Analog Input and Digital Output allow for operation using Frames. For Digital Output the Frame is a
means of returning the value of the Digital Output port. For Analog Input the Frame is the group of all
setup parameters used in
a
synchronous or interrupt driven operation. For example, an analog input
Frame requires setting up the following parameters:
Input Channels to scan (Start and Stop channels).
Input Gain.
Number of samples.
Data buffer location.
Program flow is similar in each type of Frame. The standard program flow using Frames is as follows:
First:
Next:
Then:
Optionally:
Open or get a Frame with a KGetADFrame or KGetDOFrame
command.
Setup any parameters required within the Frame.
Execute the desired Frame function.
Check the status of the operation initiated.
The following program segment is similar to the GWBEX7.BAS example program included in the
Distribution Software. It may be helpful to refer to this example program during the following
discussion.
6 - 5

Advertisement

loading