3.3.14 tmcFoc_Output_s Struct

C

/* Data structure for FOC output ports: Floating point version */
typedef struct
{
    tmcTypes_AlphaBeta_s  iAlphaBeta;  /* Current components in the αβ reference frame */
    tmcTypes_AlphaBeta_s  uAlphaBeta;  /* Voltage components in the αβ reference frame */
    tmcTypes_DQ_s  iDQ;                /* Current components in the DQ reference frame */
<#if ( MCPMSMFOC_POSITION_CALC_ALGORITHM != 'SENSORED_ENCODER' )>
    float32_t elecAngle;               /* Electrical angle of the Motor */
    float32_t elecSpeed;               /* Electrical speed of the Motor */   
</#if>
    int16_t duty[3u];                  /* PWM duty cycles for three phases */
}tmcFoc_Output_s;


/* Data structure for FOC output ports: Fixed point version */
typedef struct
{
    tmcTypes_AlphaBeta_s  iAlphaBeta;  /* Current components in the αβ reference frame */
    tmcTypes_AlphaBeta_s  uAlphaBeta;  /* Voltage components in the αβ reference frame */
    tmcTypes_DQ_s  iDQ;                /* Current components in the DQ reference frame */
    uint16_t elecAngle;                /* Electrical angle of the Motor */
    int16_t elecSpeed;                 /* Electrical speed of the Motor */ 
    int16_t duty[3u];                  /* PWM duty cycles for three phases */
} tmcFoc_Output_s;

Summary

FOC control module output parameter structure.

Description

This structure holds the output data for the Field Oriented Control (FOC) module, including current and voltage components in different reference frames, electrical angle, speed, and PWM duty cycles.

Remarks

Refer the generated header file for the exact typedef signature.