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.

C2000WARE-MOTORCONTROL-SDK: What is the purpose of 2 HAL MTR Handles?

Part Number: C2000WARE-MOTORCONTROL-SDK
Other Parts Discussed in Thread: C2000WARE

The C2000Ware Motor Control SDK 3.03 provides a HAL_Obj struct type within hal_obj.h:

typedef struct _HAL_Obj_
{
    uint32_t adcHandle[2];      //!< the ADC handles
    uint32_t adcResult[2];      //!< the ADC results

    uint32_t timerHandle[3];    //<! the timer handles
    uint32_t sciHandle;         //!< the SCI handle
    uint32_t linHandle;         //!< the LIN handle
    uint32_t canHandle;         //!< the CAN handle
    uint32_t i2cHandle;         //!< the I2C handle

    uint32_t spiHandle[2];      //!< the SPI handle

    uint32_t dmaHandle;         //!< the DMA handle
    uint32_t dmaChHandle[4];    //!< the DMA Channel handle

    HAL_MTR_Handle mtrHandle[2];      //!< the motor control interface handle
} HAL_Obj;

It contains an array of 2 handles of type HAL_MTR_Handle. What is the purpose of having 2? Are there any examples of how this can be used? Could this theoretically be used to run a 2nd motor?

  • Is this from the universal lab? I don't think that lab project is fully set up to run a 2nd motor currently, but yes, that's what it would be used for.

    If you take a look at the dual motor projects in the SDK (like the dual axis drive example in the boostxl_3phganinv folder or lab 11 in the boostxl_drv8320rs folder), you'll see how 2 HAL_MTR_Handles can be used in a project to run 2 motors.

    Whitney

  • Thanks Whitney, that's exactly what I was hoping to find.

    Yes the snippet in the original post is from the universal motor control lab.