User manual

Programmer’s Guide Page 18 of 64
3.4. Configuring Averagers
3.4.1. Basic configuration
The averagers have 2 operational modes, digitizer and averager, controlled with the function:
AcqrsD1_configMode(instrID, mode, 0, 0);
The value mode can be set to 0 (digitizer) or 2 (averager).
The averager mode uses a number of additional configuration parameters, which describe the requested averaging
conditions.
Use the following short code fragment to configure an average of 1000 waveforms of 20’000 data points, with a
dithering range of ± 15 ADC LSB’s and a start delay of 128 samples for an AP100:
// Configure
long channelNbr = 0, nbrSamples = 20000, nbrWaveForms = 1000;
long ditherRange = 15, trigResync = 1;
long startDelay = 128, stopDelay = 0;
AcqrsD1_configAvgConfig(instrID, channelNbr,
"NbrSamples", &nbrSamples);
AcqrsD1_configAvgConfig(instrID, channelNbr,
"NbrWaveforms", &nbrWaveForms);
AcqrsD1_configAvgConfig(instrID, channelNbr,
"DitherRange", &ditherRange);
AcqrsD1_configAvgConfig(instrID, channelNbr,
"TrigResync", &trigResync);
AcqrsD1_configAvgConfig(instrID, channelNbr,
"StartDelay", &startDelay);
AcqrsD1_configAvgConfig(instrID, channelNbr,
"StopDelay", &stopDelay);
Comments:
The value channelNbr is usually 0. However, for multi-channel Signal Analyzer platforms (AP240/AP235,
U1084A) it can take on the value of the desired channel for some of the parameters.
When in averager mode, the following digitizer parameters are ignored:
delayTime of the function AcqrsD1_configHorizontal is replaced by “StartDelay” and “StopDelay”
nbrSamples and nbrSegments of the function AcqrsD1_configMemory are replaced by “NbrSamples
and “NbrSegments”
For the AP family of averagers, the values nbrSamples, startDelay and stopDelay must be integer multiples
of the ‘averaging block size’, which is always 16 in the AP100 or AP240/AP235 Dual-channel mode, and
32 in the AP200 or AP240/AP235 Single-channel mode. If the supplied value is not an integer multiple of
the ‘averaging block size’, it is truncated to the next lower integer multiple. Thus, nbrSamples = 250 will be
truncated to 240 (15 * 16) on an AP100, and to 224 (7 * 32) on an AP200. You can query the actual value
with the function AcqrsD1_getAvgConfig.
For the U1084A Averager, the values startDelay and stopDelay must be integer multiples of the ‘averaging
block size’, which is 16 in Dual-channel mode, and 32 in Single-channel mode. The value nbrSamples must
be a multiple of 256 in Dual-channel mode or 512 in Single-channel mode. You can query the actual value
with the function AcqrsD1_getAvgConfig
The value startDelay controls the time between the trigger and the first data sample that is to be added to the
averager sum.
The stopDelay permits the addition of an extra delay to the dead time between the averaging of subsequent
waveforms. Its minimum value is zero.
The ditherRange value may be between 0 (no dithering) and 15 (max dithering). Please refer to the next
section for further explanations.