This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to view duty cycle?

Hello 

I wonder how to view duty cycle of PWM when the system is running.

Is there some variable or some returned value of the function for duty cycle?

Thanks.

  • not exactly.
    //! \brief Defines the PWM data
    //!
    typedef struct _HAL_PwmData_t_
    {
    MATH_vec3 Vabc_pu; //!< the PWM time-durations for each motor phase

    } HAL_PwmData_t;

    which is in per unit

    another way is if you only care about the average voltage duty cycle you can review the gMotorsVars.Vs variable in proj_lab10a which will limit up to your .OverModulation variable and can be thought of as
    % duty cycle = Vs / 0.667