2023-11-27 01:01 AM
I have imported the motor details from motor pilot and workbench, but now the main challenge is to set the speed in the code
is there any direct api to change the speed in rpm in the code?
used the below api for starting the motor, it ran smoothly. I want to change the speed next how can i do it
MC_StartMotor1();
2023-11-27 01:21 AM
Hello,
You can use:
2023-11-27 02:06 AM
Hello @GMA
I have tried this before but when i measured the output by tachometer, i was not getting the same speed that i have set using this api
MC_ProgramSpeedRampMotor1_F(FinalSpeed_in_rpm, RampDuration_in_ms)
2023-11-27 02:21 AM
Check the number of poles and the API
MC_ProgramSpeedRampMotor1(RequestedSpeed * ((int16_t)SPEED_UNIT)) / (int16_t)U_RPM,RampDuration_in_ms);
The RequestedSpeed is the actual speed you need, you have to include the SPEED_UNIT / U_RPM factor.