Jump to main content

# 1.1.4.28 DRV_METROLOGY_StartHarmonicAnalysis Function

## C

    bool DRV_METROLOGY_StartHarmonicAnalysis(
      uint32_t harmonicBitmap,
      DRV_METROLOGY_HARMONIC *pHarmonicResponse
    );

## Summary

Starts the harmonic analysis process.

## Description

This routine configures the metrology library to enable the harmonics computation and to calculate the data corresponding to the harmonics active in harmonicBitmap. Then, the metrology driver receives the data from the metrology library and computes the RMS currents and voltages of the selected harmonics.

## Parameters

Parameters | Description
--- | ---
harmonicBitmap | Bitmap defining harmonics to be processed. Each bit set represents one harmonic.
pHarmonicResponse | Pointer to the harmonic analysis struct data to store the harmonic data result.

## Returns

True if harmonic analysis is successfully triggered. Otherwise false.

## Example

        DRV_METROLOGY_HARMONIC harmonicAnalysisResponse;

        if (DRV_METROLOGY_StartHarmonicAnalysis(3, &harmonicAnalysisResponse))
        {
            waitForResponse();
        }

## Remarks

None.

Rev: E