Skip to main content
SRedd.5
Senior III
October 20, 2023
Question

Program Torque Mode Function

  • October 20, 2023
  • 1 reply
  • 1116 views

I am using the __weak void MC_ProgramTorqueRampMotor1( int16_t hFinalTorque, uint16_t hDurationms ) function, but i have small doubt on it, hope i get some answer. I am using throttle to use this function but the problem i feel is when the throttle is 0 - 5% i am using MC_StopMotor1(); function and when throttle increases to some > 10% i use

if(IDLE == MC_GetSTMStateMotor1())
{
(void)MC_StartMotor1(); /* Start Motor */
}

MC_ProgramTorqueRampMotor1(g_qdreference_s.q ,0);

and throttle can frequently change between minimum and maximum the function stop and start motor are frequently called and i feel there is a kind of sound that happens. Instead of Stopmotor i tried using 

MC_ProgramTorqueRampMotor1(0 ,0); that is make iq=0; but i feel there is noise which is happening using this function, this noise will not happen if i use StopMotor(). How do i proceed?

 

    1 reply

    Visitor II
    January 27, 2025

    I think the sound comes because the motor is still engaged whereas MC_Stopmotor() will completely stop the motor.

    Can you please explain me about this "g_qdreference_s.q" where did you get it from and what does it mean and how does it get updated?