AlazarFFTSetup

Function Syntax

RETURN_CODE AlazarFFTSetup(dsp_module_handle dspHandle, U16 inputChannelMask, U32 recordLength_samples, U32 fftLength_samples, U32 outputFormat, U32 footer, U32 reserved, U32 *bytesPerOutputRecord)

Configure the board for an FFT acquisition.

This function needs to be called in the board configuration procedure, therefore before AlazarBeforeAsyncRead().

The output format of the fft is controlled by the outputFormat parameter, with the FFT_OUTPUT_FORMAT enumeration. All elements of FFT_OUTPUT_FORMAT except FFT_OUTPUT_FORMAT_RAW_PLUS_FFT describe a data type (unsigned 8-bit integer, floating point number, etc.) as well as a scale (logarithmic or amplitude squared). It is mandatory to select one (and only one) of these.

On the other hand, when FFT_OUTPUT_FORMAT_RAW_PLUS_FFT is OR’ed (using the C | operator) to another symbol, it has the meaning of asking the board to output both the time-domain (raw) and FFT data.

Parameters
  • dspHandle: The FFT module to configure.

  • inputChannelMask: The channels to acquire data from. This must be CHANNEL_A.

  • recordLength_samples: The number of points per record to acquire. This needs to meet the usual requirements for the number of samples per record. Please see the documentation of AlazarBeforeAsyncRead() for more information.

  • fftLength_samples: The number of points per FFT. This value must be:

    • A power of two;

    • Greater than or equal to recordLength_samples;

    • Less than or equal to the maximum FFT size, as returned by the AlazarDSPGetInfo() function.

  • outputFormat: Describes what data is output from the FFT post-processing module. This can be any element of the FFT_OUTPUT_FORMAT enum except FFT_OUTPUT_FORMAT_RAW_PLUS_FFT, optionnaly OR’ed with FFT_OUTPUT_FORMAT_RAW_PLUS_FFT.

  • footer: Describes if a footer is attached to the returned records. Must be an element of the FFT_FOOTER enum.

  • reserved: Reserved for future use. Pass 0.

  • bytesPerOutputRecord: Returns the number of bytes in each record coming out of the FFT module. This value can be used to know how long the allocated DMA buffers must be.

LabVIEW Block Diagram

../_images/AlazarFFTSetup.vi.png