I am using TI example firmware of project_lab13b with 28069M as my motor drive firmware basis.
Since the drive is required to drive PM motors from different suppliers. As we know, Motors from different suppliers will have different motor parameters. therefore, we need to input motor parameters when using different motors through series data communication on the drive by the customer. However, in the example firmware project_lab13b, the motor parameters are defined in micro definition way, such as below:
。。。
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)
。。。
Now, my first question is: Can these micro-definitions can be replaced by global variable definitions? Only doing that, the above motor parameters can be modified by customer through series data communications on the drive. The global variable definitions can be illustrated as below for example:
...
float USER_MOTOR_Rr ;
float USER_MOTOR_Rs ;
float USER_MOTOR_Ls_d ;
float USER_MOTOR_Ls_q ;
float USER_MOTOR_RATED_FLUX ;
...
And by definitions in such a way, the InstaSpin function will be influenced? Is it still functioned normally?
Actually, I have tried global definition like above, but it seems that the InstaSpin will not function as normal, even the whole firmware seems stuck or stop somewhere when the drive is powered on again.
Can anyone or TI engineer help me to solve that?
Appreciated for any comments.