Download Print this page

Keithley ADC-16 User Manual page 63

Analog input board

Advertisement

ADC-16 USER GUIDE
-
KFormatChnGAry
Purpose
Frame parameter. Reformats a user channel/gain array for use by the ADC-16
driver.
fOl777af
D d S E r r
=
WormatChnGAry
(
ChanGainArray
) ;
entry parameters
ChanGainArray = Channel Gain Array in the following form:
OFFSET TYPE
DESCRIPTION
_ _ _ _ _ _ ~ ~ ~
~~~~
0
Integer
Number Of Enmes In This Table (N/2)
1
Integer
Channel
#1
2
Integer
Gain Code For Channel
#1
3
Integer
Channel #2
4
Integer
Gain Code For Channel #2
.
Integer
Channel
#
(N/2)
N
Integer
Gain Code For Channel
#
(N/2)
exit parameters
None.
return value
DASErr
=
integer variable (0 = No Error).
see also
KRestoreChnGAry
.
comments
For certain A/D acquisition modes, the user can specify different gains for different
input channels using a channel/gain array. This array is passed to the driver using
KSetChnGAry. For the driver to accept this array, it must be in specific format; this
format is not achievable directly from BASIC.
m o r m a t c b n G A r y
operates on the array that is actually passed to your BASIC
program, making it unreadable. To restore the array so that
it
is readable from
BASIC, use the complementary function KRestoreChnGAry.
* * *
Examples
Interpreted BASIC
- 0
CALL
KFonnatChnGAry%
(ChanGainArray (0)
, DASErr%)
QuickBASIC
DIM ChanGainArray(20)
AS
INTEGER
ChanGainArray(0)
= 4
'
Number
of Chan/Gain pairs
ChanGainArray (1)
=
0 : ChanGaiduray
(2)
=
0
Chan 0
G a i n
xl
ChanGainArray(3) = 1: ChanGainArray(4)
=
1
'
Chan 1 Gain
x10
ChanGainAtray(5)
=
2: ChanGainArray(6) = 1
Chan 2 Gain
x10
ChanGainArray(7)
=
3: CbanGainArray(8) = 0
Chan 3 Gain xl
DASErr
=
WormatChnGAry%
(ChanGainArray)
IF
D A S E r r
<>
0
THEN
BEEP: STOP
QBASIC
CAU
ABSOLUTE (ChanGainArray
()
, DASErr,
KFornratChnGAry)
* * *
7 - 1 0

Advertisement

loading