2 s826_adcslotconfigread, S826_adcslotconfigread – Sensoray 826 User Manual
Page 21
chan
Analog input channel number in the range 0 to 15.
tsettle
Microseconds to allow the analog input to settle before conversion, in the range 0 to 335,544.
range
Enumerated value that specifies the analog input voltage range. This determines the analog gain that will be applied
to the input signal before digitization.
range
PGA Gain
Analog Input Range
Notes
0
x1
-10V to +10V
Default upon reset
1
x2
-5V to +5V
2
x5
-2V to +2V
3
x10
-1V to +1V
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
Remarks
The settings established by this function will be used the next time the slot is converted and remain in effect until
changed by another call to this function or a board reset.
The maximum total time for each slot is tsettle+3 µs. Sufficient settling time must be allowed when different channels
are being digitized so that each input signal has time to stabilize before digitization. If a single channel is being
digitized in multiple, consecutive slots, only the first of its slots must allow for settling time; subsequent slots may have
zero settling time because the channel will already be settled. Similarly, if only one channel is being digitized (even if it
is being digitized multiple times in different slots), all settling times may be set to zero because no channel switching
will occur.
The ADC data latency is greater than the slot time because an additional 1µs is needed to fetch the digitized data after
each conversion. The data latency is only incurred once per burst, because the ADC controller always fetches data from
the previous conversion while the next conversion is in progress. Consequently, the elapsed time from hardware trigger
to burst completion (in microseconds) is
t
burst
≤
1+3⋅NumTimeslots+
∑
t
settle
5.3.2 S826_AdcSlotConfigRead
The S826_AdcSlotConfigRead function returns the configuration of a timeslot.
int S826_AdcSlotConfigRead(
uint board, // board identifier
uint slot, // timeslot number
uint *chan, // analog input channel number
uint *tsettle, // settling time in microseconds
uint *range // input range code
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
slot
Timeslot number in the range 0 to 15.
826 Instruction Manual
16
Analog Inputs