Jump to main content

# 1.1.4.24 DRV_METROLOGY_GetMeasureValue Function

## C

    float DRV_METROLOGY_GetMeasureValue(DRV_METROLOGY_MEASURE_TYPE type, bool perCycle);

## Summary

Gets the last value of the selected measurement type.

## Description

Gets the last value of the selected measurement type. Accumulated values are updated at the end of each integration period. Per-cycle values are updated every Full Line cycle. For additional information about Measurement types, refer to the DRV_METROLOGY_MEASURE_TYPE Enum definition.

## Parameters

Parameters | Description
--- | ---
type | Indicates the type of requested measurement
perCycle | Flag to select between per-cycle measurements (true) or integration period measurements (false)

## Returns

The value of the selected type.

## Example

    app_metrologyData.queueFree = uxQueueSpacesAvailable(appEnergyQueueID);
    if (app_metrologyData.queueFree)
    {
        newMetrologyData.energy = DRV_METROLOGY_GetEnergyValue(true);
        newMetrologyData.Pt = DRV_METROLOGY_GetMeasureValue(MEASURE_PT);
        xQueueSend(appEnergyQueueID, &newMetrologyData, (TickType_t) 0);
    }
    else
    {
        SYS_CMD_MESSAGE("ENERGY Queue is FULL!!!\n\r");
    }

## Remarks

None.

Rev: E