SPRUHJ1I January 2013 – October 2021 TMS320F2802-Q1 , TMS320F28026-Q1 , TMS320F28026F , TMS320F28027-Q1 , TMS320F28027F , TMS320F28027F-Q1 , TMS320F28052-Q1 , TMS320F28052F , TMS320F28052F-Q1 , TMS320F28052M , TMS320F28052M-Q1 , TMS320F28054-Q1 , TMS320F28054F , TMS320F28054F-Q1 , TMS320F28054M , TMS320F28054M-Q1 , TMS320F2806-Q1 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28068F , TMS320F28068M , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M-Q1
In order to disable Rs Online recalibration the user can refer to the first code example, listed here also, where the initial values are written and flags are disabled. This code example, as discussed previously, also checks for the right state of the state machine in order to disable Rs Online appropriately:
CTRL_Obj *obj = (CTRL_Obj *)ctrlHandle;
// get the controller state
gMotorVars.CtrlState = CTRL_getState(ctrlHandle);
// get the estimator state
gMotorVars.EstState = EST_getState(obj->estHandle);
if((gMotorVars.CtrlState <= CTRL_State_OffLine) ||
((gMotorVars.CtrlState == CTRL_State_OnLine)&&
(gMotorVars.EstState == EST_State_Rs)))
{
EST_setRsOnLine_qFmt(obj->estHandle,EST_getRs_qFmt(obj->estHandle));
EST_setRsOnLineId_mag_pu(obj->estHandle,_IQ(0.0));
EST_setRsOnLineId_pu(obj->estHandle,_IQ(0.0));
EST_setFlag_enableRsOnLine(obj->estHandle,FALSE);
EST_setFlag_updateRs(obj->estHandle,FALSE);
}