Download Print this page

Keithley ADC-16 User Manual page 61

Analog input board

Advertisement

ADC-16 USER GUIDE
Purpose
format
entry parameters
exit parameters
return value
see also
comments
Examples
Interpreted BASIC
QuickBASIC
QBASIC
KDlRead
Operating Function. Read a single Digital Input value.
DASErr
= KDIRead(
D e v H a n d l e , C h a n , D I V a l u e
) ;
DevHandl
e = a unique identifier for a logical DAS device obtained by a previous
call to ADC16GetDevHandle.
Chan
=
number for channel from which data is to be read (always 0 for ADC-16).
DIVulue = a variable that contains the data sample. In Interpreted BASIC, this
value must be previously DIMensioned as an array of two integers. For QBASIC
and QuickBASIC, it is DIMensioned as a single LONG integer. Bit0
=
IPO; Bit1
=
IP1.
DASErr
=
integer variable
(0
=
No Error).
KDOWrite.
KDIRead
performs a single read operation from the digital input port.
+ + +
xxxl0
DIM DIValue%(2)
xxx20
CALL KDIRead%
(Devtlandle,
&an%, DIValue% (0)
,
DASErr%)
DIM DIValue AS LONG
DASErr = KDIRead%(DevFfandle, Chan, DIValue)
IF
DASErr%
0
0 TEEN BEEP: STOP
PRINT
"Digital Input value is
:
'I:
HEX$
(DIValue)
:
DIM DIValue
AS
LONG
CALL
ABSOLUTE (DevHandle,
Chan,
DIValue, DASErr, KDIRead)
7 - 8

Advertisement

loading