Jump to main content

##

# 3.9.3 mcUtils_PiLimitUpdate

## C

    /* Updates the floating point PI control limits  */
    void mcUtils_PiLimitUpdate( const float32_t Ymin, const float32_t Ymax, tmcUtils_PiControl_s  * const pControl  )

    /* Updates the fixed point PI control limits  */
    void mcUtils_PiLimitUpdate(const int16_t Ymin, const int16_t Ymax, tmcUtils_PiControl_s * const pControl)

## Summary

This function updates the minimum and maximum output limits for the PI control.

## Description

The function updates the output range of the PI controller by setting the Ymin and Ymax values. These values define the lower and upper bounds for the controller's output, ensuring that the control signal remains within specified limits

## Precondition

None.

## Parameters

Param | Description
--- | ---
Ymin | Minimum allowable output value for the PI controller. Refer the generated header for the exact data type.
Ymax | Maximum allowable output value for the PI controller. Refer the generated header for the exact data type.
pControl | Pointer to the PI control structure to be updated.

## Returns

None

## Example

    // Define the PI controller data structure
    tmcUtils_PiControl_s piControl;

    / Define the parameters for floating point PI control limits
    float32_t Ymin = -1.0f;
    float32_t Ymax = 1.0f;

    / Define the parameters for fixed point PI control limits
    int16_t Ymin = -1;
    int16_t Ymax = 1;

    /* Updates the PI control limits. */
    mcUtils_PiLimitUpdate(Ymin, Ymax, &piControl);

## Remarks

Refer the generated header file for the exact function signature.