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.

CCS/LAUNCHXL-F28069M: What parameters does CTRL_setEstParams modify ?

Part Number: LAUNCHXL-F28069M
Other Parts Discussed in Thread: MOTORWARE

Tool/software: Code Composer Studio

In my application, I have to switch between induction and PMSM motors during runtime. Normal approach of changing macros will not work.

I receive motor parameters through UART and call CTRL_setParams again when the motor params change.

I found that CTRL_setEstParams sets Rs,Ld,Lq and Flux to default values. As source code for this function is not available, I cannot determine if any other variables are set to default by this function.

In my use case, I already know the values of Rs,Ld,Lq and flux and do not need an ID run. Currently I am planning to save values of Rs etc and reassign after CTRL_setEstParams is called. For this approach to work, I need confirmation that the function does not modify any other variables.

Please let me know which parameters are set inside CTRL_setEstParams.

  • You might follow the below steps to modify the motor parameters if you have to switch the motor type, not only Rs or Ls.
    1. You need to set the parameters in "gUserParams" first according to motor and h/w board.
    2. Call CTRL_setParams(ctrlHandle, &gUserParams).
    3. And then call CTRL_setUserMotorParams(ctrlHandle).

    Btw, most parameters in CTRL_Obj and USER_Params will be used, you can't change the definition of the elements of both objects.
  • Yes, this was my exact plan. Thanks for the confirmation.

    I would like to say that using macros for parameters which might potentially change during runtime was not a good code architectural decision. Please see if you can change that during next version of motorware.