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
An additional parameter needs to be defined in the user.h file. This parameter is USER_MOTOR_ENCODER_LINES. This value should be set to the number of lines (or pulses) that are on the motor's encoder. In the Lab 12b example project, this macro definition is included in user.h.
#elif (USER_MOTOR == Teknic_M2310PLN04K)
#define USER_MOTOR_TYPE MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS (4)
#define USER_MOTOR_Rr (NULL)
#define USER_MOTOR_Rs (0.4076258)
#define USER_MOTOR_Ls_d (0.0001972132)
#define USER_MOTOR_Ls_q (0.0001972132)
#define USER_MOTOR_RATED_FLUX (0.03975862)
#define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
#define USER_MOTOR_RES_EST_CURRENT (1.0)
#define USER_MOTOR_IND_EST_CURRENT (-0.5)
#define USER_MOTOR_MAX_CURRENT (7.0)
#define USER_MOTOR_FLUX_EST_FREQ_Hz (20.0)
// Number of lines on the motor's quadrature encoder
#define USER_MOTOR_ENCODER_LINES (1000.0)