User manual
Programmer’s Guide Page 28 of 64
// Configure peak interpolation
ViInt32 enableInterpolation = 1;
ViInt32 horzReso = 2; // Increase in horizontal resolution, in bits
ViInt32 vertReso = 2; // Increase in vertical resolution, in bits
AcqrsD1_configAvgConfig(
instrID, 0, "InterpEnable", &enableInterpolation);
AcqrsD1_configAvgConfig(
instrID, 0, "TdcHistogramHorzRes", &horzReso);
AcqrsD1_configAvgConfig(
instrID, 0, "TdcHistogramVertRes", &vertReso);
The values horzReso and vertReso specify the number of bits to use for the fractional part of the peaks’ interpolated
position and amplitude, respectively.
NOTE: Enabling vertical interpolation will change the bit depth of each histogram bin, which affects the maximum
possible number of triggers per segment and the interpretation of the bin values. Enabling horizontal interpolation
will change the number of histogram bins per sample and thus the number of data points available for readout. See
3.10.9 Reading U1084A PeakTDC Waveforms and Histograms for more information.
3.9. Configuring AP101/AP201 Analyzers
The models AP101/AP201 have 2 operational modes, normal and buffered (also called dual-memory), controlled
with the function:
AcqrsD1_configMode(instrID, mode, 0, flags);
The value mode can be set to 0 (normal) or 3 (dual-memory). In mode = 3, the parameter flags sets the memory bank
into which to acquire (0 or 1).
The buffered mode uses a number of additional configuration parameters that describe the requested buffered
acquisition conditions.
Use the following short code fragment to configure a buffered acquisition sequence of 800 waveforms of 5000 data
points, with a start delay of 128 samples, into memory bank 1:
// Configure
long nbrSamples = 5000, nbrSegments = 800;
long startDelay = 128, stopDelay = 0;
AcqrsD1_configMode(
instrID, 3, 0, 1);
AcqrsD1_configAvgConfig(instrID, 0, "NbrSamples", &nbrSamples);
AcqrsD1_configAvgConfig(
instrID, 0, "NbrSegments", &nbrSegments);
AcqrsD1_configAvgConfig(instrID, 0, "StartDelay", &startDelay);
AcqrsD1_configAvgConfig(
instrID, 0, "StopDelay", &stopDelay);
Comments:
• The value of the second argument to AcqrsD1_configAvgConfig must always be 0.
• When in buffered 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” in the function AcqrsD1_configAvgConfig.
• The values nbrSamples, startDelay and stopDelay must be integer multiples of the ‘acquisition block size’,
which is always 16 in the AP101, and 32 in the AP201. If the supplied value is not an integer multiple of the
‘acquisition block size’, it is truncated to the next lower integer multiple. Thus, nbrSamples = 250 will be
truncated to 240 (15 * 16) on an AP101, and to 224 (7 * 32) on an AP201. You can query the actual value
with the function AcqrsD1_getAvgConfig.
• The value startDelay controls the time between the trigger and when the first digitized data sample is stored.
The stopDelay permits the addition of an extra delay to the dead time between the acquisition of subsequent
waveforms. Its minimum value may be zero.
• Although not shown here, a call to AcqrsD1_configControlIO can be made in order to set a trigger veto
time to be respected after the receipt of a Prepare for Trigger signal on a Control I/O connector.
• Also not shown, is a call to the function AcqrsD1_configAvgConfig to set a timeout value for the
automatic completion of a segment in case the real trigger never arrives.