cancel
Showing results for 
Search instead for 
Did you mean: 

By using MC_ProgramSpeedRampMotor1 api trying to change ramp in six step algorithm

soundarya_h_s
Associate III

The MC_ProgramSpeedRampMotor1 api is created in six steps to modify the ramp; however, ramp changes cannot be made with this api.It is possible to modify the ramp in FOC by using the MC_ProgramSpeedRampMotor1_F api.

Additionally, two produced APIs are supplied in FOC; however, in the Six Step, just MC_ProgramSpeedRampMotor1 generated.

I am unable to modify the ramp using the MC_ProgramSpeedRampMotor1 api in six step. Could you please assist me? Is there another method to modify the ramp in a six-step algorithm?

13 REPLIES 13

Is there any other method to modify the ramp in a six-step algorithm?

ADAVE.1
ST Employee

I generated a 6step project and added

MC_ProgramSpeedRampMotor1(333, 5000); 

in main.c and it works pretty well. The speed is gradually changed to 2krpm in 5s. Consider that a change of sign in the speed (spin rotation change) is not allowed in 6step and forces the motor to stop. What exactly is the issue you are facing?

soundarya_h_s_0-1702965132823.png

This is the code i am using to generate the ramp in six step algorithm, The MC_ProgramSpeedRampMotor1 api is created in six steps to modify the ramp; however, ramp changes cannot be made with this api.  Could you please assist me? Is there another method to modify the ramp in a six-step algorithm?

Are you sure that the effect of your code is not an overcurrent event?

I see an error in the usage of the speed. As indicated in the documentation the api accepts the speed expressed in #SPEED_UNIT. 

ADAVE1_0-1702973702660.png

So, I suggest to use the macro RPM_2_SPEED_UNIT(rpm) to convert it before calling the function.

MC_ProgramSpeedRampMotor1(RPM_2_SPEED_UNIT(target_speed), duration);