User manual

Programmer’s Guide Page 30 of 66
3.7. Configuring U1084A Peak
TDC
Analyzers
In addition to the normal Digitizer setup, such as the trigger setup and full scale, you should configure the following
settings when using the U1084A in mode:
// Configure peak detection
ViInt32 numberOfSamplesPerSeg = 4096;
ViInt32 numberOfSegments = 1;
ViInt32 numberOfTriggersPerSeg = 50;
ViReal64 startDelta=0.1,validDelta = 0.2; // Peak slope thresholds in Volts
AcqrsD1_configMode(instrID, 5, 0, 0);
AcqrsD1_configAvgConfig(instrID, 0, "NbrSamples", &numberOfSamplesPerSeg);
AcqrsD1_configAvgConfig(instrID, 0, "NbrSegments", &numberOfSegments);
AcqrsD1_configAvgConfig(instrID, 0, "NbrWaveforms", &numberOfTriggersPerSeg);
AcqrsD1_configAvgConfig(instrID, 0, "StartDeltaPosPeakV", &startDelta);
AcqrsD1_configAvgConfig(instrID, 0, "ValidDeltaPosPeakV", &validDelta);
If you wish to use peak interpolation, the following additional settings should be configured:
// 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 peaksinterpolated
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.11.9 Reading U1084A PeakTDC Waveforms and Histograms for more information.
3.8. 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: