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 the ctrl.h file the function CTRL_runOnline_User, we need to modify the source for the angle provided to FOC. As a default, FOC is set up to get the angle from the FAST estimator, but for sensored control, the FOC will receive the angle from the ENC module. In the Lab 12b example project, this step is accomplished in the ctrlQEP.h file.
// generate the motor electrical angle
angle_pu = EST_getAngle_pu(obj->estHandle);
// Update electrical angle from ENC module
angle_pu = ENC_getElecAngle(encHandle);