Skip to main content
ZXuey.1
Associate
January 20, 2022
Question

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?

  • January 20, 2022
  • 1 reply
  • 1012 views

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

This topic has been closed for replies.

1 reply

der.ule
Associate II
January 31, 2022

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