Download Print this page

Keithley ADC-16 User Manual page 79

Analog input board

Advertisement

ADC-16 USER GUIDE
KSet Buf
purpose
format
entry parameters
exit parameters
return value
see also
comments
Memory Management. Assigns a data buffer and number of samples to a particular
frame.
Interpreted BASIC:
DASErr
=
KSetBuf
(
F r a m e H a n d l e , B u f S e g , B u f O f f ,
Samples
):
QuickBASIC & QBASIC:
DASErr
=
KSetBuf
(
F r a m e H a n d l e , B u f A d d r , S a m p l e s
)
:
FrameHandle = frame handle obtained from previous KGetADFrame call.
Bufseg = integer Segment value of a memory area to be assigned to the frame (for
Interpreted BASIC only). If using an array created by DIMension, use the parameter
DutuSeg% instead of BufSeg.
DutuSeg
is a variable declared in the initialization
subroutine; it indicates that BASIC's local data-segment should be used.
BufOff = integer Offset value of a memory area to be assigned to the frame (for
Interpreted BASIC only).
BufAddr = long integer address value of memory area to be assigned to the frame
(for QuickBASIC and QBASIC only).
Samples = long integer specifylng the number of samples associated with the data
buffer. The Samples parameter is not used in the ADC-16. The number of samples is
determined by the start-stop channels or a channel-gain array.
None.
DASErr
=
integer variable (0
=
No Error).
KSetChnGAry
KSetBuf assigns the address of a memory location and the number of samples to
the specified frame. For Interpreted
BASIC,
the memory address is passed as
absolute Segment and Offset value (for example, &H8000:0).
* * *
Examples
Interpreted
BASIC
Buff O f f
% = V A R p m
(Buf
f er%
(0)
)
:
Count%=O
' N o t u s e d .
- 0
xx30
I F DASErr% 0 0 THEN
m :
STOP
CALL
K S e t B u f %
(FramaHandle,DataSeg%,BuffOff%,
Count%, D a s E r r % )
QuickBASIC
D I M B u f f e r (100) AS INTEGER
DASErr
=
KSetBuf% (FrameHandle,Buffer(O) , A d d r e s s , Samples (0)
)
I F DASErr
<>
0 TBEN
BEEP:
STOP
QBAsIC
C A L L
ABSOLUTE
(FrannaHandle, B u f f e r
()
,
Samples,
DASErr
,
K S e t B u f )
* * *
7 - 2 6

Advertisement

loading