User manual
Programmer’s Guide Page 22 of 64
• 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. This
feature is for AP101/AP201 analyzers only.
• 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. This feature is for AP101/AP201
analyzers only.
3.5.2. Readout configuration
There are two possible ways of reading the data when in the SSR mode: user gates, and threshold gates. In all cases
the entire acquisition must be read; you cannot ask for fewer segments or points. If you want to read all of the data
you should define the appropriate gate. These setting are also controlled through the AcqrsD1_configAvgConfig
routine and therefore must be prepared before the acquisition is started. They can be set independently for each
channel if desired.
For user gate readout you have to define the groups of data samples that you want to read for each segment. If needed
new values for the gates can be defined during the acquisition process. They will become effective after the next call
to AcqrsD1_processData or AcqrsD1_acquire. Here is some sample code:
long g_gateLengthSum[3];
long g_lastGate[3];
long channel = 1, gate =1;
AcqrsD1_configAvgConfig(
instrID, channel, "GateType", &gate);
// you can define up to 4095 gates,
// GatePos and GateLength must both be multiples of 4
AqGateParameters configSetupData[100];
long configObj = SSR_Default;
long gateSize = 1000;
// this will be the size we want to read
g_gateLengthSum[channel] = 0;
g_lastGate[channel] = 1; // a very simple example
for(int g=0;g<g_lastGate[channel];g++)
{
// the first gate starts with the first point
configSetupData[g].GatePos = g * gateSize;
configSetupData[g].GateLength = gateSize;
g_gateLengthSum[channel] += configSetupData[g].GateLength + 8;
}
status = AcqrsD1_configSetupArray(
instrID, channel, configObj,
g_lastGate[channel], configSetupData);
For threshold gate readout you have to define the threshold value in volts. Data values greater than this will be
selected for readout. If desired you can use AcqrsD1_configAvgConfig with the "InvertData" parameter to choose
data values less than the threshold. In addition you can define the number of data values before and after each
selected value that you always want to see. This number is in the range 0 to 16. However, the value will always be
rounded up to the next highest multiple of 4. If two consecutive selected values are 32 or more samples apart a new
gate block will be generated. Otherwise, the current block will be continued. In all cases the data transferred will
always be a multiple of 4 samples and it will start on a sample whose time position is a multiple of 4. Alternatively
the number of data values before and the total number of values can be selected. Furthermore, a limit on the
maximum number of gates per segment can be set.