cancel
Showing results for 
Search instead for 
Did you mean: 

I am using MCSDK5.Y.2's electric output library. How can I change the current parameters of the motor by directly modifying the source code?

ZXuey.1
Associate II

我用的是MCSDK5.Y.2的电出库,�?如何通过直接修改�?代�?,改�?�电机的电�?�?�数?(�?用�?新�?用STM32Cube�?次生�?)我修改了M1_ApplicationConfig_reg.maxMotorCurrent的值,但是�?�有界�?�显示�?�化,实际电�?并没有�?�化。我修改了M1_MotorConfig_reg.maxCurrent值,什么没有�?�化。

1 REPLY 1
der.ule
Associate III

In the file pmsm_motor_parameters.h you can change the nominal current of your motor:

/* When using Id = 0, NOMINAL_CURRENT is utilized to saturate the output of the
   PID for speed regulation (i.e. reference torque).
   Transformation of real currents (A) into int16_t format must be done accordingly with
   formula:
   Phase current (int16_t 0-to-peak) = (Phase current (A 0-to-peak)* 32767 * Rshunt *
                                   *Amplifying network gain)/(MCU supply voltage/2)
*/
 
#define NOMINAL_CURRENT         3394