Dear team:
One of my customers has the following questions:
In the routine lab13 project based on 28069m, the parameters of motor are defined in user.h, and some codes are as follows:
#define USER_MOTOR_NUM_POLE_PAIRS (4) #define USER_MOTOR_Rr (NULL) #define USER_MOTOR_Rs (0.135) #define USER_MOTOR_Ls_d (0.000335) #define USER_MOTOR_Ls_q (0.000335) #define USER_MOTOR_RATED_FLUX (0.08)
His question is: can the definition of motor parameters be changed to global variable definition instead of macro definition? In this way, it can assign values to the corresponding variables or change the assignment when necessary. For example, it is defined as follows:
float USER_MOTOR_Rr; float USER_MOTOR_Rs; float USER_MOTOR_Ls_d; float USER_MOTOR_Ls_q; float USER_MOTOR_RATED_FLUX;
Will this change affect the function of the original program and the normal operation of instaspin.
Best Regards