AlazarConfigureRecordAverage

Function Syntax

RETURN_CODE AlazarConfigureRecordAverage(HANDLE handle, U32 mode, U32 samplesPerRecord, U32 recordsPerAverage, U32 options)

Configures a digitizer to co-add ADC samples from a specified number of records in an accumulator record, and transfer accumulator records rather than the ADC sample values.

When FPGA record averaging is enabled, the digitizer transfers one accumulator record to host memory after recordsPerAverage trigger events have been captured.

Each accumulator record has interleaved samples from CH A and CH B. FPGA accumulators are 32-bit wide, so each accumulator value occupies 4 bytes in a buffer. The digitizer transfers multi-byte values in little-endian byte order.

CH A and CH B accumulator records are always transferred to host memory. As a result, the number of bytes per accumulator record is given by:

samplesPerRecord * 2 (channels) * 4 (bytes per accumulator sample)

The maximum value of recordsPerAverage for 8-bit digitizers is 16777215

Note that recordsPerAverage does not have to be equal to the number of records per buffer in AutoDMA mode.

Return

ApiSuccess upon success, or an error code. See RETURN_CODE for more detailed information.

Remark

FPGA record averaging is currently supported on the following digitizers:

  • ATS9870 with FPGA version 180.0 and above, and driver version 5.9.8 and above

  • AXI9870 with FPGA version 180.0 and above, and driver version 5.9.23 and above

Note

This function is part of the dual-port API. It should be used only in this context. To abort single-port acquisitions using, see AlazarAbortCapture().

Parameters
  • [in] handle: Handle to board

  • [in] mode: Averaging mode. Should be one element of ALAZAR_CRA_MODES.

  • [in] samplesPerRecord: The number of ADC samples per accumulator record.

  • [in] recordsPerAverage: The number of records to accumulate per average.

  • [in] options: The averaging options. Can be one of ALAZAR_CRA_OPTIONS.

LabVIEW Block Diagram

../_images/AlazarConfigureRecordAverage.vi.png