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.

LAUNCHXL-F280049C: UMCSDK debug expressions

Guru 55963 points
Part Number: LAUNCHXL-F280049C


Hello,

Universal motor control MCSDK, CCS12.3

It seems there is a file missing from REX download (statemachines.h) but the c file exists with no functions? Why motorSetVars_M1.Ls_d/q_H and motorSetVars_M1.Rs_Ohm do not populate from (USER_MOTOR1 == my_pm_motor_1)? The ADC interrupt is working LED flashing some values do update in watch window, e.g. DCBusVoltage, Current, Voltage input sensors. Perhaps I missed something with all the #if / #endif statements that need to be enabled?

Expressions window not found debug items:

motorVars_M1.flagEnableMotorIdentify unknown member 'flagEnableMotorIdentify' not found at (motorVars_M1).flagEnableMotorIdentify

motorVars_M1.estState unknown member 'estState' not found at (motorat (motorVars_M1).estState

motorVars_M1.flagEnableRsRecalc unknown member 'flagEnableRsRecalc' not found at (motorVars_M1).flagEnableRsRecalc

motorVars_M1.flagEnableRsOnLine unknown member 'flagEnableRsOnLine' not foundat (motorVars_M1).flagEnableRsOnLine

motorVars_M1.RsOnlineTimeCnt unknown member 'RsOnlineTimeCnt' not found at (motorVars_M1).RsOnlineTimeCnt

motorVars_M1.flagStartRsOnLine unknown member 'flagStartRsOnLine' not foundat (motorVars_M1).flagStartRsOnLine

motorSetVars_M1.RsOnlineWaitTimeSet unknown member 'RsOnlineWaitTimeSet' not found at (motorSetVars_M1).RsOnlineWaitTimeSet

motorSetVars_M1.RsOnlineWorkTimeSet unknown member 'RsOnlineWorkTimeSet' not found at (motorSetVars_M1).RsOnlineWorkTimeSet

  • Universal MCSDK User Guide table 2-6 DCM build level 4 indicates motor ID cannot use eSMO. That contradicts table 2-7 showing both FAST & eSMO can work together. Therefor updateGlobalVariables() does not assert when MOTOR1_FAST is not a defined project Symbol.  Adding project symbol (MOTOR1_FAST) then the above (not found) parameters are all populated. So adding define(MOTOR1_ESMO) to updateGlobalVariables() changes a few things (motor_common.h). Does this mean that motor ID cannot be run since ESTIMATOR_MODE_FAST = 0 ????

    motor_common.h, lines 257 - 262

    #elif defined(MOTOR1_FAST) || defined(MOTOR1_ESMO)
    typedef enum
    {
         ESTIMATOR_MODE_FAST = 0, //!< FAST estimator
         ESTIMATOR_MODE_ESMO = 1 //!< ESMO estimator
    } ESTIMATOR_Mode_e;

    However there is a compiler warning: Description Resource Path Location Type This project contains 1 unresolved buildable linked resource(s). The project may not build as expected.

    Could this last debug variable be the cause (pi_fwc_M1 unknown identifier not found: pi_fwc_M1) ?

  • Hi GI,

    Did you import the project located under folder "universal_motorcontrol_syscfg"?, as I notice there is only a "statemachines.c" in this folder. The corresponding code for the universal motor lab user guide that you referred to should all under folder "universal_motorcontrol_lab". Please try to debug using the projects within this folder. 

    Thanks,

    Jiaxin

  • Did you import the project located under folder "universal_motorcontrol_syscfg"?,

    No, I only have c:ti ~uiniversal_motorcontrol_lab folder. It was as mentioned last post causing the values to not show up. The tables are showing eSMO or FAST can run separately or together. However the C code is not written to update globals but only via FAST builds. My understanding is to select one or the other though it seems only FAST supports motor ID, not eSMO.

    When we remove FAST symbol there are no global variable updates. Seemingly the top define should add || defined(MOTOR1_ESMO)? Why would we want to have FAST estimator and ESMO estimator run at the same time?

    motor1_drive.c, lines 1628 -1645

    #if defined(MOTOR1_FAST) || defined(MOTOR1_ESMO)  add || defined(MOTOR1_FAST) || defined(MOTOR2_FAST)
    // update the global variables
    updateGlobalVariables(handle);
    #endif // MOTOR1_FAST

    #if defined(MOTOR1_ESMO)
    if(obj->motorState >= MOTOR_CTRL_RUN)
    {
       ESMO_updateFilterParams(obj->esmoHandle);
       ESMO_updatePLLParams(obj->esmoHandle);
    }
    #endif // MOTOR2_ESMO

    return;
    } // end of the runMotor1Control() function

    motor_common.c line 913

    // Odd define location does not assert when set for eSMO only or others above red.
    #if defined(MOTOR1_ESMO) || defined(MOTOR1_FAST) || defined(MOTOR2_FAST)
    // update motor control variables
    void updateGlobalVariables(MOTOR_Handle handle)
    {

  • Hi GI,

    Thank you for confirming the project you are working on.

    My understanding is to select one or the other though it seems only FAST supports motor ID, not eSMO.

    Yes, based on the user guide and the code, the motor identification is only available when the FAST estimator is implemented. This is indicated not only in Table 2-6 but also P46, Ch2.5.4.3 - number 2.

    Why would we want to have FAST estimator and ESMO estimator run at the same time?

    You could evaluate the performance of the two estimator, and run the motor identification through the FAST estimator.

    Thanks,

    Jiaxin

  • You could evaluate the performance of the two estimator, and run the motor identification through the FAST estimator.

    However in build level 1 & 2 the global updates were not functioning in debug with MOTOR1_ESMO symbol. Hence there is a bug as shown above as OR seems prudent when MOTOR1_FAST symbol is not set in build level 4.