User manual
Programmer’s Guide Page 21 of 64
const long channelNbr = 0;
double fsr, offset, threshold, base;
threshold = - offset; // place the threshold at the middle of the screen
base = threshold - fsr/10.; // place the base one division below the
threshold
// set the base and threshold voltage values
AcqrsD1_configAvgConfig(instrID, channelNbr, "Threshold", &threshold);
AcqrsD1_configAvgConfig(instrID, channelNbr, "NoiseBase", &base);
// enable the NSA functionality
AcqrsD1_configAvgConfig(instrID, channelNbr, "ThresholdEnable",1);
AcqrsD1_configAvgConfig(instrID, channelNbr, "NoiseBaseEnable",1);
3.5. Configuring SSR Analyzers
3.5.1. Acquisition Parameters
The AP235/AP240 SSR analyzers have 2 operational modes, normal and SSR, controlled with the function:
AcqrsD1_configMode(instrID, mode, 0, 0);
The value mode can be set to 0 (normal) or 7 (SSR mode).
The SSR mode requires a number of additional configuration parameters that describe the requested acquisition and
readout 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:
// Common Configure
long nbrSamples = 5000, nbrSegments = 800;
long startDelay = 128, stopDelay = 0;
AcqrsD1_configMode(
instrID, 7, 0, 0);
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 third and fourth arguments to AcqrsD1_configMode must always be 0.
• When in SSR 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 ‘block size’, which is
always 16 in the AP240/AP235 Dual-channel mode, and 32 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) for a Dual-channel acquisition,
and to 224 (7 * 32) for a Single-channel acquisition. 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.
It should also be noted that when startDelay is 0, the first few data points, 5 in the case of Dual-channel
mode and 10 in the Single-channel mode, will always be 0.
• The stopDelay permits the addition of an extra delay to the dead time before the acquisition of subsequent
waveforms. Its minimum value may be zero.