
SERIAL Digital I/O Series User Manual Eagle Technology - Data Acquisition
Configuring the ADC subsystem for scanning
This is the most complicated part of configuring the SRL 26/30 for auto scanning. Make sure
that you use the correct format when applying the channel list configuration. There are many
loopholes and care should be taken when implementing code to configure the SRL 26/30.
API-CALL
Long EDRE_ADConfig (ulng Sn, pulng Freq, ulng ClkSrc, ulng Burst, ulng Range,
pulng ChanList, pulng GainList, ulng ListSize)
The following parameters must be specified when configuring the ADC sub-system.
Parameter Type Description
Sn Unsigned long Device serial number
Frequency Pointer to an
unsigned long
ADC Sampling frequency
ClkSrc Unsigned long This parameter is used to configure the clock/convert source of the ADC sub-system.
Offset (bits) Description
0 Clock Source (C0-C7)
0: Internal 10 MHz clock
1: External Convert (EXT_CLK)
8 Gate Source (G0-G7)
0: Disable
1: External Gate (EXT_TRIG)
Example Layout:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
G7 G6 G5 G4 G3 G2 G1 G0 C7 C6 C5 C4 C3 C2 C1 C0
Burst Unsigned long Not Used
Range Unsigned long Not used
ChanList Pointer to an
unsigned long
This is a pointer to an array that contains the list of channels to be scanned. The array length should be the
same length as the value of ListSize
GainList Pointer to an
unsigned long
GainList is an array that contains the gain/range settings for each channel in the scan list. The array length
should the same as the ListSize value.
Offset (bits) Description
0 Specifies the gain of the channel.(G)
Value Gain
0 X ¼
1 X ½
2 X 1
3 X 2.5
4 X 5
5 X 10
6 X 25
7 X 50
8 X 100
8 Specifies the range of the channel. (R)
Value Range
0 UNIPOLAR, SINGLE ENDED
1 BIPOLAR, SINGLE ENDED
2 UNIPOLAR, DIFFERENTIAL
3 BIPOLAR, DIFFERENTIAL
Example Layout:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R7 R6 R5 R4 R3 R2 R1 R0 G7 G6 G5 G4 G3 G2 G1 G0
ListSize unsigned long This is the length of the channel list.
Return long Error code
ACTIVEX CALL
Long EDREADX.Configure (plong Channels, plong Gains, long ListSize)
The Frequency and ClockSource ADC ActiveX control must be setup before calling the
configure function. See the above table for the layout of the Channels and Gains lists.
Eagle Technology © Copyright 2003 – www.eagledaq.com 24