Download Print this page

Keithley ADC-16 User Manual page 38

Analog input board

Advertisement

CHAPTER
6
THE CALL DRIVER
670
800
810
'
820
830
840
850
860
870
880
890
900
91 0
92 0
93 0
940
950
960
97 0
980
990
1000
1010
1020
1030
1040
1050
1060
1070
1080
1090
1100
1110
1120
1130
1140
1150
1160
Include the following in all your BASIC programs.
Initialize Driver entry point variables.
ADCl6DEVOPEN%
= o
ADCl6GETDEVHANDLE% =
3
KGETADFRAME
%
=
6
KGETDOFRAME%
=
15
KGETVER%
=
30
KDASDEVINIT%
=
33
KSETIRQMAP%
=
36
KE'REEFRAME%
=
39
KSETBUF%
=
42
KSETSTARTSTOPG%
=
54
KGETSTARTSTOPG%
=
57
KSETCHN%
=
60
KGETCHN%
=
63
KSETSTARTSTOPCHN%
=
66
KGETSTARTSTOPCHN%
=
69
KSETG%
=
72
KGETG%
=
75
KSETCHNGARY
%
=
78
KCHRFRAM3%
=
129
KINITFRAME%
=
132
KSYNCSTART
%
=
135
KINTSTART%
=
147
KINTSTATUS%
=
150
KINTSTOP
%
=
153
KGETDOCURVAL%
=
156
KMOVEDATABUF%
=
201
KADREAD%
=
213
KDIREAD%
=
219
KDOWRITE%
=
222
KFORMATCHNGARYB
=
225
KRESTORECHNGARY
%
=
228
KCLEARFRAME%
=
231
DATASEG%
=
&HFFFF
RETURN
The KGETADFRAME call is used to open the frame with the variable name ADSET for the ADC-16
board referred to by variable DEVHANDLE. The FRAME is filled with the start-stop channels and
gain using the call KSETSTARTSTOPG. The data location for the acquisition is established by
KSETBUF. The number of samples taken in this example is determined by the start and stop channels
and the SAMPLES parameter in the KSETBUF call is ignored. With all the FRAME parameters
completed in ADSET, the acquisition is initiated by a call to KSYNCSTART.
A program can define multiple frames. For example, an application may define a
F R A M E
with
different start-stop channels or use KSETCHNGARY to define a FRAME with the gain and channel
sequence specified in a channel gain array.
6.3 QUICKBASIC 4.0
+,
INCLUDING PROFESSIONAL BASIC 7.0
+
Program Flow
A typical programming sequence is as follows:
1.
Load the driver (from the QB command line).
2.
$INCLUDE: the driver function declarations.
*
3. Declare and dimension all variables that will be used in the program.
*
6 - 7

Advertisement

loading