2021-09-07 07:06 AM
Hello,
I am using the STEVAL-SPIN3201 to drive a motor with sensored FOC.
Inside the code, I use the syntax of the FOC library to program how the motor should move.
I created the project in mc workbench (find the project file attached).
Then I imported it into STM32 IDE and added the following code section inside the main file (user code 3):
MC_ProgramSpeedRampMotor1(1000/6,0);
MC_StartMotor1();
HAL_Delay(8000);
MC_StopMotor1();
HAL_Delay(500);
MC_ProgramSpeedRampMotor1(-100/6,0);
MC_StartMotor1();
HAL_Delay(7000);
MC_StopMotor1();
HAL_Delay(400);
/* USER CODE END 3 */
When I test the program, the motor moves first to one direction for 8 seconds, then to the other direction for 7 seconds (as it should do). However, the speed is always the same (according to the motor pilot about 1300 rpm).
Do you know why I can´t program the speed of the motor?
Best regards
Florian Maurer
2021-09-14 10:38 PM
Dear @FMaur.1
There is no file attached.
Best regards