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
Run methods perform calculations of the object variables. In the case of embedded software, run methods might also operate a peripheral or some other hardware. The Park run method calculates the Park transform of the input vector {Id, Iq } and then returns the output vector {Iα, Iβ}. The code for the Park run method is shown.
In run methods, the first parameter is the handle to the object and the subsequent parameters are input and output variables when in single quantities or pointers to vectors. Nothing is returned from a run method.
static inline void PARK_run(PARK_Handle parkHandle,const MATH_vec2
*pInVec,MATH_vec2 *pOutVec)
{
PARK_Obj *park = (PARK_Obj *)parkHandle;
_iq sinTh = park->sinTh;
_iq cosTh = park->cosTh;
_iq value_0 = pInVec->value[0];
_iq value_1 = pInVec->value[1];
pOutVec->value[0] = _IQmpy(value_0,cosTh) + _IQmpy(value_1,sinTh);
pOutVec->value[1] = _IQmpy(value_1,cosTh) - _IQmpy(value_0,sinTh);
return;
} // end of PARK_run() function