2.4 Real-time averaging (AVG option)
26
U5303A User's Manual
IAqMD3AccumulatedWaveformCollection<Int32> waveformCollection = null ;
waveformCollection = instrument.Channels[«Channel1»].Measurement.FetchAccumulatedWaveform(0,
nbrRecords, 0, nbrSamples, waveformCollection);
foreach (var waveform in waveformCollection)
{
for (int point = 0; point < waveform.ValidPointCount; ++point)
{
double sampleInVolts = waveform.GetScaled(point);
}
}
Partial readout after an incomplete accumulation
It is possible to read data after an incomplete accumulation. If user stops the acquisition using an
Acquisition.Abort
before reaching the specified number of triggers, the accumulated data can be
read, excepted for incomplete block of 8 triggers. For instance:
- If the number of acquired triggers is <8, no data is available.
- If the number of acquired triggers is between 8 and 16, the data accumulation for the first 8 triggers
can be read.
- If the number of acquired triggers is between 16 and 24, the data accumulation for the first 16 triggers
can be read.
And so on in multiple of 8 accumulations.
After an
Acquisition.Abort
and an incomplete accumulation, the
ScaleFactor
and
ScaleOffset
returned by the Fetch function refer to the complete accumulation.
In case of partial average readout, the effective scale factor is obtained from the returned
ScaleFactor
multiplied by the configured number of averages, and divided by the actual number
of averages.
Other AVG Parameters
Finally, below are specific parameters commonly used in the averager:
NumberOfAverages
: number of waveforms to average in the record.
DataInversionEnabled
: the data acquired may be inverted if desired, before the averaging.
Mode
: select the averager mode (
IAqMD3Acquisition.Mode
property in IVI.NET or
AQMD3_VAL_
ACQUISITION_MODE_AVERAGER
in IVI-C)
Enabling the Averager mode
IVI.NET
The average mode is selected by setting
IAqMD3Acquisition.Mode
property to
Acqiris.AqMD3.AcquisitionMode.Averager
:
instrument.Acquisition.Mode = AcquisitionMode.Averager;
IVI-C