Jump to main content

# 2.1.4.11 DRV_MCMETROLOGY_StartHarmonicAnalysis Function

## C

    bool DRV_MCMETROLOGY_StartHarmonicAnalysis(
      uint32_t harmonicNum,
      DRV_MCMETROLOGY_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 harmonic active in harmonicNum. Then, the metrology driver receives the data from the metrology library and computes the RMS currents and voltages of the selected harmonic.

## Parameters

Parameters | Description
--- | ---
harmonicNum | Number of harmonic for analysis
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_MCMETROLOGY_HARMONIC harmonicAnalysisResponse;

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

## Remarks

None.

Rev: E